diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-06 15:51:32 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-06 15:51:32 -0400 |
commit | 6f5287b3921c843a6b322ccbdfcbef00a8f16980 (patch) | |
tree | e136ec82d71dd6b01accabbe1a4fd522b36c4cbf /src/subway_map.cpp | |
parent | cb880c618ce031c95009b848cdf62dd61751c858 (diff) | |
download | lingo-ap-tracker-6f5287b3921c843a6b322ccbdfcbef00a8f16980.tar.gz lingo-ap-tracker-6f5287b3921c843a6b322ccbdfcbef00a8f16980.tar.bz2 lingo-ap-tracker-6f5287b3921c843a6b322ccbdfcbef00a8f16980.zip |
Handle special cases (ECH + Sun Painting)
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r-- | src/subway_map.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index b32c362..8364714 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp | |||
@@ -69,6 +69,12 @@ void SubwayMap::OnConnect() { | |||
69 | 69 | ||
70 | std::map<std::string, std::vector<int>> tagged; | 70 | std::map<std::string, std::vector<int>> tagged; |
71 | for (const SubwayItem &subway_item : GD_GetSubwayItems()) { | 71 | for (const SubwayItem &subway_item : GD_GetSubwayItems()) { |
72 | if (AP_HasEarlyColorHallways() && | ||
73 | (subway_item.special == "starting_room_paintings" || | ||
74 | subway_item.special == "early_color_hallways")) { | ||
75 | tagged["early_color_hallways"].push_back(subway_item.id); | ||
76 | } | ||
77 | |||
72 | if (AP_IsPaintingShuffle() && !subway_item.paintings.empty()) { | 78 | if (AP_IsPaintingShuffle() && !subway_item.paintings.empty()) { |
73 | continue; | 79 | continue; |
74 | } | 80 | } |
@@ -84,6 +90,12 @@ void SubwayMap::OnConnect() { | |||
84 | 90 | ||
85 | tagged[tag.str()].push_back(subway_item.id); | 91 | tagged[tag.str()].push_back(subway_item.id); |
86 | } | 92 | } |
93 | |||
94 | if (!AP_IsPilgrimageEnabled() && | ||
95 | (subway_item.special == "sun_painting" || | ||
96 | subway_item.special == "sun_painting_exit")) { | ||
97 | tagged["sun_painting"].push_back(subway_item.id); | ||
98 | } | ||
87 | } | 99 | } |
88 | 100 | ||
89 | for (const auto &[tag, items] : tagged) { | 101 | for (const auto &[tag, items] : tagged) { |
@@ -489,7 +501,27 @@ void SubwayMap::Redraw() { | |||
489 | const wxBrush *brush_color = wxGREY_BRUSH; | 501 | const wxBrush *brush_color = wxGREY_BRUSH; |
490 | std::optional<wxColour> shade_color; | 502 | std::optional<wxColour> shade_color; |
491 | 503 | ||
492 | if (!subway_item.paintings.empty()) { | 504 | if (AP_HasEarlyColorHallways() && |
505 | (subway_item.special == "starting_room_paintings" || | ||
506 | subway_item.special == "early_color_hallways")) { | ||
507 | draw_type = ItemDrawType::kOwl; | ||
508 | |||
509 | if (subway_item.special == "starting_room_paintings") { | ||
510 | shade_color = wxColour(0, 255, 0, 128); | ||
511 | } else { | ||
512 | shade_color = wxColour(255, 0, 0, 128); | ||
513 | } | ||
514 | } else if (subway_item.special == "sun_painting") { | ||
515 | if (!AP_IsPilgrimageEnabled()) { | ||
516 | if (IsDoorOpen(*subway_item.door)) { | ||
517 | draw_type = ItemDrawType::kOwl; | ||
518 | shade_color = wxColour(0, 255, 0, 128); | ||
519 | } else { | ||
520 | draw_type = ItemDrawType::kBox; | ||
521 | brush_color = wxRED_BRUSH; | ||
522 | } | ||
523 | } | ||
524 | } else if (!subway_item.paintings.empty()) { | ||
493 | if (AP_IsPaintingShuffle()) { | 525 | if (AP_IsPaintingShuffle()) { |
494 | bool has_checked_painting = false; | 526 | bool has_checked_painting = false; |
495 | bool has_unchecked_painting = false; | 527 | bool has_unchecked_painting = false; |