mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Debug code: comparing .tags.all() vs tags.get()
This commit is contained in:
parent
a0f113ad52
commit
a3b37d60ed
1 changed files with 10 additions and 2 deletions
|
|
@ -79,7 +79,11 @@ from evennia import DefaultExit
|
|||
from evennia.commands.default.muxcommand import MuxCommand
|
||||
from evennia.utils.utils import inherits_from
|
||||
from evennia.utils import search, utils, logger
|
||||
from evennia.prototypes.spawner import spawn
|
||||
from evennia.prototypes.spawner import (
|
||||
spawn,
|
||||
# prototype_from_object,
|
||||
# prototype_diff
|
||||
)
|
||||
|
||||
# Tag used by puzzles
|
||||
_PUZZLES_TAG_CATEGORY = 'puzzles'
|
||||
|
|
@ -110,8 +114,12 @@ def proto_def(obj, with_tags=True):
|
|||
'permissions': obj.permissions.all()[:],
|
||||
}
|
||||
if with_tags:
|
||||
# import ipdb
|
||||
# ipdb.set_trace()
|
||||
_tags = obj.tags.get(return_tagobj=True, return_list=True)
|
||||
tags = obj.tags.all(return_key_and_category=True)
|
||||
tags.append((_PUZZLES_TAG_MEMBER, _PUZZLES_TAG_CATEGORY))
|
||||
tags = [(t[0], t[1], None) for t in tags]
|
||||
tags.append((_PUZZLES_TAG_MEMBER, _PUZZLES_TAG_CATEGORY, None))
|
||||
protodef['tags'] = tags
|
||||
return protodef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue