diff options
Diffstat (limited to 'src/openvic-simulation/map/ProvinceInstance.cpp')
-rw-r--r-- | src/openvic-simulation/map/ProvinceInstance.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp index 9e7fd6e..ffcdfa1 100644 --- a/src/openvic-simulation/map/ProvinceInstance.cpp +++ b/src/openvic-simulation/map/ProvinceInstance.cpp @@ -39,20 +39,17 @@ ProvinceInstance::ProvinceInstance( religion_distribution {}, max_supported_regiments { 0 } {} - GoodDefinition const* ProvinceInstance::get_rgo_good() const { - if(rgo == nullptr) { return nullptr; } - return rgo->get_production_type()->get_output_good(); - } - void ProvinceInstance::set_rgo_production_type(ProductionType const& production_type) { - if(production_type.get_template_type() != ProductionType::template_type_t::RGO) { - //error - } - - //recalculate rgo size? - //convert pops farmers <> labourers - - rgo->set_production_type(&production_type); - } +GoodDefinition const* ProvinceInstance::get_rgo_good() const { + if(rgo == nullptr) { return nullptr; } + return rgo->get_production_type()->get_output_good(); +} +void ProvinceInstance::set_rgo_production_type(ProductionType const& rgo_production_type) { + if(rgo_production_type.get_template_type() != ProductionType::template_type_t::RGO) { + //error + } + convert_rgo_worker_pops_to_equivalent(rgo_production_type); + rgo->set_production_type(&rgo_production_type); +} bool ProvinceInstance::set_owner(CountryInstance* new_owner) { bool ret = true; |