Added Chests of Agony (#1885)

This commit is contained in:
Dakota Brown 2022-11-06 14:07:58 -07:00 committed by GitHub
parent 11497c393d
commit 328ff0e8c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 10 deletions

View file

@ -619,9 +619,11 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
EnBox_CreateExtraChestTextures();
int cvar = CVar_GetS32("gChestSizeAndTextureMatchesContents", 0);
int agonyCVar = CVar_GetS32("gChestSizeDependsStoneOfAgony", 0);
int stoneCheck = CHECK_QUEST_ITEM(QUEST_STONE_OF_AGONY);
GetItemCategory getItemCategory;
if (play->sceneNum != SCENE_TAKARAYA && cvar > 0) {
if (play->sceneNum != SCENE_TAKARAYA && cvar > 0 && ((agonyCVar > 0 && stoneCheck) | agonyCVar == 0)) {
getItemCategory = this->getItemEntry.getItemCategory;
// If they don't have bombchu's yet consider the bombchu item major
if (this->getItemEntry.gid == GID_BOMBCHU && INV_CONTENT(ITEM_BOMBCHU) != ITEM_BOMBCHU) {
@ -637,7 +639,7 @@ void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
}
}
if (play->sceneNum != SCENE_TAKARAYA && (cvar == 1 || cvar == 3)) {
if (play->sceneNum != SCENE_TAKARAYA && (cvar == 1 || cvar == 3) && ((agonyCVar > 0 && stoneCheck) | agonyCVar == 0)) {
switch (getItemCategory) {
case ITEM_CATEGORY_JUNK:
case ITEM_CATEGORY_SMALL_KEY:
@ -665,7 +667,7 @@ void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) {
}
}
if (play->sceneNum != SCENE_TAKARAYA && (cvar == 1 || cvar == 2)) {
if (play->sceneNum != SCENE_TAKARAYA && (cvar == 1 || cvar == 2) && ((agonyCVar > 0 && stoneCheck) | agonyCVar == 0)) {
switch (getItemCategory) {
case ITEM_CATEGORY_MAJOR:
this->boxBodyDL = gGoldTreasureChestChestFrontDL;