Fix prototype lock display when lock is str. Resolve #2323.
This commit is contained in:
parent
0fb9c11490
commit
24d89f93d2
3 changed files with 7 additions and 4 deletions
|
|
@ -965,7 +965,7 @@ def _typeclass_actions(caller, raw_inp, **kwargs):
|
|||
return "node_typeclass"
|
||||
|
||||
|
||||
def _typeclass_select(caller, typeclass):
|
||||
def _typeclass_select(caller, typeclass, **kwargs):
|
||||
"""Select typeclass from list and add it to prototype. Return next node to go to."""
|
||||
ret = _set_property(caller, typeclass, prop="typeclass", processor=str)
|
||||
caller.msg("Selected typeclass |c{}|n.".format(typeclass))
|
||||
|
|
|
|||
|
|
@ -918,7 +918,7 @@ def prototype_to_str(prototype):
|
|||
attrs = prototype["attrs"]
|
||||
out = []
|
||||
for (attrkey, value, category, locks) in attrs:
|
||||
locks = ", ".join(lock for lock in locks if lock)
|
||||
locks = locks if isinstance(locks, str) else ", ".join(lock for lock in locks if lock)
|
||||
category = "|ccategory:|n {}".format(category) if category else ""
|
||||
cat_locks = ""
|
||||
if category or locks:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue