summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-09-25 17:31:18 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-09-25 17:31:18 +0200
commit238bdb7e3eba4f039234998380b2ad70e4162060 (patch)
treebc8dffe27ef5907080124a407374fabd545a2da4 /core/include
parentbbb7fb9c27423fb25b7d81fbb79d20d578281fc8 (diff)
downloadturns-238bdb7e3eba4f039234998380b2ad70e4162060.tar.xz
turns-238bdb7e3eba4f039234998380b2ad70e4162060.zip
core: add ::defeated property to participant
Diffstat (limited to 'core/include')
-rw-r--r--core/include/turns/core/participant.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/include/turns/core/participant.hpp b/core/include/turns/core/participant.hpp
index cd99fbb..a58e198 100644
--- a/core/include/turns/core/participant.hpp
+++ b/core/include/turns/core/participant.hpp
@@ -24,6 +24,11 @@ namespace turns::core
auto operator<=>(participant const & other) const noexcept -> std::partial_ordering;
+ auto defeated(this auto && self)
+ {
+ return self.m_defeated.get_proxy();
+ }
+
template<typename Self>
auto disposition(this Self && self)
{
@@ -51,6 +56,7 @@ namespace turns::core
auto serialize() -> nlohmann::json;
private:
+ Glib::Property<bool> m_defeated{*this, "defeated", false};
Glib::Property<core::disposition> m_disposition{*this, "disposition", core::disposition::neutral};
Glib::Property<bool> m_is_active{*this, "active", false};
Glib::Property<Glib::ustring> m_name{*this, "name", ""};