about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-07-03 11:30:01 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-07-03 11:30:01 -0400
commitdf558b353114434c760686235c94e2486183a097 (patch)
tree104fc6611081b7bd71a159f47ef91246dfabce2b
parent3af02f574b5007857b2e56f4cae22d780e9700e6 (diff)
downloadlingo-ap-tracker-df558b353114434c760686235c94e2486183a097.tar.gz
lingo-ap-tracker-df558b353114434c760686235c94e2486183a097.tar.bz2
lingo-ap-tracker-df558b353114434c760686235c94e2486183a097.zip
Doors show up in popups in definition order
-rw-r--r--src/game_data.cpp7
1 files changed, 6 insertions, 1 deletions
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 {
43 std::map<std::string, int> panel_by_id_; 43 std::map<std::string, int> panel_by_id_;
44 std::map<std::string, int> area_by_id_; 44 std::map<std::string, int> area_by_id_;
45 45
46 std::vector<int> door_definition_order_;
47
46 std::map<std::string, int> room_by_painting_; 48 std::map<std::string, int> room_by_painting_;
47 49
48 std::vector<int> achievement_panels_; 50 std::vector<int> achievement_panels_;
@@ -194,6 +196,7 @@ struct GameData {
194 for (const auto &door_it : room_it.second["doors"]) { 196 for (const auto &door_it : room_it.second["doors"]) {
195 int door_id = 197 int door_id =
196 AddOrGetDoor(room_obj.name, door_it.first.as<std::string>()); 198 AddOrGetDoor(room_obj.name, door_it.first.as<std::string>());
199 door_definition_order_.push_back(door_id);
197 Door &door_obj = doors_[door_id]; 200 Door &door_obj = doors_[door_id];
198 201
199 bool has_external_panels = false; 202 bool has_external_panels = false;
@@ -347,7 +350,9 @@ struct GameData {
347 } 350 }
348 } 351 }
349 352
350 for (const Door &door : doors_) { 353 for (int door_id : door_definition_order_) {
354 const Door &door = doors_.at(door_id);
355
351 if (!door.skip_location) { 356 if (!door.skip_location) {
352 int room_id = door.room; 357 int room_id = door.room;
353 std::string area_name = rooms_[room_id].name; 358 std::string area_name = rooms_[room_id].name;