This commit is contained in:
Philip Dubé 2025-04-25 18:57:33 -04:00 committed by GitHub
commit d865a90896
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 60 additions and 1 deletions

View file

@ -0,0 +1,13 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64save.h"
}
void RegisterFasterBeanSkulltula() {
COND_VB_SHOULD(VB_SPAWN_BEAN_SKULLTULA, CVarGetInteger(CVAR_ENHANCEMENT("FasterBeanSkull"), 0),
{ *should = true; });
}
static RegisterShipInitFunc initFunc(RegisterFasterBeanSkulltula, { CVAR_ENHANCEMENT("FasterBeanSkull") });

View file

@ -0,0 +1,19 @@
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/ShipInit.hpp"
extern "C" {
#include "z64save.h"
}
void RegisterFasterEmptyBottle() {
COND_VB_SHOULD(VB_EMPTYING_BOTTLE, 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;
}
});
}
static RegisterShipInitFunc initFunc(RegisterFasterEmptyBottle, { CVAR_ENHANCEMENT("FasterBottleEmpty") });

View file

@ -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

View file

@ -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(

View file

@ -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;

View file

@ -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));