mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +02:00
Cleaning up GlobalScriptContainer from some junk logic.
This commit is contained in:
parent
021f5779bf
commit
bac0e9a8c1
2 changed files with 8 additions and 10 deletions
|
|
@ -106,6 +106,9 @@ MONITOR_HANDLER = None
|
|||
GLOBAL_SCRIPTS = None
|
||||
OPTION_CLASSES = None
|
||||
|
||||
# variables
|
||||
PORTAL_MODE = False
|
||||
|
||||
|
||||
def _create_version():
|
||||
"""
|
||||
|
|
@ -160,6 +163,8 @@ def _init(portal_mode=False):
|
|||
global EvMenu, EvTable, EvForm, EvMore, EvEditor
|
||||
global ANSIString, FuncParser
|
||||
global AttributeProperty, TagProperty, TagCategoryProperty
|
||||
global PORTAL_MODE
|
||||
PORTAL_MODE = portal_mode
|
||||
|
||||
# Parent typeclasses
|
||||
# utilities
|
||||
|
|
@ -187,7 +192,7 @@ def _init(portal_mode=False):
|
|||
from .utils import ansi, gametime, logger
|
||||
from .utils.ansi import ANSIString
|
||||
|
||||
if not portal_mode:
|
||||
if not PORTAL_MODE:
|
||||
# containers
|
||||
from .utils.containers import GLOBAL_SCRIPTS, OPTION_CLASSES
|
||||
|
||||
|
|
@ -219,7 +224,7 @@ def _init(portal_mode=False):
|
|||
)
|
||||
from .utils.utils import class_from_module
|
||||
|
||||
if portal_mode:
|
||||
if PORTAL_MODE:
|
||||
# Set up the PortalSessionHandler
|
||||
from evennia.server.portal import portalsessionhandler
|
||||
|
||||
|
|
@ -377,11 +382,6 @@ def _init(portal_mode=False):
|
|||
del SystemCmds
|
||||
del _EvContainer
|
||||
|
||||
# delayed starts - important so as to not back-access evennia before it has
|
||||
# finished initializing
|
||||
if not portal_mode:
|
||||
GLOBAL_SCRIPTS.start()
|
||||
|
||||
|
||||
def set_trace(term_size=(140, 80), debugger="auto"):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -155,9 +155,7 @@ class GlobalScriptContainer(Container):
|
|||
return None
|
||||
|
||||
# store a hash representation of the setup
|
||||
script.attributes.add("_global_script_settings", compare_hash, category="settings_hash")
|
||||
|
||||
self.scripts[key] = script
|
||||
script.attributes.add("global_script_settings", compare_hash, category="settings_hash")
|
||||
|
||||
return script
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue