From 7e54a9d8f9be4b940b5583b95a8b4e6db2c7fa6c Mon Sep 17 00:00:00 2001 From: Tacoman369 <90735287+Tacoman369@users.noreply.github.com> Date: Tue, 28 May 2024 18:00:10 -0500 Subject: [PATCH] properfix (#70) correctly implements startingNotebook and spoiler data fixes for Tingle's Ranch Map in Snowhead --- code/include/rnd/settings.h | 1 + code/source/rnd/savefile.cpp | 5 +++++ code/source/rnd/spoiler_data.cpp | 14 +++++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/code/include/rnd/settings.h b/code/include/rnd/settings.h index d3867e8a..518498aa 100644 --- a/code/include/rnd/settings.h +++ b/code/include/rnd/settings.h @@ -326,6 +326,7 @@ namespace rnd { u8 startingConsumables; u8 startingMaxRupees; + u8 startingNotebook; u8 startingOcarina; u8 startingHerosBow; u8 startingFireArrows; diff --git a/code/source/rnd/savefile.cpp b/code/source/rnd/savefile.cpp index e51fe302..79766aaa 100644 --- a/code/source/rnd/savefile.cpp +++ b/code/source/rnd/savefile.cpp @@ -776,6 +776,11 @@ namespace rnd { if (gSettingsContext.startingSpinSettting == (u8)StartingSpinSetting::STARTINGSPIN_GREAT) { saveData.has_great_spin_0x02 = 2; } + + //Starting Notebook + if(gSettingsContext.startingNotebook > 0) { + saveData.inventory.collect_register.bombers_notebook = 1; + } } void SaveFile_ResetItemSlotsIfMatchesID(u8 itemSlot) { diff --git a/code/source/rnd/spoiler_data.cpp b/code/source/rnd/spoiler_data.cpp index b34859fe..ce010515 100644 --- a/code/source/rnd/spoiler_data.cpp +++ b/code/source/rnd/spoiler_data.cpp @@ -132,14 +132,22 @@ namespace rnd { if ((scene == 0x5E) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { SpoilerData_UpdateMultiLocations(type, 0x22, flag); } - // Ranch Tingle Ranch Map > Snowhead Tingle Snowhead Map (Winter) - if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { + // Snowhead Tingle Ranch Map (Winter) > Snowhead Tingle Ranch Map (Spring) + if ((scene == 0x5D) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { SpoilerData_UpdateMultiLocations(type, 0x5E, flag); } - // Ranch Tingle Ranch Map > Snowhead Tingle Snowhead Map (Spring) + // Snowhead Tingle Ranch Map (Spring) > Snowhead Tingle Ranch Map (Winter) + if ((scene == 0x5E) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { + SpoilerData_UpdateMultiLocations(type, 0x5D, flag); + } + // Ranch Tingle Ranch Map > Snowhead Tingle Ranch Map (Winter) if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { SpoilerData_UpdateMultiLocations(type, 0x5D, flag); } + // Ranch Tingle Ranch Map > Snowhead Tingle Ranch Map (Spring) + if ((scene == 0x22) && (flag == 0xB7) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { + SpoilerData_UpdateMultiLocations(type, 0x5E, flag); + } // Ranch Tingle Great Bay Map > Great Bay Tingle Great Bay Map if ((scene == 0x22) && (flag == 0xB8) && (type == ItemOverride_Type::OVR_BASE_ITEM)) { SpoilerData_UpdateMultiLocations(type, 0x37, flag);