mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
SkipAmyPuzzle (#5550)
This commit is contained in:
parent
56a53e9fac
commit
3a60c3f651
4 changed files with 24 additions and 1 deletions
8
soh/soh/Enhancements/SkipAmyPuzzle.cpp
Normal file
8
soh/soh/Enhancements/SkipAmyPuzzle.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/ShipInit.hpp"
|
||||
|
||||
void RegisterSkipAmyPuzzle() {
|
||||
COND_VB_SHOULD(VB_AMY_SOLVE, CVarGetInteger(CVAR_ENHANCEMENT("SkipAmyPuzzle"), 0), { *should = true; });
|
||||
}
|
||||
|
||||
static RegisterShipInitFunc initFunc(RegisterSkipAmyPuzzle, { CVAR_ENHANCEMENT("SkipAmyPuzzle") });
|
|
@ -20,6 +20,14 @@ typedef enum {
|
|||
// - `int32_t` (entrance index) (promoted from `uint16_t` by va_arg)
|
||||
VB_ALLOW_ENTRANCE_CS_FOR_EITHER_AGE,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// sBgPoEventPuzzleState == 0xF
|
||||
// ```
|
||||
// #### `args`
|
||||
// - None
|
||||
VB_AMY_SOLVE,
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// this->actor.textId == 0x401A
|
||||
|
|
|
@ -1312,6 +1312,11 @@ void SohMenu::AddMenuEnhancements() {
|
|||
.Format("%d notes")
|
||||
.Tooltip("Adjust the number of notes you need to play to end the third round."));
|
||||
|
||||
AddWidget(path, "Forest Temple", WIDGET_SEPARATOR_TEXT);
|
||||
AddWidget(path, "Solve Amy's Puzzle", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ENHANCEMENT("SkipAmyPuzzle"))
|
||||
.Options(CheckboxOptions().Tooltip("Amy's block pushing puzzle instantly solved."));
|
||||
|
||||
path.column = SECTION_COLUMN_3;
|
||||
AddWidget(path, "Fishing", WIDGET_SEPARATOR_TEXT);
|
||||
AddWidget(path, "Customize Behavior##Fishing", WIDGET_CVAR_CHECKBOX)
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "z_bg_po_event.h"
|
||||
#include "objects/object_po_sisters/object_po_sisters.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS 0
|
||||
|
||||
|
@ -333,7 +335,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
Actor* amy;
|
||||
|
||||
if (sBgPoEventPuzzleState == 0xF) {
|
||||
if (GameInteractor_Should(VB_AMY_SOLVE, sBgPoEventPuzzleState == 0xF)) {
|
||||
this->actionFunc = BgPoEvent_BlockSolved;
|
||||
if ((this->type == 0) && (this->index == 0)) {
|
||||
amy = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_PO_SISTERS, this->dyna.actor.world.pos.x + 30.0f,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue