- 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

@ -79,6 +79,15 @@ class ObjectManager(models.Manager):
return o_query.exclude(type__in=[defines_global.OTYPE_GARBAGE,
defines_global.OTYPE_GOING])
def global_object_script_parent_search(self, script_parent):
"""
Searches through all objects returning those which has a certain script parent.
"""
o_query = self.filter(script_parent__exact=script_parent)
return o_query.exclude(type__in=[defines_global.OTYPE_GARBAGE,
defines_global.OTYPE_GOING])
def list_search_object_namestr(self, searchlist, ostring, dbref_only=False,
limit_types=False, match_type="fuzzy"):
"""
@ -350,4 +359,4 @@ class ObjectManager(models.Manager):
user_object.emit_to("Welcome to %s, %s.\n\r" % (
ConfigValue.objects.get_configvalue('site_name'),
user_object.get_name(show_dbref=False)))
command.session.add_default_channels()
command.session.add_default_channels()