refactor(vehicles): speedup
Don't check subtypes if we already know it's a creature.
This commit is contained in:
parent
b5cd4df795
commit
a961baf9ed
1 changed files with 4 additions and 4 deletions
|
@ -171,10 +171,10 @@ def fields_check_valid(fields):
|
||||||
for idx, value in fields[field_types]:
|
for idx, value in fields[field_types]:
|
||||||
if 'creature' in value:
|
if 'creature' in value:
|
||||||
iscreature = True
|
iscreature = True
|
||||||
if fields.get(field_subtypes):
|
elif fields.get(field_subtypes):
|
||||||
for idx, value in fields[field_subtypes]:
|
for idx, value in fields[field_subtypes]:
|
||||||
if 'vehicle' in value:
|
if 'vehicle' in value:
|
||||||
iscreature = True
|
iscreature = True
|
||||||
if iscreature:
|
if iscreature:
|
||||||
return field_pt in fields
|
return field_pt in fields
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue