aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r--src/openvic-simulation/map/MapInstance.cpp4
-rw-r--r--src/openvic-simulation/map/MapInstance.hpp2
-rw-r--r--src/openvic-simulation/map/ProvinceInstance.cpp3
-rw-r--r--src/openvic-simulation/map/ProvinceInstance.hpp2
4 files changed, 9 insertions, 2 deletions
diff --git a/src/openvic-simulation/map/MapInstance.cpp b/src/openvic-simulation/map/MapInstance.cpp
index 860ec10..28bf189 100644
--- a/src/openvic-simulation/map/MapInstance.cpp
+++ b/src/openvic-simulation/map/MapInstance.cpp
@@ -43,6 +43,7 @@ ProvinceDefinition::index_t MapInstance::get_selected_province_index() const {
bool MapInstance::setup(
BuildingTypeManager const& building_type_manager,
+ MarketInstance& market_instance,
ModifierEffectCache const& modifier_effect_cache,
decltype(ProvinceInstance::pop_type_distribution)::keys_t const& pop_type_keys,
decltype(ProvinceInstance::ideology_distribution)::keys_t const& ideology_keys
@@ -61,7 +62,8 @@ bool MapInstance::setup(
province_instances.reserve(map_definition.get_province_definition_count());
for (ProvinceDefinition const& province : map_definition.get_province_definitions()) {
- ret &= province_instances.add_item({
+ ret &= province_instances.add_item({
+ market_instance,
modifier_effect_cache,
province,
pop_type_keys,
diff --git a/src/openvic-simulation/map/MapInstance.hpp b/src/openvic-simulation/map/MapInstance.hpp
index a498061..b45ff50 100644
--- a/src/openvic-simulation/map/MapInstance.hpp
+++ b/src/openvic-simulation/map/MapInstance.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "openvic-simulation/economy/trading/MarketInstance.hpp"
#include "openvic-simulation/map/ProvinceDefinition.hpp"
#include "openvic-simulation/map/ProvinceInstance.hpp"
#include "openvic-simulation/map/State.hpp"
@@ -44,6 +45,7 @@ namespace OpenVic {
bool setup(
BuildingTypeManager const& building_type_manager,
+ MarketInstance& market_instance,
ModifierEffectCache const& modifier_effect_cache,
decltype(ProvinceInstance::pop_type_distribution)::keys_t const& pop_type_keys,
decltype(ProvinceInstance::ideology_distribution)::keys_t const& ideology_keys
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp
index b5cca55..0a44faa 100644
--- a/src/openvic-simulation/map/ProvinceInstance.cpp
+++ b/src/openvic-simulation/map/ProvinceInstance.cpp
@@ -18,6 +18,7 @@
using namespace OpenVic;
ProvinceInstance::ProvinceInstance(
+ MarketInstance& new_market_instance,
ModifierEffectCache const& new_modifier_effect_cache,
ProvinceDefinition const& new_province_definition,
decltype(pop_type_distribution)::keys_t const& pop_type_keys,
@@ -35,7 +36,7 @@ ProvinceInstance::ProvinceInstance(
event_modifiers {},
slave { false },
crime { nullptr },
- rgo { new_modifier_effect_cache, pop_type_keys },
+ rgo { new_market_instance, new_modifier_effect_cache, pop_type_keys },
buildings { "buildings", false },
armies {},
navies {},
diff --git a/src/openvic-simulation/map/ProvinceInstance.hpp b/src/openvic-simulation/map/ProvinceInstance.hpp
index 997d025..f21e133 100644
--- a/src/openvic-simulation/map/ProvinceInstance.hpp
+++ b/src/openvic-simulation/map/ProvinceInstance.hpp
@@ -5,6 +5,7 @@
#include "openvic-simulation/economy/BuildingInstance.hpp"
#include "openvic-simulation/economy/production/ProductionType.hpp"
#include "openvic-simulation/economy/production/ResourceGatheringOperation.hpp"
+#include "openvic-simulation/economy/trading/MarketInstance.hpp"
#include "openvic-simulation/military/UnitInstance.hpp"
#include "openvic-simulation/military/UnitType.hpp"
#include "openvic-simulation/modifier/ModifierEffectCache.hpp"
@@ -104,6 +105,7 @@ namespace OpenVic {
size_t PROPERTY(max_supported_regiments);
ProvinceInstance(
+ MarketInstance& new_market_instance,
ModifierEffectCache const& new_modifier_effect_cache,
ProvinceDefinition const& new_province_definition,
decltype(pop_type_distribution)::keys_t const& pop_type_keys,