Skip to content

Commit

Permalink
fixed items in furniture crashing again
Browse files Browse the repository at this point in the history
  • Loading branch information
MelonSpeedruns committed Nov 28, 2024
1 parent c1270ac commit 33f8e9d
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions worlds/luigismansion/Patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ def __get_key_name(door_id):
return "key01"

def update_item_info_table(item_info_table_entry, output_data):
item_info_table_entry.info_file_field_entries.clear()
#item_info_table_entry.info_file_field_entries.clear()

__add_info_item(item_info_table_entry, "nothing")
#__add_info_item(item_info_table_entry, "nothing")

# For every key found in the generation output, add an entry for it in "iteminfotable".
for item_name, item_data in output_data["Locations"].items():
Expand All @@ -138,28 +138,28 @@ def update_item_info_table(item_info_table_entry, output_data):
})

# Add the rest of the items that can spawn in the game, so they can be spawned from treasure chests or furniture.
__add_info_item(item_info_table_entry, "money")
#__add_info_item(item_info_table_entry, "money")
__add_info_item(item_info_table_entry, "rdiamond")

__add_info_item(item_info_table_entry, "sheart", 10, 0)
__add_info_item(item_info_table_entry, "mheart", 20, 0)
__add_info_item(item_info_table_entry, "lheart", 50, 0)
#__add_info_item(item_info_table_entry, "sheart", 10, 0)
#__add_info_item(item_info_table_entry, "mheart", 20, 0)
#__add_info_item(item_info_table_entry, "lheart", 50, 0)

__add_info_item(item_info_table_entry, "move_sheart", 10, 1)
__add_info_item(item_info_table_entry, "move_mheart", 20, 1)
__add_info_item(item_info_table_entry, "move_lheart", 50, 1)
#__add_info_item(item_info_table_entry, "move_sheart", 10, 1)
#__add_info_item(item_info_table_entry, "move_mheart", 20, 1)
#__add_info_item(item_info_table_entry, "move_lheart", 50, 1)

__add_info_item(item_info_table_entry, "mkinoko")
#__add_info_item(item_info_table_entry, "mkinoko")
__add_info_item(item_info_table_entry, "itembomb")

__add_info_item(item_info_table_entry, "elffst")
__add_info_item(item_info_table_entry, "elwfst")
__add_info_item(item_info_table_entry, "elifst")
#__add_info_item(item_info_table_entry, "elffst")
#__add_info_item(item_info_table_entry, "elwfst")
#__add_info_item(item_info_table_entry, "elifst")

__add_info_item(item_info_table_entry, "mcap")
__add_info_item(item_info_table_entry, "mletter")
__add_info_item(item_info_table_entry, "mshoes")
__add_info_item(item_info_table_entry, "mglove")
#__add_info_item(item_info_table_entry, "mcap")
#__add_info_item(item_info_table_entry, "mletter")
#__add_info_item(item_info_table_entry, "mshoes")
#__add_info_item(item_info_table_entry, "mglove")
__add_info_item(item_info_table_entry, "mstar")

def __add_info_item(item_info_table_entry, item_name, hp_amount = 0, is_escape = 0):
Expand Down Expand Up @@ -377,8 +377,6 @@ def update_key_info(key_info_entry, output_data):

def update_furniture_info(furniture_info_entry, item_appear_table_entry, output_data):
for x in furniture_info_entry.info_file_field_entries:
x["item_table"] = 0

# If any of the arguments are used in the Study bookshelves / reading books, disable this.
if x["arg0"] in {101, 102, 103, 104, 105, 106}:
x["arg0"] = 0.0
Expand Down

0 comments on commit 33f8e9d

Please sign in to comment.