only hint when entrance shuffled

This commit is contained in:
Demur Rumed 2025-05-24 03:44:41 +00:00
commit 48677acaf4
2 changed files with 17 additions and 10 deletions

View file

@ -739,7 +739,7 @@ void EntranceTrackerSettingsWindow::DrawElement() {
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
UIWidgets::CVarCheckbox(
"Show Source", CVAR_TRACKER_ENTRANCE("ShowFrom"),
UIWidgets::CheckboxOptions().Tooltip("Reveal the sourcefor undiscovered entrances").Color(THEME_COLOR));
UIWidgets::CheckboxOptions().Tooltip("Reveal the source for undiscovered entrances").Color(THEME_COLOR));
UIWidgets::CVarCheckbox("Show Destination", CVAR_TRACKER_ENTRANCE("ShowTo"),
UIWidgets::CheckboxOptions()
.Tooltip("Reveal the destination for undiscovered entrances")
@ -836,7 +836,7 @@ void EntranceTrackerWindow::DrawElement() {
ImGui::BeginChild("ChildEntranceTrackerLocations", ImVec2(0, -8));
bool showTo = CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowTo"), 0);
bool showFrom = CVarGetInteger(CVAR_TRACKER_ENTRANCE("ShowFrom"), 0);
bool collapsUndiscovered = CVarGetInteger(CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), 0);
bool collapseUndiscovered = CVarGetInteger(CVAR_TRACKER_ENTRANCE("CollapseUndiscovered"), 0);
bool highlightPrevious = CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightPrevious"), 0);
bool highlightAvailable = CVarGetInteger(CVAR_TRACKER_ENTRANCE("HighlightAvailable"), 0);
bool hideReverse = CVarGetInteger(CVAR_TRACKER_ENTRANCE("HideReverseEntrances"), 1);
@ -892,7 +892,7 @@ void EntranceTrackerWindow::DrawElement() {
const char* rplcDstName = showOverride ? override->destination.c_str() : "";
// Filter for entrances by group name, type, source/destination names, and meta tags
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !collapsUndiscovered)) ||
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !collapseUndiscovered)) ||
((showOriginal &&
(locationSearch.PassFilter(origSrcName) || locationSearch.PassFilter(origSrcAreaName) ||
locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) ||

View file

@ -2294,7 +2294,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
entrance = ENTR_DEATH_MOUNTAIN_TRAIL_BOTTOM_EXIT;
break;
case TEXT_DMT_DC:
entrance = ENTR_DEATH_MOUNTAIN_CRATER_UPPER_EXIT;
entrance = ENTR_DEATH_MOUNTAIN_TRAIL_OUTSIDE_DODONGOS_CAVERN;
break;
case TEXT_GC_SIGN:
if (gPlayState->sceneNum == SCENE_DEATH_MOUNTAIN_TRAIL) {
@ -2370,12 +2370,19 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
break;
}
if (entrance != -1) {
auto data = GetEntranceData(Entrance_GetOverride(entrance));
if (data != nullptr) {
Entrance_SetEntranceDiscovered(entrance, false);
font->charTexBuf[0] = (TEXTBOX_TYPE_WOODEN << 4) | TEXTBOX_POS_BOTTOM;
return msgCtx->msgLength = font->msgLength = SohUtils::CopyStringToCharBuffer(
buffer, data->destination + CustomMessage::MESSAGE_END(), maxBufferSize);
auto entranceCtx = ctx->GetEntranceShuffler();
for (size_t i = 0; i < ENTRANCE_OVERRIDES_MAX_COUNT; i++) {
if (Entrance_EntranceIsNull(&entranceCtx->entranceOverrides[i])) {
break;
}
if (entranceCtx->entranceOverrides[i].index == entrance) {
s16 overrideIndex = entranceCtx->entranceOverrides[i].override;
Entrance_SetEntranceDiscovered(entrance, false);
auto data = GetEntranceData(overrideIndex);
font->charTexBuf[0] = (TEXTBOX_TYPE_WOODEN << 4) | TEXTBOX_POS_BOTTOM;
return msgCtx->msgLength = font->msgLength = SohUtils::CopyStringToCharBuffer(
buffer, data->source + CustomMessage::MESSAGE_END(), maxBufferSize);
}
}
}
}