Moving script_parent to a field on the object model. This is critical enough to warrant it being there instead of in an attribute. Minor changes here and there.

NOTE: This update adds a field, delete your evennia.db3 or manually add a NOT NULL 'script_link' charfield(255).
This commit is contained in:
Greg Taylor 2008-12-16 04:28:57 +00:00
parent bd3d195d5b
commit 9a166ba024
5 changed files with 24 additions and 11 deletions

View file

@ -271,15 +271,17 @@ def cmd_examine(command):
along with detailed information about said object.
"""
# Format the examine header area with general flag/type info.
session.msg("%s\r\n%s" % (
target_obj.get_name(fullname=True),
target_obj.get_description(no_parsing=True),
))
session.msg(target_obj.get_name(fullname=True))
session.msg("Type: %s Flags: %s" % (target_obj.get_type(),
target_obj.get_flags()))
session.msg("Desc: %s" % target_obj.get_description(no_parsing=True))
session.msg("Owner: %s " % (target_obj.get_owner(),))
session.msg("Zone: %s" % (target_obj.get_zone(),))
parent_str = target_obj.script_parent
if parent_str and parent_str != '':
session.msg("Parent: %s " % (parent_str,))
for attribute in target_obj.get_all_attributes():
session.msg(attribute.get_attrline())

View file

@ -28,7 +28,7 @@ def show_cached_scripts(command):
for script in cache_dict.keys():
retval += "\n " + script
retval += "\n" + "-" * 78 + "\n"
retval += "%d cached parents." % len(cache_dict)
retval += "%d cached parents" % len(cache_dict)
session.msg(retval)
def cmd_parent(command):
@ -43,3 +43,5 @@ def cmd_parent(command):
if "clearcache" in command.command_switches:
clear_cached_scripts(command)
return