Skip to content

Commit

Permalink
Merge pull request #4 from offish/v0.0.4
Browse files Browse the repository at this point in the history
make defindex str as key
  • Loading branch information
offish authored Oct 29, 2023
2 parents 777b79b + ed87736 commit 574f513
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tf2_data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = "tf2-data"
__author__ = "offish"
__version__ = "0.0.3"
__version__ = "0.0.4"
__license__ = "MIT"

from .schema import Schema, SchemaItems, IEconItems
Expand Down
4 changes: 3 additions & 1 deletion src/tf2_data/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ def map_defindex_name(self) -> dict:
defindex = item["defindex"]

# map both ways for ease of use
data[defindex] = name
# defindex as key is str
data[str(defindex)] = name

# map name to all defindexes
# e.g. mann co key has multiple defindexes
if name not in data:
# defindex as value are ints
data[name] = [defindex]
else:
data[name] += [defindex]
Expand Down

0 comments on commit 574f513

Please sign in to comment.