diff --git a/changelog.md b/changelog.md index 0d4bb5ab..45bd662a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## x + +- changed capture layout + - added an extra line for a bit more space + - added ice traps and stone of agony + - changed bottles to automatically fill the first available bottle slot + ## 2.3.3.5 - fixed Forest Temple outdoor west GS with hookshot from floormaster chest diff --git a/ootrando_overworldmap_hamsda/items/items.json b/ootrando_overworldmap_hamsda/items/items.json index 3b853a7e..e1ef8763 100644 --- a/ootrando_overworldmap_hamsda/items/items.json +++ b/ootrando_overworldmap_hamsda/items/items.json @@ -678,5 +678,17 @@ "codes": "ruto,rutosletter", } ], + }, + { + "name": "Bottle", + "type": "toggle", + "img": "images/bottle.png", + "codes": "bottlecapture" + }, + { + "name": "Rutos Letter", + "type": "toggle", + "img": "images/bottle_letter.png", + "codes": "rutocapture" } ] \ No newline at end of file diff --git a/ootrando_overworldmap_hamsda/layouts/capture.json b/ootrando_overworldmap_hamsda/layouts/capture.json index c29bd8bb..806f5d6e 100644 --- a/ootrando_overworldmap_hamsda/layouts/capture.json +++ b/ootrando_overworldmap_hamsda/layouts/capture.json @@ -40,10 +40,10 @@ "bluetunic" ], [ - "HP", - "HC", - "rupee", - "bottle4", + "bottlecapture", + "rutocapture", + "", + "", "adulttrade", "kidtrade", "scale1", @@ -69,6 +69,17 @@ "nocturne", "prelude", "card", + "agony", + "icetrap" + ], + [ + "", + "", + "", + "", + "HP", + "HC", + "rupee", "generic_small_key", "generic_boss_key" ] diff --git a/ootrando_overworldmap_hamsda/scripts/update.lua b/ootrando_overworldmap_hamsda/scripts/update.lua index ed524f82..0bea1225 100644 --- a/ootrando_overworldmap_hamsda/scripts/update.lua +++ b/ootrando_overworldmap_hamsda/scripts/update.lua @@ -53,6 +53,8 @@ function update_smallkeys() end end + + vanilla_captures = { ["setting_shuffle_sword1_yes"] = { ["@Kokiri Sword Chest/Dodge Boulder"] = "sword1" @@ -71,11 +73,9 @@ vanilla_captures = { settings_cache = {} function update_captures() for setting,captures in pairs(vanilla_captures) do - local has_setting = has(setting) if not settings_cache[setting] or settings_cache[setting] ~= has_setting then settings_cache[setting] = has_setting - for location,item in pairs(captures) do local location_object = Tracker:FindObjectForCode(location) local item_object = Tracker:FindObjectForCode(item) @@ -91,7 +91,38 @@ function update_captures() end end + + +capture_bottle_mapping = { + ["bottlecapture"] = 1, + ["rutocapture"] = 2 +} +function find_first_free_bottle() + for i=1,4 do + local bottle = Tracker:FindObjectForCode("bottle"..i) + if bottle and bottle.CurrentStage == 0 then + return bottle + end + end + return nil +end +function check_capture_bottles() + for code,stage in pairs(capture_bottle_mapping) do + local capture = Tracker:FindObjectForCode(code) + if capture and capture.Active then + capture.Active = false + local bottle = find_first_free_bottle() + if bottle then + bottle.CurrentStage = stage + end + end + end +end + + + function tracker_on_accessibility_updated() update_smallkeys() update_captures() + check_capture_bottles() end \ No newline at end of file