LttP: set non-native items to Power Star

This commit is contained in:
Fabian Dill 2021-06-22 06:25:19 +02:00
parent 937fee9019
commit 6c1d164330
1 changed files with 13 additions and 8 deletions
worlds/alttp

View File

@ -751,13 +751,18 @@ bonk_addresses = [0x4CF6C, 0x4CFBA, 0x4CFE0, 0x4CFFB, 0x4D018, 0x4D01B, 0x4D028,
0x4D3F8, 0x4D416, 0x4D420, 0x4D423, 0x4D42D, 0x4D449, 0x4D48C, 0x4D4D9, 0x4D4DC, 0x4D4E3,
0x4D504, 0x4D507, 0x4D55E, 0x4D56A]
def get_nonnative_item_sprite(game):
game_to_id = {
"Factorio": 0x09, # Hammer
"Hollow Knight": 0x21, # Bug Catching Net
"Minecraft": 0x13, # Shovel
}
return game_to_id.get(game, 0x6B) # default to Power Star
def get_nonnative_item_sprite(game: str) -> int:
return 0x6B # set all non-native sprites to Power Star as per 13 to 2 vote at
# https://discord.com/channels/731205301247803413/827141303330406408/852102450822905886
# def get_nonnative_item_sprite(game):
# game_to_id = {
# "Factorio": 0x09, # Hammer
# "Hollow Knight": 0x21, # Bug Catching Net
# "Minecraft": 0x13, # Shovel
# }
# return game_to_id.get(game, 0x6B) # default to Power Star
def patch_rom(world, rom, player, team, enemized):
local_random = world.slot_seeds[player]
@ -1730,7 +1735,7 @@ def write_custom_shops(rom, world, player):
item_game = 'Factorio'
elif item_name in mc_lookup.values():
item_game = 'Minecraft'
else:
else:
item_game = 'Generic'
item_code = get_nonnative_item_sprite(item_game)
else: