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]:
|
||||
if 'creature' in value:
|
||||
iscreature = True
|
||||
if fields.get(field_subtypes):
|
||||
for idx, value in fields[field_subtypes]:
|
||||
if 'vehicle' in value:
|
||||
iscreature = True
|
||||
elif fields.get(field_subtypes):
|
||||
for idx, value in fields[field_subtypes]:
|
||||
if 'vehicle' in value:
|
||||
iscreature = True
|
||||
if iscreature:
|
||||
return field_pt in fields
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue