mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
parent
fa6f45bde5
commit
2b360d4bbe
2 changed files with 30 additions and 0 deletions
25
soh/soh/Enhancements/RebottleBlueFire.cpp
Normal file
25
soh/soh/Enhancements/RebottleBlueFire.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/ShipInit.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.h"
|
||||
void EnIceHono_CapturableFlame(EnIceHono* thisx, PlayState* play);
|
||||
u32 EnIceHono_InBottleRange(EnIceHono* thisx, PlayState* play);
|
||||
}
|
||||
|
||||
extern PlayState* gPlayState;
|
||||
|
||||
void OnEnIceHonoUpdate(void* actor) {
|
||||
EnIceHono* thisx = (EnIceHono*)actor;
|
||||
if (thisx->actionFunc != EnIceHono_CapturableFlame && EnIceHono_InBottleRange(thisx, gPlayState)) {
|
||||
// GI_MAX in this case allows the player to catch the actor in a bottle
|
||||
Actor_OfferGetItem(&thisx->actor, gPlayState, GI_MAX, 60.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterRebottleBlueFire() {
|
||||
COND_ID_HOOK(OnActorUpdate, ACTOR_EN_ICE_HONO, CVarGetInteger(CVAR_ENHANCEMENT("RebottleBlueFire"), 0),
|
||||
OnEnIceHonoUpdate);
|
||||
}
|
||||
|
||||
static RegisterShipInitFunc initFunc(RegisterRebottleBlueFire, { CVAR_ENHANCEMENT("RebottleBlueFire") });
|
|
@ -792,6 +792,11 @@ void SohMenu::AddMenuEnhancements() {
|
|||
.CVar(CVAR_ENHANCEMENT("FastFarores"))
|
||||
.Options(CheckboxOptions().Tooltip("Greatly decreases cast time of Farore's Wind magic spell."));
|
||||
|
||||
AddWidget(path, "Bottles", WIDGET_SEPARATOR_TEXT);
|
||||
AddWidget(path, "Rebottle Blue Fire", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ENHANCEMENT("RebottleBlueFire"))
|
||||
.Options(CheckboxOptions().Tooltip("Blue Fire dropped from bottle can be bottled."));
|
||||
|
||||
// Fixes
|
||||
path.sidebarName = "Fixes";
|
||||
AddSidebarEntry("Enhancements", path.sidebarName, 3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue