mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-04-23 08:14:31 +00:00
Conslidate ganon2 hooks (#6432)
This commit is contained in:
parent
d1b7edfa7c
commit
1be7533675
|
|
@ -17,10 +17,10 @@ static void RegisterBossDefeatTimestamps() {
|
|||
BOSS_DEFEAT_TIMESTAMP(ACTOR_BOSS_SST, TIMESTAMP_DEFEAT_BONGO_BONGO);
|
||||
BOSS_DEFEAT_TIMESTAMP(ACTOR_BOSS_TW, TIMESTAMP_DEFEAT_TWINROVA);
|
||||
BOSS_DEFEAT_TIMESTAMP(ACTOR_BOSS_GANON, TIMESTAMP_DEFEAT_GANONDORF);
|
||||
BOSS_DEFEAT_TIMESTAMP(ACTOR_BOSS_GANON2, TIMESTAMP_DEFEAT_GANON);
|
||||
|
||||
COND_ID_HOOK(OnBossDefeat, ACTOR_BOSS_GANON2, true,
|
||||
[](void* refActor) { gSaveContext.ship.stats.gameComplete = true; });
|
||||
COND_ID_HOOK(OnBossDefeat, ACTOR_BOSS_GANON2, true, [](void* refActor) {
|
||||
gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME;
|
||||
gSaveContext.ship.stats.gameComplete = true;
|
||||
});
|
||||
}
|
||||
|
||||
static RegisterShipInitFunc initFunc(RegisterBossDefeatTimestamps);
|
||||
|
|
|
|||
|
|
@ -225,6 +225,9 @@ class GameInteractor {
|
|||
static GameInteractionEffectQueryResult RemoveEffect(RemovableGameInteractionEffect& effect);
|
||||
|
||||
// Game Hooks
|
||||
//
|
||||
// Hooks should be idempotent and execution order is not guaranteed.
|
||||
// If two operations must happen in a specific order, they should be placed in the same hook.
|
||||
HOOK_ID nextHookId = 1;
|
||||
|
||||
template <typename H> struct RegisteredGameHooks {
|
||||
|
|
|
|||
Loading…
Reference in a new issue