about summary refs log tree commit diff stats
path: root/tracker_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-03 14:09:40 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-03 14:09:40 -0400
commitdc4a14397ae226d91041389c2a47993f9c22f83d (patch)
treee881fcac382d53961899bd60565ef77422101f6d /tracker_state.cpp
parent02c331f4e766558bba580d5b7db883357be005d5 (diff)
downloadlingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.gz
lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.bz2
lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.zip
Added painting shuffle support
Diffstat (limited to 'tracker_state.cpp')
-rw-r--r--tracker_state.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tracker_state.cpp b/tracker_state.cpp index a84dd6e..169d301 100644 --- a/tracker_state.cpp +++ b/tracker_state.cpp
@@ -99,7 +99,22 @@ void TrackerState::CalculateState() {
99 const Room& room_obj = 99 const Room& room_obj =
100 GetGameData().GetRoom(room_exit.destination_room); 100 GetGameData().GetRoom(room_exit.destination_room);
101 for (const Exit& out_edge : room_obj.exits) { 101 for (const Exit& out_edge : room_obj.exits) {
102 new_boundary.push_back(out_edge); 102 if (!out_edge.painting || !GetAPState().IsPaintingShuffle()) {
103 new_boundary.push_back(out_edge);
104 }
105 }
106
107 if (GetAPState().IsPaintingShuffle()) {
108 for (const PaintingExit& out_edge : room_obj.paintings) {
109 if (GetAPState().GetPaintingMapping().count(out_edge.id)) {
110 Exit painting_exit;
111 painting_exit.destination_room = GetGameData().GetRoomForPainting(
112 GetAPState().GetPaintingMapping().at(out_edge.id));
113 painting_exit.door = out_edge.door;
114
115 new_boundary.push_back(painting_exit);
116 }
117 }
103 } 118 }
104 } 119 }
105 } 120 }