mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
Faster empty bottle, faster bean skulltula
This commit is contained in:
parent
52a3058926
commit
bc1b17cb49
8 changed files with 67 additions and 1 deletions
15
soh/soh/Enhancements/TimeSavers/FasterBeanSkulltula.cpp
Normal file
15
soh/soh/Enhancements/TimeSavers/FasterBeanSkulltula.cpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include "z64save.h"
|
||||
}
|
||||
|
||||
void FasterBeanSkulltula_Register() {
|
||||
REGISTER_VB_SHOULD(VB_SPAWN_BEAN_SKULLTULA, {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterBeanSkull"), 0)) {
|
||||
*should = true;
|
||||
}
|
||||
});
|
||||
}
|
20
soh/soh/Enhancements/TimeSavers/FasterBottleEmpty.cpp
Normal file
20
soh/soh/Enhancements/TimeSavers/FasterBottleEmpty.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
|
||||
extern "C" {
|
||||
#include "z64save.h"
|
||||
}
|
||||
|
||||
void FasterEmptyBottle_Register() {
|
||||
REGISTER_VB_SHOULD(VB_EMPTYING_BOTTLE, {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("FasterBottleEmpty"), 0)) {
|
||||
Player* player = va_arg(args, Player*);
|
||||
if (player->skelAnime.curFrame <= 60.0f) {
|
||||
player->skelAnime.playSpeed = 3.0f;
|
||||
} else {
|
||||
player->skelAnime.playSpeed = 1.0f;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
|
@ -15,4 +15,6 @@ void TimeSavers_Register() {
|
|||
SkipChildRutoInteractions_Register();
|
||||
FasterHeavyBlockLift_Register();
|
||||
FasterRupeeAccumulator_Register();
|
||||
FasterEmptyBottle_Register();
|
||||
FasterBeanSkulltula_Register();
|
||||
}
|
||||
|
|
|
@ -17,5 +17,7 @@ void MoveMidoInKokiriForest_Register();
|
|||
void SkipChildRutoInteractions_Register();
|
||||
void FasterHeavyBlockLift_Register();
|
||||
void FasterRupeeAccumulator_Register();
|
||||
void FasterEmptyBottle_Register();
|
||||
void FasterBeanSkulltula_Register();
|
||||
|
||||
#endif // TIME_SAVERS_H
|
||||
|
|
|
@ -425,6 +425,14 @@ typedef enum {
|
|||
// - `*int16_t` (item id)
|
||||
VB_DRAW_AMMO_COUNT,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// true
|
||||
// ```
|
||||
// #### `args`
|
||||
// - Player*
|
||||
VB_EMPTYING_BOTTLE,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)
|
||||
|
@ -1790,6 +1798,14 @@ typedef enum {
|
|||
// - `*ObjBean`
|
||||
VB_SPAWN_BEAN_STALK_FAIRIES,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// this->timer >= 60
|
||||
// ```
|
||||
// #### `args`
|
||||
// - `None`
|
||||
VB_SPAWN_BEAN_SKULLTULA,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// true
|
||||
|
|
|
@ -373,6 +373,9 @@ void SohMenu::AddMenuEnhancements() {
|
|||
.CVar(CVAR_ENHANCEMENT("SkipSwimDeepEndAnim"))
|
||||
.Options(CheckboxOptions().Tooltip("Skips Link's taking breath animation after coming up from water. "
|
||||
"This setting does not interfere with getting items from underwater."));
|
||||
AddWidget(path, "Empty Bottles Faster", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ENHANCEMENT("FasterBottleEmpty"))
|
||||
.Options(CheckboxOptions().Tooltip("Speeds up emptying animation when dumping out the contents of a bottle."));
|
||||
AddWidget(path, "Vine/Ladder Climb Speed +%d", WIDGET_CVAR_SLIDER_INT)
|
||||
.CVar(CVAR_ENHANCEMENT("ClimbSpeed"))
|
||||
.Options(IntSliderOptions().Min(0).Max(12).DefaultValue(0).Format("+%d"));
|
||||
|
@ -425,6 +428,10 @@ void SohMenu::AddMenuEnhancements() {
|
|||
AddWidget(path, "Link as Default File Name", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ENHANCEMENT("LinkDefaultName"))
|
||||
.Options(CheckboxOptions().Tooltip("Allows you to have \"Link\" as a premade file name."));
|
||||
AddWidget(path, "Spawn Bean Skulltula Faster", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ENHANCEMENT("FasterBeanSkull"))
|
||||
.Options(CheckboxOptions().Tooltip(
|
||||
"Makes Gold Skulltulas come out of bean patches faster after bugs dig into center."));
|
||||
AddWidget(path, "Biggoron Forge Time: %d days", WIDGET_CVAR_SLIDER_INT)
|
||||
.CVar(CVAR_ENHANCEMENT("ForgeTime"))
|
||||
.Options(IntSliderOptions().Min(0).Max(3).DefaultValue(3).Format("%d days").Tooltip(
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "z_obj_makekinsuta.h"
|
||||
#include "vt.h"
|
||||
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||
|
||||
void ObjMakekinsuta_Init(Actor* thisx, PlayState* play);
|
||||
|
@ -47,7 +49,7 @@ void ObjMakekinsuta_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
void func_80B98320(ObjMakekinsuta* this, PlayState* play) {
|
||||
if (this->unk_152 != 0) {
|
||||
if (this->timer >= 60 && !func_8002DEEC(GET_PLAYER(play))) {
|
||||
if (GameInteractor_Should(VB_SPAWN_BEAN_SKULLTULA, this->timer >= 60) && !func_8002DEEC(GET_PLAYER(play))) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_SW, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | 0x8000), true);
|
||||
this->actionFunc = ObjMakekinsuta_DoNothing;
|
||||
|
|
|
@ -14786,6 +14786,8 @@ static AnimSfxEntry D_80854A34[] = {
|
|||
void Player_Action_8084EFC0(Player* this, PlayState* play) {
|
||||
Player_DecelerateToZero(this);
|
||||
|
||||
GameInteractor_Should(VB_EMPTYING_BOTTLE, true, this);
|
||||
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
func_8083C0E8(this, play);
|
||||
func_8005B1A4(Play_GetCamera(play, 0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue