Skip first-time pickup messages for consumable items (#495)

This commit is contained in:
vaguerant 2022-06-21 03:50:06 +10:00 committed by GitHub
parent b4eebbbcd6
commit b56426a67d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View File

@ -901,6 +901,8 @@ namespace SohImGui {
Tooltip("Disables the voice audio when Navi calls you");
EnhancementCheckbox("Fast Chests", "gFastChests");
Tooltip("Kick open every chest");
EnhancementCheckbox("Fast Drops", "gFastDrops");
Tooltip("Skip first-time pickup messages for consumable items");
EnhancementCheckbox("Better Owl", "gBetterOwl");
Tooltip("The default response to Kaepora Gaebora is always that you understood what he said");
EnhancementCheckbox("Link's Cow in Both Time Periods", "gCowOfTime");

View File

@ -452,7 +452,7 @@ s32 EnGirlA_CanBuy_DekuNuts(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) {
if ((Item_CheckObtainability(ITEM_NUT) == ITEM_NONE) && !CVar_GetS32("gFastDrops", 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;
@ -465,7 +465,7 @@ s32 EnGirlA_CanBuy_DekuSticks(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) {
if ((Item_CheckObtainability(ITEM_STICK) == ITEM_NONE) && !CVar_GetS32("gFastDrops", 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;
@ -652,7 +652,7 @@ s32 EnGirlA_CanBuy_DekuSeeds(GlobalContext* globalCtx, EnGirlA* this) {
if (gSaveContext.rupees < this->basePrice) {
return CANBUY_RESULT_NEED_RUPEES;
}
if (Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) {
if ((Item_CheckObtainability(ITEM_SEEDS) == ITEM_NONE) && !CVar_GetS32("gFastDrops", 0)) {
return CANBUY_RESULT_SUCCESS_FANFARE;
}
return CANBUY_RESULT_SUCCESS;

View File

@ -6157,7 +6157,12 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
iREG(67) = false;
if ((Item_CheckObtainability(giEntry->itemId) == ITEM_NONE) || (globalCtx->sceneNum == SCENE_BOWLING)) {
s32 drop = giEntry->objectId;
if ((globalCtx->sceneNum == SCENE_BOWLING) || !(CVar_GetS32("gFastDrops", 0) &&
((drop == OBJECT_GI_BOMB_1) || (drop == OBJECT_GI_NUTS) || (drop == OBJECT_GI_STICK) ||
(drop == OBJECT_GI_SEED) || (drop == OBJECT_GI_MAGICPOT) || (drop == OBJECT_GI_ARROW))) &&
(Item_CheckObtainability(giEntry->itemId) == ITEM_NONE)) {
func_808323B4(globalCtx, this);
func_8083AE40(this, giEntry->objectId);