Renamed at_pre_destroy() to at_object_destruction() to be consistent with at_object_creation() and at_player_creation(). Added additional documentation as well.
This commit is contained in:
parent
4bcbfd855a
commit
ee8bd34bb3
2 changed files with 9 additions and 7 deletions
|
|
@ -753,7 +753,7 @@ def cmd_destroy(command):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Run any scripted things that happen before destruction.
|
# Run any scripted things that happen before destruction.
|
||||||
target_obj.scriptlink.at_pre_destroy(pobject=source_object)
|
target_obj.scriptlink.at_object_destruction(pobject=source_object)
|
||||||
|
|
||||||
# Notify destroyer and do the deed.
|
# Notify destroyer and do the deed.
|
||||||
source_object.emit_to("You destroy %s." % target_obj.get_name())
|
source_object.emit_to("You destroy %s." % target_obj.get_name())
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,12 @@ class EvenniaBasicObject(object):
|
||||||
is created, do it here and not in __init__().
|
is created, do it here and not in __init__().
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def at_desc(self, pobject=None):
|
def at_object_destruction(self, pobject=None):
|
||||||
"""
|
"""
|
||||||
Perform this action when someone uses the LOOK command on the object.
|
This is triggered when an object is about to be destroyed via
|
||||||
|
@destroy ONLY. If an object is deleted via delete(), it is assumed
|
||||||
|
that this method is to be skipped.
|
||||||
|
|
||||||
values:
|
values:
|
||||||
* pobject: (Object) The object requesting the action.
|
* pobject: (Object) The object requesting the action.
|
||||||
|
|
@ -44,10 +46,10 @@ class EvenniaBasicObject(object):
|
||||||
# Un-comment the line below for an example
|
# Un-comment the line below for an example
|
||||||
#print "SCRIPT TEST: %s looked at %s." % (pobject, self.scripted_obj)
|
#print "SCRIPT TEST: %s looked at %s." % (pobject, self.scripted_obj)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def at_pre_destroy(self, pobject=None):
|
def at_desc(self, pobject=None):
|
||||||
"""
|
"""
|
||||||
Performed right before an object is destroyed.
|
Perform this action when someone uses the LOOK command on the object.
|
||||||
|
|
||||||
values:
|
values:
|
||||||
* pobject: (Object) The object requesting the action.
|
* pobject: (Object) The object requesting the action.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue