aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military/LeaderTrait.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-22 23:11:42 +0100
committer GitHub <noreply@github.com>2023-11-22 23:11:42 +0100
commita54898b7770e0d66b729216173960686c67e58bb (patch)
treeaf8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/military/LeaderTrait.cpp
parente76336cd92639f4ec71088fc4c80aea4c25528cd (diff)
parent738a203e0d8b4df87c42888043b99c13d5d97511 (diff)
Merge pull request #78 from OpenVicProject/property-macro
Refactoring (*mostly* related to the property macro)
Diffstat (limited to 'src/openvic-simulation/military/LeaderTrait.cpp')
-rw-r--r--src/openvic-simulation/military/LeaderTrait.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/openvic-simulation/military/LeaderTrait.cpp b/src/openvic-simulation/military/LeaderTrait.cpp
index df87e4e..46cd94a 100644
--- a/src/openvic-simulation/military/LeaderTrait.cpp
+++ b/src/openvic-simulation/military/LeaderTrait.cpp
@@ -4,22 +4,14 @@ using namespace OpenVic;
using namespace OpenVic::NodeTools;
LeaderTrait::LeaderTrait(std::string_view new_identifier, trait_type_t new_type, ModifierValue&& new_modifiers)
- : HasIdentifier { new_identifier }, type { new_type }, modifiers { std::move(new_modifiers) } {}
-
-LeaderTrait::trait_type_t LeaderTrait::get_trait_type() const {
- return type;
-}
+ : HasIdentifier { new_identifier }, trait_type { new_type }, modifiers { std::move(new_modifiers) } {}
bool LeaderTrait::is_personality_trait() const {
- return type == trait_type_t::PERSONALITY;
+ return trait_type == trait_type_t::PERSONALITY;
}
bool LeaderTrait::is_background_trait() const {
- return type == trait_type_t::BACKGROUND;
-}
-
-ModifierValue const& LeaderTrait::get_modifiers() const {
- return modifiers;
+ return trait_type == trait_type_t::BACKGROUND;
}
LeaderTraitManager::LeaderTraitManager() : leader_traits { "leader trait" } {}