about summary refs log tree commit diff stats
path: root/src/subway_map.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-07-24 13:36:07 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-07-24 13:36:07 -0400
commit4ffb5871e4bc54ab6765fcd738835c295d1e2924 (patch)
tree47d9521046ae6b628ec3b64d5a2890e6a26bcbbf /src/subway_map.cpp
parent1a935f45c98905a20a13265ae0d00f9674ec4ea6 (diff)
downloadlingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.tar.gz
lingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.tar.bz2
lingo-ap-tracker-4ffb5871e4bc54ab6765fcd738835c295d1e2924.zip
Pilgrim Antechamber sunwarp now shows if pilgrimage is doable
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp20
1 files changed, 19 insertions, 1 deletions
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() {
107 107
108 if (!AP_IsSunwarpShuffle() && subway_item.sunwarp && 108 if (!AP_IsSunwarpShuffle() && subway_item.sunwarp &&
109 subway_item.sunwarp->type != SubwaySunwarpType::kFinal) { 109 subway_item.sunwarp->type != SubwaySunwarpType::kFinal) {
110 std::string tag = fmt::format("subway{}", subway_item.sunwarp->dots); 110 std::string tag = fmt::format("sunwarp{}", subway_item.sunwarp->dots);
111 tagged[tag].push_back(subway_item.id); 111 tagged[tag].push_back(subway_item.id);
112 } 112 }
113 113
@@ -119,6 +119,9 @@ void SubwayMap::OnConnect() {
119 } 119 }
120 120
121 if (AP_IsSunwarpShuffle()) { 121 if (AP_IsSunwarpShuffle()) {
122 SubwaySunwarp final_sunwarp{.dots = 6, .type = SubwaySunwarpType::kFinal};
123 int final_sunwarp_item = GD_GetSubwayItemForSunwarp(final_sunwarp);
124
122 for (const auto &[index, mapping] : AP_GetSunwarpMapping()) { 125 for (const auto &[index, mapping] : AP_GetSunwarpMapping()) {
123 std::string tag = fmt::format("sunwarp{}", mapping.dots); 126 std::string tag = fmt::format("sunwarp{}", mapping.dots);
124 127
@@ -142,6 +145,11 @@ void SubwayMap::OnConnect() {
142 145
143 tagged[tag].push_back(GD_GetSubwayItemForSunwarp(fromWarp)); 146 tagged[tag].push_back(GD_GetSubwayItemForSunwarp(fromWarp));
144 tagged[tag].push_back(GD_GetSubwayItemForSunwarp(toWarp)); 147 tagged[tag].push_back(GD_GetSubwayItemForSunwarp(toWarp));
148
149 networks_.AddLinkToNetwork(
150 final_sunwarp_item, GD_GetSubwayItemForSunwarp(fromWarp),
151 mapping.dots == 6 ? final_sunwarp_item
152 : GD_GetSubwayItemForSunwarp(toWarp));
145 } 153 }
146 } 154 }
147 155
@@ -570,6 +578,16 @@ void SubwayMap::Redraw() {
570 brush_color = wxRED_BRUSH; 578 brush_color = wxRED_BRUSH;
571 } 579 }
572 } 580 }
581 } else if (subway_item.sunwarp &&
582 subway_item.sunwarp->type == SubwaySunwarpType::kFinal &&
583 AP_IsPilgrimageEnabled()) {
584 draw_type = ItemDrawType::kBox;
585
586 if (IsPilgrimageDoable()) {
587 brush_color = wxGREEN_BRUSH;
588 } else {
589 brush_color = wxRED_BRUSH;
590 }
573 } else if (!subway_item.paintings.empty()) { 591 } else if (!subway_item.paintings.empty()) {
574 if (AP_IsPaintingShuffle()) { 592 if (AP_IsPaintingShuffle()) {
575 bool has_checked_painting = false; 593 bool has_checked_painting = false;