Skip to content

Commit

Permalink
Make <ITEM_ID> also match 'bee2_' extra named instances
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jun 23, 2016
1 parent 88a743c commit 5d0e8fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/instanceLocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def resolve(path, silent=False) -> List[str]:
"""Resolve an instance path into the values it refers to.
Valid paths:
- "<ITEM_ID>" matches all indexes, plus extra instances.
- "<ITEM_ID:1,2,5>": matches the given indexes for that item.
- "<ITEM_ID:cube_black, cube_white>": the same, with strings for indexes
- "<ITEM_ID:bee2_value>": Custom extra instances defined in editoritems.
Expand Down Expand Up @@ -355,11 +356,14 @@ def _resolve(path):
# It's just the <item_id>, return all the values
try:
# Skip "" instances
return [
out = [
inst for inst in
INSTANCE_FILES[path]
if inst != ''
]
# Add custom values too
out.extend(CUST_INST_FILES[path].values())
return out
except KeyError:
LOGGER.warning(
'"{}" not a valid item!',
Expand Down

0 comments on commit 5d0e8fe

Please sign in to comment.