Skip to content

Commit

Permalink
Only update inventory if lauchers > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron committed Jun 23, 2024
1 parent f44bf47 commit 6489bba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/open_samus_returns_rando/lua_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _create_custom_init(self, editor: PatcherEditor, configuration: dict) -> str
("ITEM_WEAPON_POWER_BOMB", "ITEM_POWER_BOMB_TANKS"),
]
for launcher, tanks in LAUNCHER_TANK_MAPPING:
if inventory.get(launcher) and tanks in inventory:
if launcher in inventory and inventory[launcher] > 0 and tanks in inventory:
ammo_max = "ITEM_WEAPON_" + tanks[5:].replace("TANKS", "MAX")
inventory[ammo_max] = inventory.pop(tanks)

Expand Down

0 comments on commit 6489bba

Please sign in to comment.