mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-10-13 07:25:54 -04:00
Hide shuffle indicators on excluded checks (#7364)
This commit is contained in:
@@ -52,7 +52,8 @@ void ObjComb_RandomizerWait(ObjComb* objComb, PlayState* play) {
|
||||
|
||||
const auto beehiveIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(&objComb->actor);
|
||||
if (RAND_GET_OPTION(RSK_SHUFFLE_BEEHIVES) && beehiveIdentity != nullptr &&
|
||||
!Flags_GetRandomizerInf(beehiveIdentity->randomizerInf)) {
|
||||
!Flags_GetRandomizerInf(beehiveIdentity->randomizerInf) &&
|
||||
!Rando::Context::GetInstance()->GetItemLocation(beehiveIdentity->randomizerCheck)->IsExcluded()) {
|
||||
if (objComb->unk_1B0 <= -5000) {
|
||||
objComb->unk_1B0 = 1500;
|
||||
}
|
||||
|
||||
@@ -281,6 +281,10 @@ void RegisterShuffleCrates() {
|
||||
COND_VB_SHOULD(VB_CRATE_SETUP_DRAW, shouldRegister, {
|
||||
ObjKibako2* crateActor = va_arg(args, ObjKibako2*);
|
||||
if (ObjKibako2_RandomizerHoldsItem(crateActor, gPlayState)) {
|
||||
const auto crateIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(&crateActor->dyna.actor);
|
||||
if (Rando::Context::GetInstance()->GetItemLocation(crateIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
crateActor->dyna.actor.draw = (ActorFunc)ObjKibako2_RandomizerDraw;
|
||||
*should = false;
|
||||
}
|
||||
@@ -301,6 +305,10 @@ void RegisterShuffleCrates() {
|
||||
COND_VB_SHOULD(VB_SMALL_CRATE_SETUP_DRAW, shouldRegister, {
|
||||
ObjKibako* smallCrateActor = va_arg(args, ObjKibako*);
|
||||
if (ObjKibako_RandomizerHoldsItem(smallCrateActor, gPlayState)) {
|
||||
const auto crateIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(&smallCrateActor->actor);
|
||||
if (Rando::Context::GetInstance()->GetItemLocation(crateIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
smallCrateActor->actor.draw = (ActorFunc)ObjKibako_RandomizerDraw;
|
||||
*should = false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ extern "C" void EnKusa_RandomizerDraw(Actor* thisx, PlayState* play) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
if (grassIdentity != nullptr && grassIdentity->randomizerCheck != RC_MAX &&
|
||||
Flags_GetRandomizerInf(grassIdentity->randomizerInf) == 0) {
|
||||
Flags_GetRandomizerInf(grassIdentity->randomizerInf) == 0 &&
|
||||
!Rando::Context::GetInstance()->GetItemLocation(grassIdentity->randomizerCheck)->IsExcluded()) {
|
||||
bool csmc = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), 0);
|
||||
int requiresStoneAgony = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeDependsStoneOfAgony"), 0);
|
||||
|
||||
|
||||
@@ -128,6 +128,10 @@ void RegisterShuffleIcicles() {
|
||||
BgIceTurara* icicleActor = va_arg(args, BgIceTurara*);
|
||||
if (BgIceTurara_RandomizerHoldsItem(&icicleActor->dyna.actor) &&
|
||||
!ObjectExtension::GetInstance().Has<StalactiteDropped>(&icicleActor->dyna.actor)) {
|
||||
const auto icicleIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(&icicleActor->dyna.actor);
|
||||
if (Rando::Context::GetInstance()->GetItemLocation(icicleIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
DrawItemHalo(&icicleActor->dyna.actor);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -28,7 +28,8 @@ extern "C" void ObjTsubo_RandomizerDraw(Actor* thisx, PlayState* play) {
|
||||
const auto potIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(thisx);
|
||||
|
||||
if (potIdentity != nullptr && potIdentity->randomizerCheck != RC_MAX &&
|
||||
Flags_GetRandomizerInf(potIdentity->randomizerInf) == 0) {
|
||||
Flags_GetRandomizerInf(potIdentity->randomizerInf) == 0 &&
|
||||
!Rando::Context::GetInstance()->GetItemLocation(potIdentity->randomizerCheck)->IsExcluded()) {
|
||||
bool csmc = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), 0);
|
||||
int requiresStoneAgony = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeDependsStoneOfAgony"), 0);
|
||||
|
||||
|
||||
@@ -75,7 +75,8 @@ void BgIceShelter_RandomizerDrawSetup(void* actor) {
|
||||
Color_RGBA8 envColor;
|
||||
|
||||
const auto redIceIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(redIceActor);
|
||||
if (redIceIdentity == nullptr) {
|
||||
if (redIceIdentity == nullptr ||
|
||||
Rando::Context::GetInstance()->GetItemLocation(redIceIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,8 +230,11 @@ void EnIshi_RandomizerInit(void* actorRef) {
|
||||
auto rockIdentity = IdentifyRock(gPlayState->sceneNum, (s16)actor->world.pos.x, (s16)actor->world.pos.z);
|
||||
|
||||
if (Rock_RandomizerHoldsItem(rockIdentity, gPlayState, actor->params & 1) && rockActor->actor.draw != nullptr) {
|
||||
bool isExcluded = Rando::Context::GetInstance()->GetItemLocation(rockIdentity.randomizerCheck)->IsExcluded();
|
||||
ObjectExtension::GetInstance().Set<CheckIdentity>(actor, std::move(rockIdentity));
|
||||
rockActor->actor.draw = EnIshi_RandomizerDraw;
|
||||
if (!isExcluded) {
|
||||
rockActor->actor.draw = EnIshi_RandomizerDraw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,8 +244,11 @@ void ObjBombiwa_RandomizerInit(void* actorRef) {
|
||||
auto rockIdentity = IdentifyRock(gPlayState->sceneNum, (s16)actor->world.pos.x, (s16)actor->world.pos.z);
|
||||
|
||||
if (Rock_RandomizerHoldsItem(rockIdentity, gPlayState, true) && rockActor->actor.draw != nullptr) {
|
||||
bool isExcluded = Rando::Context::GetInstance()->GetItemLocation(rockIdentity.randomizerCheck)->IsExcluded();
|
||||
ObjectExtension::GetInstance().Set<CheckIdentity>(actor, std::move(rockIdentity));
|
||||
rockActor->actor.draw = ObjBombiwa_RandomizerDraw;
|
||||
if (!isExcluded) {
|
||||
rockActor->actor.draw = ObjBombiwa_RandomizerDraw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,8 +258,11 @@ void ObjHamishi_RandomizerInit(void* actorRef) {
|
||||
auto rockIdentity = IdentifyRock(gPlayState->sceneNum, (s16)actor->world.pos.x, (s16)actor->world.pos.z);
|
||||
|
||||
if (Rock_RandomizerHoldsItem(rockIdentity, gPlayState, true) && rockActor->actor.draw != nullptr) {
|
||||
bool isExcluded = Rando::Context::GetInstance()->GetItemLocation(rockIdentity.randomizerCheck)->IsExcluded();
|
||||
ObjectExtension::GetInstance().Set<CheckIdentity>(actor, std::move(rockIdentity));
|
||||
rockActor->actor.draw = ObjHamishi_RandomizerDraw;
|
||||
if (!isExcluded) {
|
||||
rockActor->actor.draw = ObjHamishi_RandomizerDraw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ void Sign_RandomizerDrawSetup(void* actor) {
|
||||
int isNotCMC = !cmc || (requiresStoneAgony && !CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY));
|
||||
|
||||
const auto signIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(signActor);
|
||||
if (signIdentity == nullptr) {
|
||||
if (signIdentity == nullptr ||
|
||||
Rando::Context::GetInstance()->GetItemLocation(signIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,10 @@ void RegisterShuffleTrees() {
|
||||
COND_VB_SHOULD(VB_TREE_SETUP_DRAW, shouldRegisterTree || shouldRegisterBush, {
|
||||
EnWood02* treeActor = va_arg(args, EnWood02*);
|
||||
if (EnWood02_RandomizerHoldsItem(treeActor, gPlayState)) {
|
||||
const auto treeIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(&treeActor->actor);
|
||||
if (Rando::Context::GetInstance()->GetItemLocation(treeIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
EnWood02_RandomizerDraw(&treeActor->actor, gPlayState);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -215,7 +215,8 @@ void EnWonderItem_RandomizerDrawSetup(void* refActor) {
|
||||
int isNotCMC = !cmc || (requiresStoneAgony && !CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY));
|
||||
|
||||
const auto wonderIdentity = ObjectExtension::GetInstance().Get<CheckIdentity>(refActor);
|
||||
if (wonderIdentity == nullptr) {
|
||||
if (wonderIdentity == nullptr ||
|
||||
Rando::Context::GetInstance()->GetItemLocation(wonderIdentity->randomizerCheck)->IsExcluded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user