mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-30 03:28:55 -07:00
Faster empty bottle, faster bean skulltula (#5355)
* Faster empty bottle, faster bean skulltula * shipinit
This commit is contained in:
parent
f9cde383b7
commit
eb95f9060f
6 changed files with 60 additions and 1 deletions
13
soh/soh/Enhancements/TimeSavers/FasterBeanSkulltula.cpp
Normal file
13
soh/soh/Enhancements/TimeSavers/FasterBeanSkulltula.cpp
Normal 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") });
|
19
soh/soh/Enhancements/TimeSavers/FasterBottleEmpty.cpp
Normal file
19
soh/soh/Enhancements/TimeSavers/FasterBottleEmpty.cpp
Normal 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") });
|
|
@ -462,6 +462,14 @@ typedef enum {
|
||||||
// - `*int16_t` (item id)
|
// - `*int16_t` (item id)
|
||||||
VB_DRAW_AMMO_COUNT,
|
VB_DRAW_AMMO_COUNT,
|
||||||
|
|
||||||
|
// #### `result`
|
||||||
|
// ```c
|
||||||
|
// true
|
||||||
|
// ```
|
||||||
|
// #### `args`
|
||||||
|
// - Player*
|
||||||
|
VB_EMPTYING_BOTTLE,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
// (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)
|
// (Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)
|
||||||
|
@ -1827,6 +1835,14 @@ typedef enum {
|
||||||
// - `*ObjBean`
|
// - `*ObjBean`
|
||||||
VB_SPAWN_BEAN_STALK_FAIRIES,
|
VB_SPAWN_BEAN_STALK_FAIRIES,
|
||||||
|
|
||||||
|
// #### `result`
|
||||||
|
// ```c
|
||||||
|
// this->timer >= 60
|
||||||
|
// ```
|
||||||
|
// #### `args`
|
||||||
|
// - `None`
|
||||||
|
VB_SPAWN_BEAN_SKULLTULA,
|
||||||
|
|
||||||
// #### `result`
|
// #### `result`
|
||||||
// ```c
|
// ```c
|
||||||
// true
|
// true
|
||||||
|
|
|
@ -373,6 +373,9 @@ void SohMenu::AddMenuEnhancements() {
|
||||||
.CVar(CVAR_ENHANCEMENT("SkipSwimDeepEndAnim"))
|
.CVar(CVAR_ENHANCEMENT("SkipSwimDeepEndAnim"))
|
||||||
.Options(CheckboxOptions().Tooltip("Skips Link's taking breath animation after coming up from water. "
|
.Options(CheckboxOptions().Tooltip("Skips Link's taking breath animation after coming up from water. "
|
||||||
"This setting does not interfere with getting items from underwater."));
|
"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)
|
AddWidget(path, "Vine/Ladder Climb Speed +%d", WIDGET_CVAR_SLIDER_INT)
|
||||||
.CVar(CVAR_ENHANCEMENT("ClimbSpeed"))
|
.CVar(CVAR_ENHANCEMENT("ClimbSpeed"))
|
||||||
.Options(IntSliderOptions().Min(0).Max(12).DefaultValue(0).Format("+%d"));
|
.Options(IntSliderOptions().Min(0).Max(12).DefaultValue(0).Format("+%d"));
|
||||||
|
@ -430,6 +433,10 @@ void SohMenu::AddMenuEnhancements() {
|
||||||
AddWidget(path, "Link as Default File Name", WIDGET_CVAR_CHECKBOX)
|
AddWidget(path, "Link as Default File Name", WIDGET_CVAR_CHECKBOX)
|
||||||
.CVar(CVAR_ENHANCEMENT("LinkDefaultName"))
|
.CVar(CVAR_ENHANCEMENT("LinkDefaultName"))
|
||||||
.Options(CheckboxOptions().Tooltip("Allows you to have \"Link\" as a premade file name."));
|
.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)
|
AddWidget(path, "Biggoron Forge Time: %d days", WIDGET_CVAR_SLIDER_INT)
|
||||||
.CVar(CVAR_ENHANCEMENT("ForgeTime"))
|
.CVar(CVAR_ENHANCEMENT("ForgeTime"))
|
||||||
.Options(IntSliderOptions().Min(0).Max(3).DefaultValue(3).Format("%d days").Tooltip(
|
.Options(IntSliderOptions().Min(0).Max(3).DefaultValue(3).Format("%d days").Tooltip(
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include "z_obj_makekinsuta.h"
|
#include "z_obj_makekinsuta.h"
|
||||||
#include "vt.h"
|
#include "vt.h"
|
||||||
|
|
||||||
|
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||||
|
|
||||||
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
#define FLAGS ACTOR_FLAG_UPDATE_CULLING_DISABLED
|
||||||
|
|
||||||
void ObjMakekinsuta_Init(Actor* thisx, PlayState* play);
|
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) {
|
void func_80B98320(ObjMakekinsuta* this, PlayState* play) {
|
||||||
if (this->unk_152 != 0) {
|
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,
|
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->actor.world.pos.z, 0, this->actor.shape.rot.y, 0, (this->actor.params | 0x8000), true);
|
||||||
this->actionFunc = ObjMakekinsuta_DoNothing;
|
this->actionFunc = ObjMakekinsuta_DoNothing;
|
||||||
|
|
|
@ -14752,6 +14752,8 @@ static AnimSfxEntry D_80854A34[] = {
|
||||||
void Player_Action_8084EFC0(Player* this, PlayState* play) {
|
void Player_Action_8084EFC0(Player* this, PlayState* play) {
|
||||||
Player_DecelerateToZero(this);
|
Player_DecelerateToZero(this);
|
||||||
|
|
||||||
|
GameInteractor_Should(VB_EMPTYING_BOTTLE, true, this);
|
||||||
|
|
||||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||||
func_8083C0E8(this, play);
|
func_8083C0E8(this, play);
|
||||||
func_8005B1A4(Play_GetCamera(play, 0));
|
func_8005B1A4(Play_GetCamera(play, 0));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue