mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 10:52:19 -05:00
Add glitch practice cheats (#2570)
* Add fish don't despawn cheat * Add bugs don't despawn cheat * Add bomb timer multiplier cheat * Only do float logic when multiplier isn't 1 * Move don't despawn cheats and fix capitalization * Fix LUS commit change * Re-add the bomb timer multiplier slider * Add cvars to cheatCvars
This commit is contained in:
parent
8872a59284
commit
d06e6af306
@ -262,6 +262,9 @@ const std::vector<const char*> cheatCvars = {
|
|||||||
"gSwitchAge",
|
"gSwitchAge",
|
||||||
"gSwitchTimeline",
|
"gSwitchTimeline",
|
||||||
"gNoRedeadFreeze",
|
"gNoRedeadFreeze",
|
||||||
|
"gBombTimerMultiplier",
|
||||||
|
"gNoFishDespawn",
|
||||||
|
"gNoBugsDespawn"
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<const char*> randomizerCvars = {
|
const std::vector<const char*> randomizerCvars = {
|
||||||
|
@ -1170,6 +1170,7 @@ void DrawCheatsMenu() {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false);
|
||||||
UIWidgets::Tooltip("Makes every surface in the game hookshot-able");
|
UIWidgets::Tooltip("Makes every surface in the game hookshot-able");
|
||||||
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.1fx", "##gCheatHookshotReachMultiplier", "gCheatHookshotReachMultiplier", 1.0f, 5.0f, "", 1.0f, false);
|
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.1fx", "##gCheatHookshotReachMultiplier", "gCheatHookshotReachMultiplier", 1.0f, 5.0f, "", 1.0f, false);
|
||||||
|
UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.1fx", "##gBombTimerMultiplier", "gBombTimerMultiplier", 0.1f, 5.0f, "", 1.0f, false);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false);
|
||||||
UIWidgets::Tooltip("Holding L makes you float into the air");
|
UIWidgets::Tooltip("Holding L makes you float into the air");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Super Tunic", "gSuperTunic", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Super Tunic", "gSuperTunic", true, false);
|
||||||
@ -1189,6 +1190,10 @@ void DrawCheatsMenu() {
|
|||||||
UIWidgets::Tooltip("Freezes the time of day");
|
UIWidgets::Tooltip("Freezes the time of day");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", "gDropsDontDie", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", "gDropsDontDie", true, false);
|
||||||
UIWidgets::Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time");
|
UIWidgets::Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time");
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", "gNoFishDespawn", true, false);
|
||||||
|
UIWidgets::Tooltip("Prevents fish from automatically despawning after a while when dropped");
|
||||||
|
UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", "gNoBugsDespawn", true, false);
|
||||||
|
UIWidgets::Tooltip("Prevents bugs from automatically despawning after a while when dropped");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield", true, false);
|
||||||
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
||||||
|
@ -98,6 +98,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
|
|||||||
thisx->colChkInfo.mass = 200;
|
thisx->colChkInfo.mass = 200;
|
||||||
thisx->colChkInfo.cylRadius = 5;
|
thisx->colChkInfo.cylRadius = 5;
|
||||||
thisx->colChkInfo.cylHeight = 10;
|
thisx->colChkInfo.cylHeight = 10;
|
||||||
|
|
||||||
if (!GameInteractor_GetRandomBombFuseTimerActive()) {
|
if (!GameInteractor_GetRandomBombFuseTimerActive()) {
|
||||||
this->timer = 70;
|
this->timer = 70;
|
||||||
} else {
|
} else {
|
||||||
@ -108,6 +109,16 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
|
|||||||
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
||||||
Actor_SetScale(thisx, 0.01f);
|
Actor_SetScale(thisx, 0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CVarGetFloat("gBombTimerMultiplier", 1.0f) != 1.0f) {
|
||||||
|
this->timer = (s32)(70 * CVarGetFloat("gBombTimerMultiplier", 1.0f));
|
||||||
|
// Do the sound and scale immediately if GameInteractor hasn't already.
|
||||||
|
if (!GameInteractor_GetRandomBombFuseTimerActive()) {
|
||||||
|
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
||||||
|
Actor_SetScale(thisx, 0.01f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this->flashSpeedScale = 7;
|
this->flashSpeedScale = 7;
|
||||||
Collider_InitCylinder(play, &this->bombCollider);
|
Collider_InitCylinder(play, &this->bombCollider);
|
||||||
Collider_InitJntSph(play, &this->explosionCollider);
|
Collider_InitJntSph(play, &this->explosionCollider);
|
||||||
@ -255,8 +266,8 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
|
|||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// With random bomb fuse timer, sound effect and scaling is already done on init.
|
// With random bomb fuse timer or gBombTimerMultiplier, sound effect and scaling is already done on init.
|
||||||
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive()) {
|
if (this->timer == 67 && !GameInteractor_GetRandomBombFuseTimerActive() && CVarGetFloat("gBombTimerMultiplier", 1.0f) != 1.0f) {
|
||||||
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
Audio_PlayActorSound2(thisx, NA_SE_PL_TAKE_OUT_SHIELD);
|
||||||
Actor_SetScale(thisx, 0.01f);
|
Actor_SetScale(thisx, 0.01f);
|
||||||
}
|
}
|
||||||
@ -270,7 +281,8 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
|
|||||||
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 15.0f, 0x1F);
|
Actor_UpdateBgCheckInfo(play, thisx, 5.0f, 10.0f, 15.0f, 0x1F);
|
||||||
|
|
||||||
if (thisx->params == BOMB_BODY) {
|
if (thisx->params == BOMB_BODY) {
|
||||||
if (this->timer < 63) {
|
float timerMultiplier = CVarGetFloat("gBombTimerMultiplier", 1.0f);
|
||||||
|
if (this->timer < (timerMultiplier == 1.0f ? 63 : (s32)(70 * timerMultiplier - 7))) {
|
||||||
dustAccel.y = 0.2f;
|
dustAccel.y = 0.2f;
|
||||||
|
|
||||||
// spawn spark effect on even frames
|
// spawn spark effect on even frames
|
||||||
|
@ -679,7 +679,7 @@ void EnFish_UpdateCutscene(EnFish* this, PlayState* play) {
|
|||||||
// Update functions and Draw
|
// Update functions and Draw
|
||||||
|
|
||||||
void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
|
void EnFish_OrdinaryUpdate(EnFish* this, PlayState* play) {
|
||||||
if (this->timer > 0) {
|
if (this->timer > 0 && CVarGetInteger("gNoFishDespawn", 0) == 0) {
|
||||||
this->timer--;
|
this->timer--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -394,6 +394,9 @@ void func_80A7CAD0(EnInsect* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_80A7CBC8(EnInsect* this) {
|
void func_80A7CBC8(EnInsect* this) {
|
||||||
|
if (CVarGetInteger("gNoBugsDespawn", 0) != 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this->unk_31A = 60;
|
this->unk_31A = 60;
|
||||||
func_80A7BF58(this);
|
func_80A7BF58(this);
|
||||||
this->skelAnime.playSpeed = 1.9f;
|
this->skelAnime.playSpeed = 1.9f;
|
||||||
|
Loading…
Reference in New Issue
Block a user