From 4ffb5871e4bc54ab6765fcd738835c295d1e2924 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 24 Jul 2024 13:36:07 -0400 Subject: Pilgrim Antechamber sunwarp now shows if pilgrimage is doable --- src/subway_map.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/subway_map.cpp') diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 9bfedf9..e7ac317 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp @@ -107,7 +107,7 @@ void SubwayMap::OnConnect() { if (!AP_IsSunwarpShuffle() && subway_item.sunwarp && subway_item.sunwarp->type != SubwaySunwarpType::kFinal) { - std::string tag = fmt::format("subway{}", subway_item.sunwarp->dots); + std::string tag = fmt::format("sunwarp{}", subway_item.sunwarp->dots); tagged[tag].push_back(subway_item.id); } @@ -119,6 +119,9 @@ void SubwayMap::OnConnect() { } if (AP_IsSunwarpShuffle()) { + SubwaySunwarp final_sunwarp{.dots = 6, .type = SubwaySunwarpType::kFinal}; + int final_sunwarp_item = GD_GetSubwayItemForSunwarp(final_sunwarp); + for (const auto &[index, mapping] : AP_GetSunwarpMapping()) { std::string tag = fmt::format("sunwarp{}", mapping.dots); @@ -142,6 +145,11 @@ void SubwayMap::OnConnect() { tagged[tag].push_back(GD_GetSubwayItemForSunwarp(fromWarp)); tagged[tag].push_back(GD_GetSubwayItemForSunwarp(toWarp)); + + networks_.AddLinkToNetwork( + final_sunwarp_item, GD_GetSubwayItemForSunwarp(fromWarp), + mapping.dots == 6 ? final_sunwarp_item + : GD_GetSubwayItemForSunwarp(toWarp)); } } @@ -570,6 +578,16 @@ void SubwayMap::Redraw() { brush_color = wxRED_BRUSH; } } + } else if (subway_item.sunwarp && + subway_item.sunwarp->type == SubwaySunwarpType::kFinal && + AP_IsPilgrimageEnabled()) { + draw_type = ItemDrawType::kBox; + + if (IsPilgrimageDoable()) { + brush_color = wxGREEN_BRUSH; + } else { + brush_color = wxRED_BRUSH; + } } else if (!subway_item.paintings.empty()) { if (AP_IsPaintingShuffle()) { bool has_checked_painting = false; -- cgit 1.4.1