about summary refs log tree commit diff stats
path: root/src/game_data.cpp
diff options
context:
space:
mode:
authorart0007i <art0007i@gmail.com>2024-09-24 15:11:32 +0200
committerStar Rauchenberger <fefferburbia@gmail.com>2024-09-24 09:38:26 -0400
commit738d970d26794db8bb3dcf459c4a787b624910ba (patch)
treec5ea9e5eed9ebbab72f5a6cdfc84ca684816001f /src/game_data.cpp
parent46f46b4caa0fbaba77ac2b2291d908d3bf81dd28 (diff)
downloadlingo-ap-tracker-738d970d26794db8bb3dcf459c4a787b624910ba.tar.gz
lingo-ap-tracker-738d970d26794db8bb3dcf459c4a787b624910ba.tar.bz2
lingo-ap-tracker-738d970d26794db8bb3dcf459c4a787b624910ba.zip
make paintings 1 directional and add "arrows" the "arrows" are circles because I couldn't figure out how to use the DrawPolygon function...
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r--src/game_data.cpp17
1 files changed, 17 insertions, 0 deletions
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 {
681 } 681 }
682 } 682 }
683 683
684 if (subway_it["entrances"]) {
685 for (const auto &entrance_it : subway_it["entrances"]) {
686 subway_item.entrances.push_back(entrance_it.as<std::string>());
687 }
688 }
689
690 if (subway_it["exits"]) {
691 for (const auto &exit_it : subway_it["exits"]) {
692 subway_item.exits.push_back(exit_it.as<std::string>());
693 }
694 }
695
684 if (subway_it["sunwarp"]) { 696 if (subway_it["sunwarp"]) {
685 SubwaySunwarp sunwarp; 697 SubwaySunwarp sunwarp;
686 sunwarp.dots = subway_it["sunwarp"]["dots"].as<int>(); 698 sunwarp.dots = subway_it["sunwarp"]["dots"].as<int>();
@@ -792,6 +804,11 @@ GameData &GetState() {
792 804
793} // namespace 805} // namespace
794 806
807bool SubwayItem::HasWarps() const {
808 return !(this->tags.empty() && this->entrances.empty() &&
809 this->exits.empty());
810}
811
795bool SubwaySunwarp::operator<(const SubwaySunwarp &rhs) const { 812bool SubwaySunwarp::operator<(const SubwaySunwarp &rhs) const {
796 return std::tie(dots, type) < std::tie(rhs.dots, rhs.type); 813 return std::tie(dots, type) < std::tie(rhs.dots, rhs.type);
797} 814}