From d8baf57d46539da9edba5952f73089bf9a54bdaf Mon Sep 17 00:00:00 2001 From: hop311 Date: Thu, 18 Jul 2024 23:25:38 +0100 Subject: Unit position/country/leader handling + more use of unit branch templates --- src/openvic-simulation/military/Deployment.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/openvic-simulation/military/Deployment.cpp') diff --git a/src/openvic-simulation/military/Deployment.cpp b/src/openvic-simulation/military/Deployment.cpp index 9c89690..bd176be 100644 --- a/src/openvic-simulation/military/Deployment.cpp +++ b/src/openvic-simulation/military/Deployment.cpp @@ -5,20 +5,17 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; -RegimentDeployment::RegimentDeployment( +UnitDeployment::UnitDeployment( std::string_view new_name, RegimentType const& new_type, ProvinceDefinition const* new_home ) : name { new_name }, type { new_type }, home { new_home } {} -ShipDeployment::ShipDeployment(std::string_view new_name, ShipType const& new_type) +UnitDeployment::UnitDeployment(std::string_view new_name, ShipType const& new_type) : name { new_name }, type { new_type } {} -ArmyDeployment::ArmyDeployment( - std::string_view new_name, ProvinceDefinition const* new_location, std::vector&& new_regiments -) : name { new_name }, location { new_location }, regiments { std::move(new_regiments) } {} - -NavyDeployment::NavyDeployment( - std::string_view new_name, ProvinceDefinition const* new_location, std::vector&& new_ships -) : name { new_name }, location { new_location }, ships { std::move(new_ships) } {} +template +UnitDeploymentGroup::UnitDeploymentGroup( + std::string_view new_name, ProvinceDefinition const* new_location, std::vector<_Unit>&& new_units +) : name { new_name }, location { new_location }, units { std::move(new_units) } {} Deployment::Deployment( std::string_view new_path, std::vector&& new_armies, std::vector&& new_navies, -- cgit v1.2.3-56-ga3b1