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-05-15 12:11:00 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-15 12:11:00 -0400
commit3151ac6274e796f54f2d9269186f1fd2e69f90c3 (patch)
treebd23ebbef27a5ae53a0f548e4366db53e7b7de0b /src/subway_map.cpp
parenta5a6c1b8b902c960f8204f8d814ce579dfd5fa50 (diff)
downloadlingo-ap-tracker-3151ac6274e796f54f2d9269186f1fd2e69f90c3.tar.gz
lingo-ap-tracker-3151ac6274e796f54f2d9269186f1fd2e69f90c3.tar.bz2
lingo-ap-tracker-3151ac6274e796f54f2d9269186f1fd2e69f90c3.zip
Get checked paintings from server
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 99638aa..460532c 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -82,17 +82,21 @@ void SubwayMap::OnConnect() {
82} 82}
83 83
84void SubwayMap::UpdateIndicators() { 84void SubwayMap::UpdateIndicators() {
85 Redraw(); 85 if (AP_IsPaintingShuffle()) {
86} 86 for (const std::string &painting_id : AP_GetCheckedPaintings()) {
87 87 if (!checked_paintings_.count(painting_id)) {
88void SubwayMap::UpdatePainting(std::string from_painting_id, 88 checked_paintings_.insert(painting_id);
89 std::optional<std::string> to_painting_id) { 89
90 checked_paintings_.insert(from_painting_id); 90 if (AP_GetPaintingMapping().count(painting_id)) {
91 91 networks_.AddLink(GD_GetSubwayItemForPainting(painting_id),
92 if (to_painting_id) { 92 GD_GetSubwayItemForPainting(
93 networks_.AddLink(GD_GetSubwayItemForPainting(from_painting_id), 93 AP_GetPaintingMapping().at(painting_id)));
94 GD_GetSubwayItemForPainting(*to_painting_id)); 94 }
95 }
96 }
95 } 97 }
98
99 Redraw();
96} 100}
97 101
98void SubwayMap::UpdateSunwarp(SubwaySunwarp from_sunwarp, 102void SubwayMap::UpdateSunwarp(SubwaySunwarp from_sunwarp,