Skip to content

Commit

Permalink
Add an empty array as default for hints and cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanatosGit committed Nov 23, 2023
1 parent 6845629 commit f079f59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 39 deletions.
3 changes: 2 additions & 1 deletion open_samus_returns_rando/files/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@
"accesspoint_actor",
"text"
]
}
},
"default": []
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Game.ImportLibraryWithName("actors/props/usable/scripts/usable.lua", "Usable")
ChozoSeal = {}
ChozoSeal = ChozoSeal or {}
setmetatable(ChozoSeal, {__index = Usable})

ChozoSeal.CurrentHintStrings = nil
Expand Down
38 changes: 1 addition & 37 deletions open_samus_returns_rando/specific_patches/chozo_seal_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,49 +43,13 @@ def patch_dna_check(editor: PatcherEditor):
# blinks with all DNA...which is maybe not really a good thing / sign?
systemmechdna.raw["components"]["USABLE"] = save_station_bmsad.raw["components"]["USABLE"]

# TODO: Filter the areas which really have a chozoseal instead of using all
all_pkgs = editor.get_all_level_pkgs()
editor.add_new_asset(
"actors/props/chozoseal/scripts/chozoseal.lc",
b'',
all_pkgs
[]
)
editor.replace_asset(file_name, systemmechdna)


# TODO: Remove if not required
# def test(editor: PatcherEditor):
# # PLATFORMS = {
# # "s000_surface": ["LE_Platform_ChozoUnlockAreaDNA"],
# # "s010_area1": ["LE_Platform_ChozoUnlockAreaDNA"]
# # }
# SEAL = {
# "s000_surface": ["LE_ChozoUnlockAreaDNA"]
# }
# TRIGGER = {
# "s010_area1": ["TG_Activation_DNA"]
# }
# # for area_name, chozo_seals in PLATFORMS.items():
# # scenario = editor.get_scenario(area_name)
# # for chozo_seal in chozo_seals:
# # actor = scenario.raw.actors[10][chozo_seal]
# # actor["components"][0]["arguments"][0]["value"] = False
# # actor["components"][0]["arguments"][4]["value"] = "LE_EnergyCharge"
# # actor["components"][0]["arguments"][5]["value"] = "usestationinit"
# # actor["components"][0]["arguments"][5]["value"] = "useinit"
# # actor["components"][0]["arguments"][6]["value"] = "usestationend"
# for area_name, chozo_seals in SEAL.items():
# scenario = editor.get_scenario(area_name)
# for chozo_seal in chozo_seals:
# actor = scenario.raw.actors[16][chozo_seal]
# actor["components"][0]["arguments"][0]["value"] = 0
# actor["components"][0]["arguments"][1]["value"] = ""
# for area_name, chozo_seals in TRIGGER.items():
# scenario = editor.get_scenario(area_name)
# for chozo_seal in chozo_seals:
# actor = scenario.raw.actors[0][chozo_seal]
# actor["components"][0]["arguments"][8]["value"] = False

def patch_chozo_seals(editor: PatcherEditor):
patch_dna_check(editor)
# test(editor)

0 comments on commit f079f59

Please sign in to comment.