add check for agony option (#5365)

This commit is contained in:
Eric Hoey 2025-04-09 13:01:26 -04:00 committed by GitHub
parent 2576f75b1a
commit 9250af0216
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,8 +35,10 @@ extern "C" void EnKusa_RandomizerDraw(Actor* thisx, PlayState* play) {
if (grassActor->grassIdentity.randomizerCheck != RC_MAX &&
Flags_GetRandomizerInf(grassActor->grassIdentity.randomizerInf) == 0) {
int csmc = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeAndTextureMatchContents"), CSMC_DISABLED);
int requiresStoneAgony = CVarGetInteger(CVAR_ENHANCEMENT("ChestSizeDependsStoneOfAgony"), 0);
if (csmc == CSMC_BOTH || csmc == CSMC_TEXTURE) {
if ((csmc == CSMC_BOTH || csmc == CSMC_TEXTURE) &&
(!requiresStoneAgony || (requiresStoneAgony && CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY)))) {
auto itemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(grassActor->grassIdentity.randomizerCheck,
true, GI_NONE);
GetItemCategory getItemCategory = itemEntry.getItemCategory;