mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-23 05:59:40 +00:00
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>
This commit is contained in:
parent
941b48b802
commit
50bc007d46
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user