From c1de3fe969a686dbe1d17bdd3dfe7e9d4251f17b Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 14 May 2024 13:02:13 -0400 Subject: Warn on singleton subway tag data --- src/game_data.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/game_data.cpp') diff --git a/src/game_data.cpp b/src/game_data.cpp index 7bc3134..8af57e5 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -651,6 +651,20 @@ struct GameData { subway_items_.push_back(subway_item); } + + // Find singleton subway tags. + std::map> subway_tags; + for (const SubwayItem &subway_item : subway_items_) { + for (const std::string &tag : subway_item.tags) { + subway_tags[tag].insert(subway_item.id); + } + } + + for (const auto &[tag, items] : subway_tags) { + if (items.size() == 1) { + wxLogWarning("Singleton subway item tag: %s", tag); + } + } } int AddOrGetRoom(std::string room) { -- cgit 1.4.1