forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 1
Foreign Item Icons
threeandthreee edited this page Mar 19, 2025
·
1 revision
python check_one.py "Progressive Sword" "A Link to the Past"
import sys
from worlds.ladx.ForeignItemIcons import ForeignItemIconMatcher as Matcher
item = sys.argv[1]
game = sys.argv[2] if len(sys.argv)>2 else ""
matcher = Matcher()
match = matcher.get_icon_for_other_world(item, game)
print(match)python check_all.py item_icon_output.json
import json
import sys
from worlds.ladx.ForeignItemIcons import ForeignItemIconMatcher as Matcher
from worlds import network_data_package
outfile = sys.argv[1]
matcher = Matcher()
output = {}
for game, datapackage in network_data_package["games"].items():
matches = {}
for item in datapackage["item_name_to_id"].keys():
match = matcher.get_icon_for_other_world(item, game)
matches[item] = match
output[game] = matches
with open(outfile, 'w') as f:
f.write(json.dumps(output, indent=2))