- Made many small bugfixes to the @parent and @create functions as well as their underlying methods.

- Made it so user #1 is also affected by the on_player_creation() function.
- Added an event folder for custom events, including a working example
- Expanded the example commands and parents to include the changes to how they should be initialized.
- Added an optional ansi scheme (not active by default)
This commit is contained in:
Griatch 2009-04-25 20:51:12 +00:00
parent a32840002c
commit a9dbac8aae
16 changed files with 397 additions and 35 deletions

View file

@ -303,7 +303,7 @@ def cmd_examine(command):
con_exits.append(obj)
elif obj.is_thing():
con_things.append(obj)
# Render Contents display.
if con_players or con_things:
s += str("%sContents:%s" % (ANSITable.ansi["hilite"],

View file

@ -51,17 +51,18 @@ def cmd_parent(command):
# Clear parent if command was @parent obj= or obj=none
if not parent_name or parent_name.lower() == "none":
target_obj.set_script_parent(None)
target_obj.scriptlink.at_object_creation()
new_parent = target_obj.scriptlink()
source_object.emit_to("%s reverted to its default parent (%s)." %
(target_obj, new_parent))
return
# If we reach this point, attempt to change parent.
# If we reach this point, attempt to change parent.
former_parent = target_obj.get_scriptlink()
if target_obj.set_script_parent(parent_name):
#new script path added; initialize the parent
target_obj.scriptlink.at_object_creation()
s = "%s's parent is now %s (instead of %s).\n\r"
s += "Note that the new parent type could have overwritten "
s += "same-named attributes on the existing object."