mirror of
https://github.com/evennia/evennia.git
synced 2026-03-25 09:16:32 +01:00
Added an at_obj_receive hook to basic player/object script parents. This allows
e.g. room parents to react when a player enters them.
This commit is contained in:
parent
d06ac3e239
commit
eb6f82fea0
5 changed files with 22 additions and 11 deletions
|
|
@ -169,9 +169,15 @@ class ObjectManager(models.Manager):
|
|||
"""
|
||||
Searches through all objects returning those which has a certain script parent.
|
||||
"""
|
||||
o_query = self.filter(script_parent__exact=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 local_object_script_parent_search(self, script_parent, location):
|
||||
o_query = self.filter(script_parent__exact=script_parent).filter(location__iexact=location)
|
||||
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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue