diff options
Diffstat (limited to 'mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp')
| -rw-r--r-- | mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp b/mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp index bef7eb663..9f372fe4f 100644 --- a/mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp +++ b/mm/2s2h/Rando/MiscBehavior/CheckQueue.cpp @@ -1,13 +1,16 @@ #include "MiscBehavior.h" +#include <libultraship/bridge/consolevariablebridge.h> #include "2s2h/GameInteractor/GameInteractor.h" #include "2s2h/CustomItem/CustomItem.h" #include "2s2h/CustomMessage/CustomMessage.h" #include "2s2h/BenGui/Notification.h" #include "2s2h/Rando/StaticData/StaticData.h" #include "2s2h/ShipUtils.h" +#include "Traps.h" extern "C" { #include "variables.h" +#include <functions.h> extern TexturePtr gItemIcons[131]; extern s16 D_801CFF94[250]; } @@ -58,10 +61,20 @@ void Rando::MiscBehavior::CheckQueue() { randoItemId = RI_TRIFORCE_PIECE_PREVIOUS; } + if (randoItemId == RI_TRAP) { + prefix = ""; + message = GetTrapMessage(); + // We need to remove the Color Codes if the player is skipping Item Get Cutscenes as the + // Notification Emit doesnt support it. + if (CVarGetInteger("gEnhancements.Cutscenes.SkipGetItemCutscenes", 0) >= 2) { + message = CustomMessage::RemoveColorCodes(message); + } + } + CustomMessage::Entry entry = { .textboxType = 2, .icon = Rando::StaticData::GetIconForZMessage(randoItemId), - .msg = prefix + " " + message + "!", + .msg = (prefix == "" ? "" : prefix + " ") + message + (randoItemId == RI_TRAP ? "" : "!"), }; if (CUSTOM_ITEM_FLAGS & CustomItem::GIVE_ITEM_CUTSCENE) { @@ -88,7 +101,11 @@ void Rando::MiscBehavior::CheckQueue() { // If the item has been given, the CUSTOM_ITEM_PARAM is set to the RI, prior to that it's the RC if (CUSTOM_ITEM_FLAGS & CustomItem::CALLED_ACTION) { - randoItemId = (RandoItemId)CUSTOM_ITEM_PARAM; + if ((RandoItemId)CUSTOM_ITEM_PARAM == RI_TRAP) { + randoItemId = RI_MAX_TRAP; + } else { + randoItemId = (RandoItemId)CUSTOM_ITEM_PARAM; + } } else { auto& randoSaveCheck = RANDO_SAVE_CHECKS[CUSTOM_ITEM_PARAM]; randoItemId = |
