OSDN Git Service

[Refactor] #2666 フェーズアウト (段階的廃止)では意味が分からないので、観戦中という意味のis_watching 変数を新しく作り、AngbandSys...
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 30 Sep 2023 15:15:13 +0000 (00:15 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 28 Oct 2023 09:31:24 +0000 (18:31 +0900)
src/system/angband-system.cpp
src/system/angband-system.h

index ef12cc2..c353fff 100644 (file)
@@ -6,3 +6,13 @@ AngbandSystem &AngbandSystem::get_instance()
 {
     return instance;
 }
+
+void AngbandSystem::set_watch(bool new_status)
+{
+    this->watch_stat = new_status;
+}
+
+bool AngbandSystem::is_watching() const
+{
+    return this->watch_stat;
+}
index 234beca..d1750d3 100644 (file)
@@ -8,9 +8,12 @@ public:
     AngbandSystem &operator=(AngbandSystem &&) = delete;
 
     static AngbandSystem &get_instance();
+    void set_watch(bool new_status);
+    bool is_watching() const;
 
 private:
     AngbandSystem() = default;
 
     static AngbandSystem instance;
+    bool watch_stat = false; // カジノ闘技場の観戦状態等に利用。NPCの処理の対象にならず自身もほとんどの行動ができない.
 };