We now access the scriptlink by calling object.scriptlink instead of get_scriptlink. Shortens the typage a little and allows for some less complex fun possibilities down the road.
This commit is contained in:
parent
e6e5a889f5
commit
51a911d048
4 changed files with 16 additions and 13 deletions
|
|
@ -239,7 +239,7 @@ def handle(cdat):
|
|||
cdat['uinput'] = parsed_input
|
||||
|
||||
# SCRIPT: See if the player can traverse the exit
|
||||
if not targ_exit.get_scriptlink().default_lock({
|
||||
if not targ_exit.scriptlink.default_lock({
|
||||
"pobject": pobject
|
||||
}):
|
||||
session.msg("You can't traverse that exit.")
|
||||
|
|
|
|||
|
|
@ -116,13 +116,13 @@ def cmd_look(cdat):
|
|||
return
|
||||
|
||||
# SCRIPT: Get the item's appearance from the scriptlink.
|
||||
session.msg(target_obj.get_scriptlink().return_appearance({
|
||||
session.msg(target_obj.scriptlink.return_appearance({
|
||||
"target_obj": target_obj,
|
||||
"pobject": pobject
|
||||
}))
|
||||
|
||||
# SCRIPT: Call the object's script's a_desc() method.
|
||||
target_obj.get_scriptlink().a_desc({
|
||||
target_obj.scriptlink.a_desc({
|
||||
"target_obj": pobject
|
||||
})
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ def cmd_get(cdat):
|
|||
pobject.get_location().emit_to_contents("%s picks up %s." % (pobject.get_name(), target_obj.get_name()), exclude=pobject)
|
||||
|
||||
# SCRIPT: Call the object's script's a_get() method.
|
||||
target_obj.get_scriptlink().a_get({
|
||||
target_obj.scriptlink.a_get({
|
||||
"pobject": pobject
|
||||
})
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ def cmd_drop(cdat):
|
|||
pobject.get_location().emit_to_contents("%s drops %s." % (pobject.get_name(), target_obj.get_name()), exclude=pobject)
|
||||
|
||||
# SCRIPT: Call the object's script's a_drop() method.
|
||||
target_obj.get_scriptlink().a_drop({
|
||||
target_obj.scriptlink.a_drop({
|
||||
"pobject": pobject
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -142,8 +142,8 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
pobject = self.get_pobject()
|
||||
session_mgr.disconnect_duplicate_session(self)
|
||||
|
||||
pobject.get_scriptlink().at_pre_login()
|
||||
pobject.get_scriptlink().at_post_login()
|
||||
pobject.scriptlink.at_pre_login()
|
||||
pobject.scriptlink.at_post_login()
|
||||
|
||||
logger.log_infomsg("Login: %s" % (self,))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue