mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07:00
Check tracker show logic (#3972)
* Initial Implementation * Fix missing locations * Update locacc_castle_town.cpp --------- Co-authored-by: Christopher Leggett <chris@leggett.dev>
This commit is contained in:
parent
f88883044e
commit
8b001da317
22 changed files with 920 additions and 850 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "dungeon.h"
|
||||
#include "../../OTRGlobals.h"
|
||||
#include "../../UIWidgets.hpp"
|
||||
#include "3drando/location_access.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -927,6 +928,8 @@ void CheckTrackerWindow::DrawElement() {
|
|||
return;
|
||||
}
|
||||
|
||||
AreaTable_Init();
|
||||
|
||||
ImGui::TableNextRow(0, headerHeight);
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::EnhancementCheckbox(
|
||||
|
@ -1561,6 +1564,19 @@ void DrawLocation(RandomizerCheck rc) {
|
|||
ImGui::Text(" (%s)", txt.c_str());
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerOptionShowLogic", 0)) {
|
||||
std::vector<LocationAccess> locationsInRegion = areaTable[itemLoc->GetParentRegionKey()].locations;
|
||||
for (auto& locationInRegion : locationsInRegion) {
|
||||
if (locationInRegion.GetLocation() == rc) {
|
||||
std::string conditionStr = locationInRegion.GetConditionStr();
|
||||
if (conditionStr != "true") {
|
||||
UIWidgets::InsertHelpHoverText(conditionStr);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static std::set<std::string> rainbowCVars = {
|
||||
|
@ -1698,6 +1714,8 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
|||
RecalculateAreaTotals();
|
||||
}
|
||||
UIWidgets::Tooltip("If enabled, will show GS locations in the tracker regardless of tokensanity settings.");
|
||||
UIWidgets::EnhancementCheckbox("Show Logic", "gCheckTrackerOptionShowLogic");
|
||||
UIWidgets::Tooltip("If enabled, will show a check's logic when hovering over it.");
|
||||
|
||||
// Filtering settings
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue