summaryrefslogtreecommitdiff
path: root/mm/2s2h/Rando/Menu.cpp
diff options
context:
space:
mode:
authorCaladius <Caladius@users.noreply.github.com>2025-10-30 11:49:39 -0400
committerGitHub <noreply@github.com>2025-10-30 11:49:39 -0400
commitc91588d8af126f68f032b65e552f6d8a029ded22 (patch)
tree2f86291b5a742841967a710cd4dd130117f3a5bb /mm/2s2h/Rando/Menu.cpp
parent84f3aedf609b2795f3ba39612312a948be97fb8b (diff)
[Rando] Implement Traps (#1287)
* Initial Trap Implementation with 1 Trap Example. * New TrapTypes and Per Trap Custom Messages * Spruce up Menu and add placeholders for toggling traps * Reordering and clean up * Seeded Trap Models * Trap Type Opt-in * Add Jinx Trap * Add Enemy (Like Like) Trap * Fix Shop Item draws and convert for Progressive * Placeholder for Custom Model * Implemented time trap[Please Squash this] (#13) * Implemented time trap * Finished comment because im braindead today * Forgot to fix indentation(whoops) * Changed things not mess with the games code, added some more Time Trap messages * Removed a include I forgot to yoink from the base code. * Removed header define for VerifyTimeSkip * Clangit * Missed some leftovers from a merge conflict. * Clang format throwing a fit over a empty line * Added Timeskip CVar placeholder * Fixed issue where game crashes past midnight * Added Moonfall skipping prevention messures. * Added fallback loop to handle the remaining cycles in the event of a overflow. * Cleaner implementation * Keep it simple stupid * changed function name to be more accurate * Removed outdated comment, used TimeSkipInc for moonfall skip prevention * Reverted max trap(accidentally pushed it while testing) * Removed old unused value * Reduced the iteration by 1 to be closer to where it was at before. * Will this fix Windows? * Added TRAP_TIME to trapToCvarMap * Corrected typo on comment * Clangit...again * Added calls to load environment values and adjust the weather. * Update Time Trap and clean up code * Add Flash effect to Time Trap * Added a few more timeTrapMessages * I hate you clang format * Fix Trading Post Kick Out Time * Added map for all locations I can think of that close. * Clangit yet again * Removed Inn handling because the edge case related to it closing cannot happen * Corrected a whoopie I made when I was dealing with a conflict * Removed pointless condition check that is always true * Removed duped variable * Removed unnecessary data from SCENE_8ITEMSHO kickout entry * Removed now used TRADING_POS_ACTOR_PARAM --------- Co-authored-by: Caladius <clatini88@gmail.com> * Comment out Kick Out code for later TODO * Clean out commented code * Adds Wallet Trap and updates some tooltips * More Trap Messages * Even more trap messages * moooooore messages * update for clang * Feedback changes for Time Trap * Update Trap functions * Fix Matrix call * Trap Model Import (Thanks Zrc) * rename * Adjust size * update name for uniformity * Update mm/2s2h/Rando/MiscBehavior/Traps.cpp Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * Update mm/2s2h/Rando/MiscBehavior/Traps.cpp Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com> * feedback updates * Update notifications to remove color codes from trap messages when item skip is on * VBify Object Dependency * Fix comma * fix headers * Refactor ObjectDependency hook * Check if item get cutscenes are being skipped * Use brackets for LUS include * Header update --------- Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com> Co-authored-by: Eblo <7004497+Eblo@users.noreply.github.com>
Diffstat (limited to 'mm/2s2h/Rando/Menu.cpp')
-rw-r--r--mm/2s2h/Rando/Menu.cpp66
1 files changed, 58 insertions, 8 deletions
diff --git a/mm/2s2h/Rando/Menu.cpp b/mm/2s2h/Rando/Menu.cpp
index b5fc784c2..4f489d03a 100644
--- a/mm/2s2h/Rando/Menu.cpp
+++ b/mm/2s2h/Rando/Menu.cpp
@@ -290,6 +290,14 @@ static void DrawItemsTab() {
CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
CVarCheckbox("Infinite Upgrades", "gPlaceholderBool",
CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
+ CVarCheckbox("Song of Double Time", "gPlaceholderBool",
+ CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
+ CVarCheckbox("Inverted Song of Time", "gPlaceholderBool",
+ CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
+ CVarCheckbox("Saria's Song", "gPlaceholderBool",
+ CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
+ CVarCheckbox("Sun's Song", "gPlaceholderBool",
+ CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
ImGui::EndChild();
ImGui::SameLine();
ImGui::BeginChild("randoItemsColumn2", ImVec2(columnWidth, ImGui::GetContentRegionAvail().y));
@@ -313,14 +321,56 @@ static void DrawItemsTab() {
ImGui::EndChild();
ImGui::SameLine();
ImGui::BeginChild("randoItemsColumn3", ImVec2(columnWidth, ImGui::GetContentRegionAvail().y));
- CVarCheckbox("Song of Double Time", "gPlaceholderBool",
- CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
- CVarCheckbox("Inverted Song of Time", "gPlaceholderBool",
- CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
- CVarCheckbox("Saria's Song", "gPlaceholderBool",
- CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
- CVarCheckbox("Sun's Song", "gPlaceholderBool",
- CheckboxOptions({ { .disabled = true, .disabledTooltip = "Coming Soon" } }));
+ CVarCheckbox("Shuffle Traps", Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar,
+ CheckboxOptions({ { .tooltip = "Ice Trap time!" } }));
+ CVarSliderInt(
+ "##trapcount", Rando::StaticData::Options[RO_TRAP_AMOUNT].cvar,
+ IntSliderOptions({ { .tooltip = "How many Traps are shuffled into the Item Pool.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } })
+ .LabelPosition(LabelPosition::None)
+ .Color(UIWidgets::Colors(CVarGetInteger("gSettings.Menu.Theme", 5)))
+ .Format("Traps: %i")
+ .Min(1)
+ .Max(10)
+ .DefaultValue(5));
+ ImGui::SeparatorText("Toggle Trap Types");
+ CVarCheckbox(
+ "Freeze Traps", "gRando.Traps.Freeze",
+ CheckboxOptions({ { .tooltip = "Freezes Link in place.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox(
+ "Blast Traps", "gRando.Traps.Blast",
+ CheckboxOptions({ { .tooltip = "Link explodes with Powder Keg force.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox(
+ "Shock Traps", "gRando.Traps.Shock",
+ CheckboxOptions({ { .tooltip = "Shocks Link for a few seconds.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox(
+ "Jinx Traps", "gRando.Traps.Jinx",
+ CheckboxOptions({ { .tooltip = "Afflicts Link with Jinx.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox(
+ "Wallet Traps", "gRando.Traps.Wallet",
+ CheckboxOptions({ { .tooltip = "Links rupees scatter around him.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox( // This only spawns a Like Like, more enemies may be added in the future but each would need fine
+ // tuning
+ "Like Like Traps", "gRando.Traps.Enemy",
+ CheckboxOptions({ { .tooltip = "Spawns a Like Like on top of Link.",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
+ CVarCheckbox(
+ "Time Traps", "gRando.Traps.Time",
+ CheckboxOptions({ { .tooltip = "Advances Time 90 Minutes (Game Time).",
+ .disabled = (bool)!CVarGetInteger(Rando::StaticData::Options[RO_SHUFFLE_TRAPS].cvar, 0),
+ .disabledTooltip = "Shuffle Traps is disabled." } }));
ImGui::EndChild();
}