mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-01 13:52:19 -05:00
Checks Tracker only shows checked locations once in game
This commit is contained in:
parent
b6c0775f1b
commit
44b7d72916
@ -717,6 +717,7 @@ void DrawLocations() {
|
|||||||
|
|
||||||
bool lastItemFound = false;
|
bool lastItemFound = false;
|
||||||
bool doAreaScroll = false;
|
bool doAreaScroll = false;
|
||||||
|
bool inGame = gGlobalCtx != nullptr && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2;
|
||||||
RandomizerCheckArea currentArea = RCAREA_INVALID;
|
RandomizerCheckArea currentArea = RCAREA_INVALID;
|
||||||
if (gGlobalCtx != nullptr)
|
if (gGlobalCtx != nullptr)
|
||||||
currentArea = RandomizerCheckObjects::GetRCAreaBySceneID((SceneID)gGlobalCtx->sceneNum);
|
currentArea = RandomizerCheckObjects::GetRCAreaBySceneID((SceneID)gGlobalCtx->sceneNum);
|
||||||
@ -743,7 +744,7 @@ void DrawLocations() {
|
|||||||
}
|
}
|
||||||
for (auto& locationIt : rcObjects) {
|
for (auto& locationIt : rcObjects) {
|
||||||
// If the location has its scene flag set
|
// If the location has its scene flag set
|
||||||
if (HasItemBeenCollected(locationIt.second)) { // && checkedLocations.find(locationIt.rc) != checkedLocations.end()) {
|
if (inGame && HasItemBeenCollected(locationIt.second)) { // && checkedLocations.find(locationIt.rc) != checkedLocations.end()) {
|
||||||
// show it as checked
|
// show it as checked
|
||||||
checkedLocations.insert(locationIt.second.rc);
|
checkedLocations.insert(locationIt.second.rc);
|
||||||
|
|
||||||
@ -819,8 +820,8 @@ void DrawLocations() {
|
|||||||
auto elfound = checkedLocations.find(locationIt.second.rc);
|
auto elfound = checkedLocations.find(locationIt.second.rc);
|
||||||
if (locationIt.second.visibleInImgui && elfound != checkedLocations.end()) {
|
if (locationIt.second.visibleInImgui && elfound != checkedLocations.end()) {
|
||||||
// If the location has its scene flag set
|
// If the location has its scene flag set
|
||||||
if (!HasItemBeenCollected(locationIt.second)) {
|
if (!inGame || !HasItemBeenCollected(locationIt.second)) {
|
||||||
// show it as checked
|
// show it as unchecked
|
||||||
checkedLocations.erase(locationIt.second.rc);
|
checkedLocations.erase(locationIt.second.rc);
|
||||||
} else if (ImGui::ArrowButton(std::to_string(locationIt.second.rc).c_str(), ImGuiDir_Left)) {
|
} else if (ImGui::ArrowButton(std::to_string(locationIt.second.rc).c_str(), ImGuiDir_Left)) {
|
||||||
checkedLocations.erase(elfound);
|
checkedLocations.erase(elfound);
|
||||||
|
Loading…
Reference in New Issue
Block a user