mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-21 17:05:04 -05:00
[Fixes] Fix Raised Floor Switches (#3851)
* Lower by 1 * gEnhancements. * Update z_obj_switch.c Co-authored-by: Archez <Archez@users.noreply.github.com> * Moved to Hook * Properly this time * Added to presets * Added a Return; * Use Hex Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com> --------- Co-authored-by: Archez <Archez@users.noreply.github.com> Co-authored-by: inspectredc <78732756+inspectredc@users.noreply.github.com> Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
parent
a8d3724a53
commit
4599212546
@ -23,6 +23,7 @@
|
||||
#include "src/overlays/actors/ovl_En_Tp/z_en_tp.h"
|
||||
#include "src/overlays/actors/ovl_En_Firefly/z_en_firefly.h"
|
||||
#include "src/overlays/actors/ovl_En_Xc/z_en_xc.h"
|
||||
#include "src/overlays/actors/ovl_Obj_Switch/z_obj_switch.h"
|
||||
#include "objects/object_link_boy/object_link_boy.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
|
||||
@ -1359,6 +1360,23 @@ void RegisterToTMedallions() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
void RegisterFloorSwitchesHook() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorInit>([](void* refActor) {
|
||||
Actor* actor = static_cast<Actor*>(refActor);
|
||||
if (actor->id != ACTOR_OBJ_SWITCH || !CVarGetInteger("gEnhancements.FixFloorSwitches", 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ObjSwitch* switchActor = reinterpret_cast<ObjSwitch*>(actor);
|
||||
s32 type = (switchActor->dyna.actor.params & 7);
|
||||
|
||||
if (switchActor->dyna.actor.params == 0x1200 || switchActor->dyna.actor.params == 0x3A00) {
|
||||
switchActor->dyna.actor.world.pos.y -= 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void RegisterPauseMenuHooks() {
|
||||
static bool pauseWarpHooksRegistered = false;
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>([&]() {
|
||||
@ -1411,6 +1429,7 @@ void InitMods() {
|
||||
RegisterOpenAllHours();
|
||||
RegisterToTMedallions();
|
||||
NameTag_RegisterHooks();
|
||||
RegisterFloorSwitchesHook();
|
||||
RegisterPatchHandHandler();
|
||||
RegisterHurtContainerModeHandler();
|
||||
RegisterPauseMenuHooks();
|
||||
|
@ -270,6 +270,7 @@ const std::vector<const char*> enhancementsCvars = {
|
||||
"gEnhancements.ResetNaviTimer",
|
||||
"gEnhancements.ScaleAdultEquimentAsChild",
|
||||
"gEnhancements.SwordToggle",
|
||||
"gEnhancements.FixFloorSwitches",
|
||||
"gFixZoraHintDialogue",
|
||||
"gHurtContainer",
|
||||
"gPauseWarp",
|
||||
@ -543,6 +544,8 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
|
||||
PRESET_ENTRY_S32("gNaviTextFix", 1),
|
||||
// Extend Silver Rupee Jingle
|
||||
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
|
||||
// Fix some Floor Switches
|
||||
PRESET_ENTRY_S32("gEnhancements.FixFloorSwitches", 1),
|
||||
|
||||
// Red Ganon blood
|
||||
PRESET_ENTRY_S32("gRedGanonBlood", 1),
|
||||
@ -614,6 +617,8 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
|
||||
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
|
||||
// Fix enemies not spawning on ground over water
|
||||
PRESET_ENTRY_S32("gEnemySpawnsOverWaterboxes", 1),
|
||||
// Fix some Floor Switches
|
||||
PRESET_ENTRY_S32("gEnhancements.FixFloorSwitches", 1),
|
||||
|
||||
// Red Ganon blood
|
||||
PRESET_ENTRY_S32("gRedGanonBlood", 1),
|
||||
@ -736,6 +741,8 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
|
||||
PRESET_ENTRY_S32("gNaviTextFix", 1),
|
||||
// Extend Silver Rupee Jingle
|
||||
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
|
||||
// Fix some Floor Switches
|
||||
PRESET_ENTRY_S32("gEnhancements.FixFloorSwitches", 1),
|
||||
|
||||
// Red Ganon blood
|
||||
PRESET_ENTRY_S32("gRedGanonBlood", 1),
|
||||
|
@ -1252,6 +1252,9 @@ void DrawEnhancementsMenu() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fix Darunia dancing too fast", "gEnhancements.FixDaruniaDanceSpeed",
|
||||
true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Fixes Darunia's dancing speed so he dances to the beat of Saria's Song, like in vanilla.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fix raised Floor Switches", "gEnhancements.FixFloorSwitches", true, false);
|
||||
UIWidgets::Tooltip("Fixes the two raised floor switches, the one in Forest Temple Basement and the one at the top of Fire Temple. \n"
|
||||
"This will lower them, making activating them easier");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fix Zora hint dialogue", "gFixZoraHintDialogue", true, false);
|
||||
UIWidgets::Tooltip("Fixes one Zora's dialogue giving a hint about bringing Ruto's Letter to King Zora to properly occur before moving King Zora rather than after");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user