From 6f5287b3921c843a6b322ccbdfcbef00a8f16980 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 6 Jun 2024 15:51:32 -0400 Subject: Handle special cases (ECH + Sun Painting) --- src/subway_map.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/subway_map.cpp') 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() { std::map> tagged; for (const SubwayItem &subway_item : GD_GetSubwayItems()) { + if (AP_HasEarlyColorHallways() && + (subway_item.special == "starting_room_paintings" || + subway_item.special == "early_color_hallways")) { + tagged["early_color_hallways"].push_back(subway_item.id); + } + if (AP_IsPaintingShuffle() && !subway_item.paintings.empty()) { continue; } @@ -84,6 +90,12 @@ void SubwayMap::OnConnect() { tagged[tag.str()].push_back(subway_item.id); } + + if (!AP_IsPilgrimageEnabled() && + (subway_item.special == "sun_painting" || + subway_item.special == "sun_painting_exit")) { + tagged["sun_painting"].push_back(subway_item.id); + } } for (const auto &[tag, items] : tagged) { @@ -489,7 +501,27 @@ void SubwayMap::Redraw() { const wxBrush *brush_color = wxGREY_BRUSH; std::optional shade_color; - if (!subway_item.paintings.empty()) { + if (AP_HasEarlyColorHallways() && + (subway_item.special == "starting_room_paintings" || + subway_item.special == "early_color_hallways")) { + draw_type = ItemDrawType::kOwl; + + if (subway_item.special == "starting_room_paintings") { + shade_color = wxColour(0, 255, 0, 128); + } else { + shade_color = wxColour(255, 0, 0, 128); + } + } else if (subway_item.special == "sun_painting") { + if (!AP_IsPilgrimageEnabled()) { + if (IsDoorOpen(*subway_item.door)) { + draw_type = ItemDrawType::kOwl; + shade_color = wxColour(0, 255, 0, 128); + } else { + draw_type = ItemDrawType::kBox; + brush_color = wxRED_BRUSH; + } + } + } else if (!subway_item.paintings.empty()) { if (AP_IsPaintingShuffle()) { bool has_checked_painting = false; bool has_unchecked_painting = false; -- cgit 1.4.1