From df558b353114434c760686235c94e2486183a097 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 3 Jul 2023 11:30:01 -0400 Subject: Doors show up in popups in definition order --- src/game_data.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/game_data.cpp') diff --git a/src/game_data.cpp b/src/game_data.cpp index 351f515..9d4dae0 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -43,6 +43,8 @@ struct GameData { std::map panel_by_id_; std::map area_by_id_; + std::vector door_definition_order_; + std::map room_by_painting_; std::vector achievement_panels_; @@ -194,6 +196,7 @@ struct GameData { for (const auto &door_it : room_it.second["doors"]) { int door_id = AddOrGetDoor(room_obj.name, door_it.first.as()); + door_definition_order_.push_back(door_id); Door &door_obj = doors_[door_id]; bool has_external_panels = false; @@ -347,7 +350,9 @@ struct GameData { } } - for (const Door &door : doors_) { + for (int door_id : door_definition_order_) { + const Door &door = doors_.at(door_id); + if (!door.skip_location) { int room_id = door.room; std::string area_name = rooms_[room_id].name; -- cgit 1.4.1