From 738d970d26794db8bb3dcf459c4a787b624910ba Mon Sep 17 00:00:00 2001 From: art0007i Date: Tue, 24 Sep 2024 15:11:32 +0200 Subject: make paintings 1 directional and add "arrows" the "arrows" are circles because I couldn't figure out how to use the DrawPolygon function... --- src/game_data.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/game_data.cpp') diff --git a/src/game_data.cpp b/src/game_data.cpp index c39e239..7b805df 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp @@ -681,6 +681,18 @@ struct GameData { } } + if (subway_it["entrances"]) { + for (const auto &entrance_it : subway_it["entrances"]) { + subway_item.entrances.push_back(entrance_it.as()); + } + } + + if (subway_it["exits"]) { + for (const auto &exit_it : subway_it["exits"]) { + subway_item.exits.push_back(exit_it.as()); + } + } + if (subway_it["sunwarp"]) { SubwaySunwarp sunwarp; sunwarp.dots = subway_it["sunwarp"]["dots"].as(); @@ -792,6 +804,11 @@ GameData &GetState() { } // namespace +bool SubwayItem::HasWarps() const { + return !(this->tags.empty() && this->entrances.empty() && + this->exits.empty()); +} + bool SubwaySunwarp::operator<(const SubwaySunwarp &rhs) const { return std::tie(dots, type) < std::tie(rhs.dots, rhs.type); } -- cgit 1.4.1