mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 08:05:07 -04:00
Fix Deku Mouth for Entrance Rando and Mido Rando Functionality (#4342)
* Restore Deku Tree open as adult with dungeon shuffle. * Add Mido spawn VB to allow for preventing Mido moving in rando when starting with Zelda's letter and closed deku or forest. * Use RAND_GET_OPTION instead of OTRGlobals rando context, get rid of IS_RANDO in deku mouth VB handler.
This commit is contained in:
parent
1b51750ec0
commit
6cd387ddf3
@ -78,6 +78,8 @@ typedef enum {
|
||||
// Vanilla condition: INFTABLE_GREETED_BY_SARIA
|
||||
VB_NOT_BE_GREETED_BY_SARIA,
|
||||
// Opt: *EnMd
|
||||
VB_MIDO_SPAWN,
|
||||
// Opt: *EnMd
|
||||
// Vanilla condition: EnMd->interactInfo.talkState == NPC_TALK_STATE_ACTION
|
||||
VB_MOVE_MIDO_IN_KOKIRI_FOREST,
|
||||
// Opt: *EnMd
|
||||
|
@ -12,6 +12,7 @@ extern "C" {
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
||||
#include "src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.h"
|
||||
#include "src/overlays/actors/ovl_En_Si/z_en_si.h"
|
||||
#include "src/overlays/actors/ovl_En_Cow/z_en_cow.h"
|
||||
#include "src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.h"
|
||||
@ -614,6 +615,11 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, void
|
||||
case VB_BE_ELIGIBLE_FOR_PRELUDE_OF_LIGHT:
|
||||
*should = !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST);
|
||||
break;
|
||||
case VB_MIDO_SPAWN:
|
||||
if (RAND_GET_OPTION(RSK_FOREST) != RO_FOREST_OPEN && !Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) {
|
||||
*should = true;
|
||||
}
|
||||
break;
|
||||
case VB_MOVE_MIDO_IN_KOKIRI_FOREST:
|
||||
if (RAND_GET_OPTION(RSK_FOREST) == RO_FOREST_OPEN) {
|
||||
*should = true;
|
||||
@ -1465,6 +1471,14 @@ void RandomizerOnActorInitHandler(void* actorRef) {
|
||||
}
|
||||
}
|
||||
|
||||
if (actor->id == ACTOR_BG_TREEMOUTH && LINK_IS_ADULT &&
|
||||
RAND_GET_OPTION(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
|
||||
(RAND_GET_OPTION(RSK_FOREST) == RO_FOREST_OPEN ||
|
||||
Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD))) {
|
||||
BgTreemouth* bgTreemouth = static_cast<BgTreemouth*>(actorRef);
|
||||
bgTreemouth->unk_168 = 1.0f;
|
||||
}
|
||||
|
||||
//consumable bags
|
||||
if (
|
||||
actor->id == ACTOR_EN_ITEM00 &&
|
||||
|
@ -646,7 +646,7 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
if (!EnMd_ShouldSpawn(this, play)) {
|
||||
if (!GameInteractor_Should(VB_MIDO_SPAWN, EnMd_ShouldSpawn(this, play), this)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user