about summary refs log tree commit diff stats
path: root/src/subway_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 9bfedf9..5b3ff5f 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
@@ -555,6 +563,7 @@ void SubwayMap::Redraw() {
555 ItemDrawType draw_type = ItemDrawType::kNone; 563 ItemDrawType draw_type = ItemDrawType::kNone;
556 const wxBrush *brush_color = wxGREY_BRUSH; 564 const wxBrush *brush_color = wxGREY_BRUSH;
557 std::optional<wxColour> shade_color; 565 std::optional<wxColour> shade_color;
566 std::optional<int> subway_door = GetRealSubwayDoor(subway_item);
558 567
559 if (AP_HasEarlyColorHallways() && 568 if (AP_HasEarlyColorHallways() &&
560 subway_item.special == "starting_room_paintings") { 569 subway_item.special == "starting_room_paintings") {
@@ -570,6 +579,16 @@ void SubwayMap::Redraw() {
570 brush_color = wxRED_BRUSH; 579 brush_color = wxRED_BRUSH;
571 } 580 }
572 } 581 }
582 } else if (subway_item.sunwarp &&
583 subway_item.sunwarp->type == SubwaySunwarpType::kFinal &&
584 AP_IsPilgrimageEnabled()) {
585 draw_type = ItemDrawType::kBox;
586
587 if (IsPilgrimageDoable()) {
588 brush_color = wxGREEN_BRUSH;
589 } else {
590 brush_color = wxRED_BRUSH;
591 }
573 } else if (!subway_item.paintings.empty()) { 592 } else if (!subway_item.paintings.empty()) {
574 if (AP_IsPaintingShuffle()) { 593 if (AP_IsPaintingShuffle()) {
575 bool has_checked_painting = false; 594 bool has_checked_painting = false;
@@ -606,10 +625,10 @@ void SubwayMap::Redraw() {
606 } else if (!subway_item.tags.empty()) { 625 } else if (!subway_item.tags.empty()) {
607 draw_type = ItemDrawType::kOwl; 626 draw_type = ItemDrawType::kOwl;
608 } 627 }
609 } else if (subway_item.door) { 628 } else if (subway_door) {
610 draw_type = ItemDrawType::kBox; 629 draw_type = ItemDrawType::kBox;
611 630
612 if (IsDoorOpen(*subway_item.door)) { 631 if (IsDoorOpen(*subway_door)) {
613 brush_color = wxGREEN_BRUSH; 632 brush_color = wxGREEN_BRUSH;
614 } else { 633 } else {
615 brush_color = wxRED_BRUSH; 634 brush_color = wxRED_BRUSH;