diff --git a/images/items/bottle_bee.png b/images/items/bottle_bee.png new file mode 100644 index 0000000..51e2c12 Binary files /dev/null and b/images/items/bottle_bee.png differ diff --git a/images/items/bottle_blue.png b/images/items/bottle_blue.png new file mode 100644 index 0000000..6473fdc Binary files /dev/null and b/images/items/bottle_blue.png differ diff --git a/images/items/bottle_empty.png b/images/items/bottle_empty.png new file mode 100644 index 0000000..d5c18cc Binary files /dev/null and b/images/items/bottle_empty.png differ diff --git a/images/items/bottle_fairy.png b/images/items/bottle_fairy.png new file mode 100644 index 0000000..1675a06 Binary files /dev/null and b/images/items/bottle_fairy.png differ diff --git a/images/items/bottle_goodbee.png b/images/items/bottle_goodbee.png new file mode 100644 index 0000000..5ddc0df Binary files /dev/null and b/images/items/bottle_goodbee.png differ diff --git a/images/items/bottle_green.png b/images/items/bottle_green.png new file mode 100644 index 0000000..526c517 Binary files /dev/null and b/images/items/bottle_green.png differ diff --git a/images/items/bottle_red.png b/images/items/bottle_red.png new file mode 100644 index 0000000..04f1b52 Binary files /dev/null and b/images/items/bottle_red.png differ diff --git a/items/items.json b/items/items.json index 9f355f5..9744aaa 100644 --- a/items/items.json +++ b/items/items.json @@ -296,6 +296,142 @@ } ] }, + { + "name": "Bottle 1", + "type": "progressive", + "allow_disabled": "false", + "loop": true, + "stages": [ + { + "img": "images/items/bottle_empty.png", + "img_mods": "@disabled" + }, + { + "img": "images/items/bottle_empty.png", + "codes": "bottle0,bottle" + }, + { + "img": "images/items/bottle_red.png" + }, + { + "img": "images/items/bottle_green.png" + }, + { + "img": "images/items/bottle_blue.png" + }, + { + "img": "images/items/bottle_fairy.png" + }, + { + "img": "images/items/bottle_bee.png" + }, + { + "img": "images/items/bottle_goodbee.png" + } + ] + }, + { + "name": "Bottle 2", + "type": "progressive", + "allow_disabled": "false", + "loop": true, + "stages": [ + { + "img": "images/items/bottle_empty.png", + "img_mods": "@disabled" + }, + { + "img": "images/items/bottle_empty.png", + "codes": "bottle1,bottle" + }, + { + "img": "images/items/bottle_red.png" + }, + { + "img": "images/items/bottle_green.png" + }, + { + "img": "images/items/bottle_blue.png" + }, + { + "img": "images/items/bottle_fairy.png" + }, + { + "img": "images/items/bottle_bee.png" + }, + { + "img": "images/items/bottle_goodbee.png" + } + ] + }, + { + "name": "Bottle 3", + "type": "progressive", + "allow_disabled": "false", + "loop": true, + "stages": [ + { + "img": "images/items/bottle_empty.png", + "img_mods": "@disabled" + }, + { + "img": "images/items/bottle_empty.png", + "codes": "bottle2,bottle" + }, + { + "img": "images/items/bottle_red.png" + }, + { + "img": "images/items/bottle_green.png" + }, + { + "img": "images/items/bottle_blue.png" + }, + { + "img": "images/items/bottle_fairy.png" + }, + { + "img": "images/items/bottle_bee.png" + }, + { + "img": "images/items/bottle_goodbee.png" + } + ] + }, + { + "name": "Bottle 4", + "type": "progressive", + "allow_disabled": "false", + "loop": true, + "stages": [ + { + "img": "images/items/bottle_empty.png", + "img_mods": "@disabled" + }, + { + "img": "images/items/bottle_empty.png", + "codes": "bottle3,bottle" + }, + { + "img": "images/items/bottle_red.png" + }, + { + "img": "images/items/bottle_green.png" + }, + { + "img": "images/items/bottle_blue.png" + }, + { + "img": "images/items/bottle_fairy.png" + }, + { + "img": "images/items/bottle_bee.png" + }, + { + "img": "images/items/bottle_goodbee.png" + } + ] + }, // Somaria { "name": "Cane of Somaria", diff --git a/layouts/broadcast.json b/layouts/broadcast.json index ba2dd91..984f866 100644 --- a/layouts/broadcast.json +++ b/layouts/broadcast.json @@ -36,7 +36,7 @@ "armor" ], [ - "bottle", + "", "somaria", "byrna", "cape", @@ -69,6 +69,16 @@ "item": "mushroom_used", "width": 24, "margin": "88,18,0,0" + }, + { + "type": "itemgrid", + "item_size": 16, + "item_margin": "0,1", + "margin": "-101,65,0,0", + "rows":[ + [ "bottle0", "bottle1" ], + [ "bottle2", "bottle3" ] + ] } ] }, diff --git a/layouts/shared_base.json b/layouts/shared_base.json index 710a2d4..d23a1fe 100644 --- a/layouts/shared_base.json +++ b/layouts/shared_base.json @@ -1,50 +1,66 @@ { "shared_item_grid": { - "type": "itemgrid", - "h_alignment": "center", - "item_margin": "1,2", - "item_size": 42, - "rows": [ - [ - "bow", - "boomerang_red", - "hookshot", - "bombs", - "powder_used", - "mushroom_used", - "boots", - "owsword" - ], - [ - "firerod", - "icerod", - "bombos", - "ether", - "quake", - "halfmagic", - "lift1", - "shield" - ], - [ - "lamp", - "hammer", - "ocarina", - "net", - "book", - "shovel_used", - "flippers", - "armor" - ], - [ - "bottle", - "somaria", - "byrna", - "cape", - "mirror", - "agas", - "moonpearl", - "gomode" - ] + "type": "container", + "margin": 0, + "content": [ + { + "type": "itemgrid", + "h_alignment": "center", + "item_margin": "1,2", + "item_size": 42, + "rows": [ + [ + "bow", + "boomerang_red", + "hookshot", + "bombs", + "powder_used", + "mushroom_used", + "boots", + "owsword" + ], + [ + "firerod", + "icerod", + "bombos", + "ether", + "quake", + "halfmagic", + "lift1", + "shield" + ], + [ + "lamp", + "hammer", + "ocarina", + "net", + "book", + "shovel_used", + "flippers", + "armor" + ], + [ + "", + "somaria", + "byrna", + "cape", + "mirror", + "agas", + "moonpearl", + "gomode" + ] + ] + }, + { + "type": "itemgrid", + "item_size": 21, + "item_margin": "0,1", + "margin": "-153,72,0,0", + "rows":[ + [ "bottle0", "bottle1" ], + [ "bottle2", "bottle3" ] + ] + } ] }, "shared_pendant_grid": { diff --git a/scripts/auto/itemupdates.lua b/scripts/auto/itemupdates.lua index 3ce6833..a0b92c2 100644 --- a/scripts/auto/itemupdates.lua +++ b/scripts/auto/itemupdates.lua @@ -99,16 +99,15 @@ function updateFlute(segment) end function updateBottles(segment) - local item = Tracker:FindObjectForCode("bottle") - local count = 0 for i = 0, 3, 1 do - if segment:ReadUInt8(0x7ef35c + i) > 0 then - count = count + 1 + local item = Tracker:FindObjectForCode("bottle"..i) + local contents = segment:ReadUInt8(0x7ef35c + i) + if contents == 0 then + item.CurrentStage = 0 + else + item.CurrentStage = contents - 1 end end - if count > item.CurrentStage or not STATUS.AutotrackerInGame then - item.CurrentStage = count - end end function updateBatIndicatorStatus(status)