mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 09:16:32 +01:00
Local object command tables are now in. See game/gamesrc/parents/examples/red_button.py for example. Note that local command matches will override global matches. Command handler short circuits on the first command match. This will typically be the object with the lowest ID.
This commit is contained in:
parent
723cdab4aa
commit
ffa03309fc
5 changed files with 40 additions and 13 deletions
|
|
@ -7,6 +7,7 @@ NOTE: This file should NOT be directly modified. Sub-class the BasicObject
|
|||
class in game/gamesrc/parents/base/basicobject.py and change the
|
||||
SCRIPT_DEFAULT_OBJECT variable in settings.py to point to the new class.
|
||||
"""
|
||||
from src.cmdtable import CommandTable
|
||||
from src.ansi import ANSITable
|
||||
|
||||
class EvenniaBasicObject(object):
|
||||
|
|
@ -25,6 +26,7 @@ class EvenniaBasicObject(object):
|
|||
scripted_obj: (Object) A reference to the object being scripted (the child).
|
||||
"""
|
||||
self.scripted_obj = scripted_obj
|
||||
self.command_table = CommandTable()
|
||||
|
||||
def at_object_creation(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue