Skip to content

Commit

Permalink
Fix mismatches here
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Dec 15, 2024
1 parent b390879 commit 2f6748f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/srctools/packlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ def get_ent(classname: str) -> EntityDef:
value: str
key: str
for key in set(ent) | set(ent_class.kv):
key = key.casefold()
# These are always present on entities, and we don't have to do
# any packing for them.
# Origin/angles might be set (brushes, instances) even for ents
Expand Down Expand Up @@ -926,12 +927,12 @@ def get_ent(classname: str) -> EntityDef:
val_type = kv.type
default = kv.default
except KeyError:
# Suppress this error for unknown classes, we already
# showed a warning above.
# If ent_class is base_entity, this is an unknown class.
# Suppress the error, we already showed a warning above.
if ent_class is not base_entity and (classname, key) not in unknown_keys:
unknown_keys.add((ent_class.classname, key))
unknown_keys.add((classname, key))
LOGGER.warning('Unknown keyvalue "{}" for ent of type "{}"!',
key, ent['classname'])
key, classname)
continue

value = ent[key, default]
Expand Down Expand Up @@ -1163,7 +1164,7 @@ def _get_model_files(self, file: PackFile) -> None:
"""Find any needed files for a model."""
filename, ext = os.path.splitext(file.filename)

if ext in ('glb', 'gltf'):
if ext in ('.glb', '.gltf'):
return

# Some of these are optional, so just skip. Do not re-pack the MDL itself, that's
Expand Down

0 comments on commit 2f6748f

Please sign in to comment.