aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/military/UnitInstance.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-19 00:25:38 +0200
committer hop311 <hop3114@gmail.com>2024-07-19 00:26:27 +0200
commitd8baf57d46539da9edba5952f73089bf9a54bdaf (patch)
tree6d2de5221d2b1945a065e0abba8198d8a052a92a /src/openvic-simulation/military/UnitInstance.hpp
parenta673f89bb2705826b1c646365eab1775727372b7 (diff)
Unit position/country/leader handling + more use of unit branch templatesunit-work
Diffstat (limited to 'src/openvic-simulation/military/UnitInstance.hpp')
-rw-r--r--src/openvic-simulation/military/UnitInstance.hpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/openvic-simulation/military/UnitInstance.hpp b/src/openvic-simulation/military/UnitInstance.hpp
index 1480591..5ff4503 100644
--- a/src/openvic-simulation/military/UnitInstance.hpp
+++ b/src/openvic-simulation/military/UnitInstance.hpp
@@ -22,19 +22,12 @@ namespace OpenVic {
fixed_point_t PROPERTY_RW(strength);
protected:
- UnitInstance(std::string_view new_unit_name, _UnitType const& new_unit_type) :
- unit_name { new_unit_name },
- unit_type { new_unit_type },
- organisation { new_unit_type.get_default_organisation() }, //TODO: modifiers
- morale { 0 }, //TODO: modifiers
- strength { new_unit_type.get_max_strength() } {}
+ UnitInstance(std::string_view new_unit_name, _UnitType const& new_unit_type);
public:
UnitInstance(UnitInstance&&) = default;
- void set_unit_name(std::string_view new_unit_name) {
- unit_name = new_unit_name;
- }
+ void set_unit_name(std::string_view new_unit_name);
};
struct Pop;