Clean up some of the methods on the script parent system. I have no idea why I was being silly and passing things around through dictionaries. Yick. Also added a at_player_creation method to basicplayer.py that is triggered after player objects are created and ready to go, but before they are logged in.

This commit is contained in:
Greg Taylor 2009-03-30 00:54:05 +00:00
parent 4af854271a
commit b3c386a2c3
5 changed files with 43 additions and 42 deletions

View file

@ -136,15 +136,10 @@ def cmd_look(command):
target_obj = source_object.get_location()
# SCRIPT: Get the item's appearance from the scriptlink.
source_object.emit_to(target_obj.scriptlink.return_appearance({
"target_obj": target_obj,
"pobject": source_object
}))
source_object.emit_to(target_obj.scriptlink.return_appearance(source_object))
# SCRIPT: Call the object's script's a_desc() method.
target_obj.scriptlink.a_desc({
"target_obj": source_object
})
target_obj.scriptlink.a_desc(source_object)
GLOBAL_CMD_TABLE.add_command("look", cmd_look)
def cmd_get(command):
@ -184,9 +179,7 @@ def cmd_get(command):
exclude=source_object)
# SCRIPT: Call the object's script's a_get() method.
target_obj.scriptlink.a_get({
"pobject": source_object
})
target_obj.scriptlink.a_get(source_object)
GLOBAL_CMD_TABLE.add_command("get", cmd_get)
def cmd_drop(command):
@ -218,9 +211,7 @@ def cmd_drop(command):
exclude=source_object)
# SCRIPT: Call the object's script's a_drop() method.
target_obj.scriptlink.a_drop({
"pobject": source_object
})
target_obj.scriptlink.a_drop(source_object)
GLOBAL_CMD_TABLE.add_command("drop", cmd_drop),
def cmd_examine(command):