From adaba10aa7d8e504d3d10bfda42cb79b3ade459e Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 30 Apr 2025 11:07:25 +0200 Subject: core: add getters and setters for Participant --- core/src/participant.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'core/src') diff --git a/core/src/participant.cpp b/core/src/participant.cpp index d4b3835..343d461 100644 --- a/core/src/participant.cpp +++ b/core/src/participant.cpp @@ -53,6 +53,56 @@ namespace turns::core return m_priority <=> other.m_priority; } + auto Participant::get_disposition() const -> disposition + { + return m_disposition.get_value(); + } + + auto Participant::get_is_active() const -> bool + { + return m_is_active.get_value(); + } + + auto Participant::get_is_defeated() const -> bool + { + return m_is_defeated.get_value(); + } + + auto Participant::get_name() const -> Glib::ustring + { + return m_name.get_value(); + } + + auto Participant::get_priority() const -> float + { + return m_priority.get_value(); + } + + auto Participant::set_disposition(disposition value) -> void + { + return m_disposition.set_value(value); + } + + auto Participant::set_is_active(bool value) -> void + { + return m_is_active.set_value(value); + } + + auto Participant::set_is_defeated(bool value) -> void + { + return m_is_defeated.set_value(value); + } + + auto Participant::set_name(Glib::ustring const & value) -> void + { + return m_name.set_value(value); + } + + auto Participant::set_priority(float value) -> void + { + return m_priority.set_value(value); + } + auto Participant::serialize() -> nlohmann::json { return nlohmann::json{ -- cgit v1.2.3