refactor(vehicles): speedup

Don't check subtypes if we already know it's a creature.
This commit is contained in:
Sabe Jones 2017-01-16 19:23:04 +00:00
parent b5cd4df795
commit a961baf9ed

View file

@ -171,7 +171,7 @@ 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