Make the type of EntityClass.flagnames consistent.

Sometimes list and sometimes tuple makes for a mess.
This commit is contained in:
Bill Currie 2012-09-09 17:01:23 +09:00
parent 709ab05713
commit 825ce0dad6
2 changed files with 4 additions and 4 deletions

View file

@ -49,8 +49,8 @@ class EntityPanel(bpy.types.Panel):
obj = context.active_object
qfmap = context.scene.qfmap
ec = qfmap.entity_classes.entity_classes[obj.qfentity.classname]
flags = ec.flagnames + [""] * (8 - len(ec.flagnames))
flags += ["!easy", "!medium", "!hard", "!dm"]
flags = ec.flagnames + ("",) * (8 - len(ec.flagnames))
flags += ("!easy", "!medium", "!hard", "!dm")
layout.prop(obj.qfentity, "classname")
split = layout.split()
for c in range(3):

View file

@ -39,9 +39,9 @@ class EntityClass:
else:
size = None
if "flagnames" in d:
flagnames = list(d["flagnames"])
flagnames = tuple(d["flagnames"])
else:
flagnames = []
flagnames = ()
if "comment" in d:
comment = d["comment"]
else: