From dc4a14397ae226d91041389c2a47993f9c22f83d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 3 May 2023 14:09:40 -0400 Subject: Added painting shuffle support --- tracker_state.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tracker_state.cpp') 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() { const Room& room_obj = GetGameData().GetRoom(room_exit.destination_room); for (const Exit& out_edge : room_obj.exits) { - new_boundary.push_back(out_edge); + if (!out_edge.painting || !GetAPState().IsPaintingShuffle()) { + new_boundary.push_back(out_edge); + } + } + + if (GetAPState().IsPaintingShuffle()) { + for (const PaintingExit& out_edge : room_obj.paintings) { + if (GetAPState().GetPaintingMapping().count(out_edge.id)) { + Exit painting_exit; + painting_exit.destination_room = GetGameData().GetRoomForPainting( + GetAPState().GetPaintingMapping().at(out_edge.id)); + painting_exit.door = out_edge.door; + + new_boundary.push_back(painting_exit); + } + } } } } -- cgit 1.4.1