Merge pull request #6446 from HarbourMasters/develop-ackbar

merge develop-ackbar into develop
This commit is contained in:
Philip Dubé
2026-03-30 06:42:08 +00:00
committed by GitHub
23 changed files with 126 additions and 97 deletions
+2 -15
View File
@@ -5,6 +5,7 @@
#include "soh/OTRGlobals.h"
#include "soh/ResourceManagerHelpers.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/Enhancements/randomizer/item_category_adj.h"
#define FLAGS 0
@@ -580,21 +581,7 @@ void EnBox_UpdateTexture(EnBox* this, PlayState* play) {
this->dyna.actor.room != 6); // Exclude treasure game chests except for the final room
if (!isVanilla) {
getItemCategory = chestItem.getItemCategory;
// If they have bombchus, don't consider the bombchu item major
if ((INV_CONTENT(ITEM_BOMBCHU) == ITEM_BOMBCHU &&
((chestItem.modIndex == MOD_RANDOMIZER && chestItem.getItemId == RG_PROGRESSIVE_BOMBCHU_BAG) ||
(chestItem.modIndex == MOD_NONE &&
(chestItem.getItemId == GI_BOMBCHUS_5 || chestItem.getItemId == GI_BOMBCHUS_10 ||
chestItem.getItemId == GI_BOMBCHUS_20)))) ||
// If it's a bottle and they already have one, consider the item lesser
((chestItem.modIndex == MOD_RANDOMIZER && chestItem.getItemId >= RG_BOTTLE_WITH_RED_POTION &&
chestItem.getItemId <= RG_BOTTLE_WITH_POE) ||
(chestItem.modIndex == MOD_NONE &&
(chestItem.getItemId == GI_BOTTLE || chestItem.getItemId == GI_MILK_BOTTLE)) &&
gSaveContext.inventory.items[SLOT_BOTTLE_1] != ITEM_NONE)) {
getItemCategory = ITEM_CATEGORY_LESSER;
}
getItemCategory = Randomizer_AdjustItemCategory(chestItem);
}
switch (this->type) {
+3 -1
View File
@@ -150,7 +150,9 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
void EnMs_Sell(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
if (GameInteractor_Should(VB_MAGIC_BEAN_SALESMAN_TAKE_MONEY, true, this)) {
Rupees_ChangeBy(-sPrices[BEANS_BOUGHT]);
}
this->actor.parent = NULL;
this->actionFunc = EnMs_TalkAfterPurchase;
} else {