mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 17:32:19 -05:00
vb diving game (#100)
This commit is contained in:
parent
249490909f
commit
1e9cba1d61
@ -292,6 +292,8 @@ typedef enum {
|
||||
GI_VB_GIVE_ITEM_FROM_SHOOTING_GALLERY,
|
||||
// Opt: *EnExItem
|
||||
GI_VB_GIVE_ITEM_FROM_TARGET_IN_WOODS,
|
||||
// Opt: *EnDivingGame
|
||||
GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME,
|
||||
|
||||
GI_VB_GIVE_ITEM_FAIRY_OCARINA,
|
||||
GI_VB_GIVE_ITEM_WEIRD_EGG,
|
||||
|
@ -768,6 +768,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
||||
case GI_VB_TRADE_TIMER_FROG:
|
||||
case GI_VB_ANJU_SET_OBTAINED_TRADE_ITEM:
|
||||
case GI_VB_GIVE_ITEM_FROM_TARGET_IN_WOODS:
|
||||
case GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME:
|
||||
case GI_VB_GIVE_ITEM_FROM_GORON:
|
||||
case GI_VB_GIVE_ITEM_FROM_LAB_DIVE:
|
||||
case GI_VB_GIVE_ITEM_FROM_SKULL_KID_SARIAS_SONG:
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
#include "vt.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
|
||||
|
||||
@ -455,11 +456,8 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) {
|
||||
if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) {
|
||||
Message_CloseTextbox(play);
|
||||
this->actor.parent = NULL;
|
||||
if (!IS_RANDO) {
|
||||
if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME, true, &this->actor)) {
|
||||
Actor_OfferGetItem(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 90.0f, 10.0f);
|
||||
}
|
||||
this->actionFunc = func_809EEA90;
|
||||
}
|
||||
@ -467,14 +465,11 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) {
|
||||
|
||||
void func_809EEA90(EnDivingGame* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
if (Actor_HasParent(&this->actor, play) || !GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME, true, &this->actor)) {
|
||||
this->actionFunc = func_809EEAF8;
|
||||
} else {
|
||||
if (!IS_RANDO) {
|
||||
if (GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME, true, &this->actor)) {
|
||||
Actor_OfferGetItem(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
|
||||
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 90.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -482,7 +477,8 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) {
|
||||
// Award the scale?
|
||||
void func_809EEAF8(EnDivingGame* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) ||
|
||||
!GameInteractor_Should(GI_VB_GIVE_ITEM_FROM_DIVING_MINIGAME, true, &this->actor)) {
|
||||
// "Successful completion"
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
|
||||
this->allRupeesThrown = this->state = this->phase = this->unk_2A2 = this->grabbedRupeesCounter = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user