diff options
| author | balloondude2 <55861555+balloondude2@users.noreply.github.com> | 2024-10-30 22:37:24 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 00:37:24 -0400 |
| commit | 50bc007d465980a03a4d703f458fab629f0bd1f7 (patch) | |
| tree | 9f3eab170cda507b9fee1858b3e16e7c46dafd2b /mm/2s2h/DeveloperTools/SaveEditor.cpp | |
| parent | 941b48b802445898a1fb057ccdd9297d4abf1f1b (diff) | |
Adds an option to the save editor to invert Stone Tower (#812)
* add option to invert st in save editor
* only allow inverting in stone tower scenes
* change tooltip to disabledTooltip
Co-authored-by: Archez <Archez@users.noreply.github.com>
---------
Co-authored-by: Archez <Archez@users.noreply.github.com>
Diffstat (limited to 'mm/2s2h/DeveloperTools/SaveEditor.cpp')
| -rw-r--r-- | mm/2s2h/DeveloperTools/SaveEditor.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mm/2s2h/DeveloperTools/SaveEditor.cpp b/mm/2s2h/DeveloperTools/SaveEditor.cpp index 1853abe3d..4904fba28 100644 --- a/mm/2s2h/DeveloperTools/SaveEditor.cpp +++ b/mm/2s2h/DeveloperTools/SaveEditor.cpp @@ -217,6 +217,8 @@ void UpdateGameTime(u16 gameTime) { void DrawTempleClears() { bool cleared; bool open; + bool inverted = false; + bool inStoneTower = false; // Woodfall cleared = CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE); @@ -302,7 +304,6 @@ void DrawTempleClears() { } // Stone Tower - // Stone Tower Temple is always open so there is no need to have an option to open it. cleared = CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE); if (UIWidgets::Checkbox("Stone Tower cleared", &cleared)) { if (cleared) { @@ -311,6 +312,22 @@ void DrawTempleClears() { CLEAR_WEEKEVENTREG(WEEKEVENTREG_CLEARED_STONE_TOWER_TEMPLE); } } + + if (gPlayState != NULL) { + inStoneTower = Play_GetOriginalSceneId(gPlayState->sceneId) == SCENE_F40; + inverted = Flags_GetSwitch(gPlayState, 20); + } + + ImGui::SameLine(); + + if (UIWidgets::Checkbox("Stone Tower Inverted", &inverted, + { .disabled = !inStoneTower, .disabledTooltip = "Can only invert while in Stone Tower" })) { + if (inverted) { + Flags_SetSwitch(gPlayState, 20); + } else { + Flags_UnsetSwitch(gPlayState, 20); + } + } } void DrawGeneralTab() { |
