Skip to content

Commit

Permalink
mtf2json: added list of ignored keys (currently 'fluffimage' and 'ima…
Browse files Browse the repository at this point in the history
…gefile')
  • Loading branch information
juk0de committed Sep 30, 2024
1 parent 75d9d50 commit 157fa94
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mtf2json/mtf2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
"ejection",
"notes",
]
# keys that are intentionally ignored
ignored_keys = [
"fluffimage",
"imagefile",
]

# internally renamed keys
renamed_keys = {
Expand Down Expand Up @@ -158,6 +163,7 @@ def __key_is_known(key: str) -> bool:
or key in armor_location_keys
or key in fluff_keys
or key in other_keys
or key in ignored_keys
)


Expand Down Expand Up @@ -274,6 +280,10 @@ def __read_line(
print(f"> detected line with unknown key '{key}', skipping it")
__add_statistics("unknown_keys", key, filename)
continue
if key in ignored_keys:
if verbose:
print(f"> detected line with ignored key '{key}', skipping it")
continue
elif key == "armor" or key in armor_location_keys:
section = "armor"
elif key in critical_slot_keys:
Expand Down

0 comments on commit 157fa94

Please sign in to comment.