Skip to content

Commit

Permalink
changed capture layout
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Hamsda committed Apr 17, 2019
1 parent 26c5c23 commit fc6f1de
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 6 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions ootrando_overworldmap_hamsda/items/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
19 changes: 15 additions & 4 deletions ootrando_overworldmap_hamsda/layouts/capture.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"bluetunic"
],
[
"HP",
"HC",
"rupee",
"bottle4",
"bottlecapture",
"rutocapture",
"",
"",
"adulttrade",
"kidtrade",
"scale1",
Expand All @@ -69,6 +69,17 @@
"nocturne",
"prelude",
"card",
"agony",
"icetrap"
],
[
"",
"",
"",
"",
"HP",
"HC",
"rupee",
"generic_small_key",
"generic_boss_key"
]
Expand Down
35 changes: 33 additions & 2 deletions ootrando_overworldmap_hamsda/scripts/update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ function update_smallkeys()
end
end



vanilla_captures = {
["setting_shuffle_sword1_yes"] = {
["@Kokiri Sword Chest/Dodge Boulder"] = "sword1"
Expand All @@ -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)
Expand All @@ -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

0 comments on commit fc6f1de

Please sign in to comment.