aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-09-22 10:48:18 +0200
committer wvpm <24685035+wvpm@users.noreply.github.com>2024-09-22 10:48:18 +0200
commitea9b695022d197d918f1bb4292a0f424018dad37 (patch)
tree15d46970d136b08da9adf53a86e54fa97675cab2 /src/openvic-simulation/economy
parent61ccb748627a3faeec282f53f746045d1a695517 (diff)
Map province history rgo to production type for province instance
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/production/ResourceGatheringOperation.cpp4
-rw-r--r--src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/openvic-simulation/economy/production/ResourceGatheringOperation.cpp b/src/openvic-simulation/economy/production/ResourceGatheringOperation.cpp
index 9bf6f49..92bf921 100644
--- a/src/openvic-simulation/economy/production/ResourceGatheringOperation.cpp
+++ b/src/openvic-simulation/economy/production/ResourceGatheringOperation.cpp
@@ -3,7 +3,7 @@
using namespace OpenVic;
ResourceGatheringOperation::ResourceGatheringOperation(
- ProductionType const& new_production_type,
+ ProductionType const* new_production_type,
fixed_point_t new_size_multiplier,
fixed_point_t new_revenue_yesterday,
fixed_point_t new_output_quantity_yesterday,
@@ -17,5 +17,5 @@ ResourceGatheringOperation::ResourceGatheringOperation(
employees { std::move(new_employees) } {}
ResourceGatheringOperation::ResourceGatheringOperation(
- ProductionType const& new_production_type, fixed_point_t new_size_multiplier
+ ProductionType const* new_production_type, fixed_point_t new_size_multiplier
) : ResourceGatheringOperation { new_production_type, new_size_multiplier, 0, 0, 0, {} } {}
diff --git a/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp b/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
index d71c569..7528d6d 100644
--- a/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
+++ b/src/openvic-simulation/economy/production/ResourceGatheringOperation.hpp
@@ -7,7 +7,7 @@
namespace OpenVic {
class ResourceGatheringOperation final {
private:
- ProductionType const& PROPERTY(production_type);
+ ProductionType const* PROPERTY_RW_ACCESS(production_type, public);
fixed_point_t PROPERTY(revenue_yesterday);
fixed_point_t PROPERTY(output_quantity_yesterday);
fixed_point_t PROPERTY(unsold_quantity_yesterday);
@@ -16,10 +16,10 @@ namespace OpenVic {
public:
ResourceGatheringOperation(
- ProductionType const& new_production_type, fixed_point_t new_size_multiplier, fixed_point_t new_revenue_yesterday,
+ ProductionType const* new_production_type, fixed_point_t new_size_multiplier, fixed_point_t new_revenue_yesterday,
fixed_point_t new_output_quantity_yesterday, fixed_point_t new_unsold_quantity_yesterday,
ordered_map<Pop*, Pop::pop_size_t>&& new_employees
);
- ResourceGatheringOperation(ProductionType const& new_production_type, fixed_point_t new_size_multiplier);
+ ResourceGatheringOperation(ProductionType const* new_production_type, fixed_point_t new_size_multiplier);
};
}