fix skulltula token count message on vanilla (#2597)

This commit is contained in:
Adam Bird 2023-03-08 10:18:02 -05:00 committed by GitHub
parent 5d32343919
commit 2117d98178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 17 deletions

View File

@ -1678,7 +1678,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
textId = TEXT_GS_FREEZE;
}
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId);
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{gsCount}}", std::to_string(gSaveContext.inventory.gsTokens + 1));
CustomMessageManager::ReplaceStringInMessage(messageEntry, "{{gsCount}}", std::to_string(gSaveContext.inventory.gsTokens));
}
}
if (textId == TEXT_HEART_CONTAINER && CVarGetInteger("gInjectItemCounts", 0)) {

View File

@ -103,6 +103,11 @@ void func_80AFB768(EnSi* this, PlayState* play) {
if (gSaveContext.n64ddFlag) {
Randomizer_UpdateSkullReward(this, play);
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
} else {
gSaveContext.pendingIceTrapCount++;
}
} else {
Item_Give(play, giveItemId);
}
@ -117,14 +122,8 @@ void func_80AFB768(EnSi* this, PlayState* play) {
Message_StartTextbox(play, textId, NULL);
if (gSaveContext.n64ddFlag) {
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
Audio_PlayFanfare_Rando(getItem);
} else {
gSaveContext.pendingIceTrapCount++;
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
}
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
Audio_PlayFanfare_Rando(getItem);
} else {
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
}
@ -149,20 +148,19 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) {
if (gSaveContext.n64ddFlag) {
Randomizer_UpdateSkullReward(this, play);
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
} else {
gSaveContext.pendingIceTrapCount++;
}
} else {
Item_Give(play, giveItemId);
}
Message_StartTextbox(play, textId, NULL);
if (gSaveContext.n64ddFlag) {
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
Audio_PlayFanfare_Rando(getItem);
} else {
gSaveContext.pendingIceTrapCount++;
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
}
if (gSaveContext.n64ddFlag && getItemId != RG_ICE_TRAP) {
Audio_PlayFanfare_Rando(getItem);
} else {
Audio_PlayFanfare(NA_BGM_SMALL_ITEM_GET);
}