aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-10-20 10:16:38 +0200
committer hop311 <hop3114@gmail.com>2023-10-20 10:16:38 +0200
commitd2e91829abc8dd46fa4685d1cab89ef6fe907471 (patch)
tree3a3c32d8f631fefda101ec3b47147da3bb81e297 /src/openvic-simulation/economy
parentab696e8469b1417b69d6b3aa5d46a69d370613a0 (diff)
Separated node->string and string->value parsing
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/Building.cpp6
-rw-r--r--src/openvic-simulation/economy/ProductionType.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/economy/Building.cpp b/src/openvic-simulation/economy/Building.cpp
index d132e8e..4a99249 100644
--- a/src/openvic-simulation/economy/Building.cpp
+++ b/src/openvic-simulation/economy/Building.cpp
@@ -227,7 +227,7 @@ bool BuildingManager::load_buildings_file(GoodManager const& good_manager, Produ
ModifierValue modifier;
bool ret = modifier_manager.expect_modifier_value_and_keys(move_variable_callback(modifier),
- "type", ONE_EXACTLY, expect_identifier(expect_building_type_identifier(assign_variable_callback_pointer(type))),
+ "type", ONE_EXACTLY, expect_building_type_identifier(assign_variable_callback_pointer(type)),
"on_completion", ZERO_OR_ONE, expect_identifier(assign_variable_callback(on_completion)),
"completion_size", ZERO_OR_ONE, expect_fixed_point(assign_variable_callback(completion_size)),
"max_level", ONE_EXACTLY, expect_uint(assign_variable_callback(max_level)),
@@ -237,8 +237,8 @@ bool BuildingManager::load_buildings_file(GoodManager const& good_manager, Produ
"visibility", ONE_EXACTLY, expect_bool(assign_variable_callback(visibility)),
"onmap", ONE_EXACTLY, expect_bool(assign_variable_callback(on_map)),
"default_enabled", ZERO_OR_ONE, expect_bool(assign_variable_callback(default_enabled)),
- "production_type", ZERO_OR_ONE, expect_identifier(production_type_manager.expect_production_type_identifier(
- assign_variable_callback_pointer(production_type))),
+ "production_type", ZERO_OR_ONE, production_type_manager.expect_production_type_identifier(
+ assign_variable_callback_pointer(production_type)),
"pop_build_factory", ZERO_OR_ONE, expect_bool(assign_variable_callback(pop_build_factory)),
"strategic_factory", ZERO_OR_ONE, expect_bool(assign_variable_callback(strategic_factory)),
"advanced_factory", ZERO_OR_ONE, expect_bool(assign_variable_callback(advanced_factory)),
diff --git a/src/openvic-simulation/economy/ProductionType.cpp b/src/openvic-simulation/economy/ProductionType.cpp
index 3a27cd6..f31ea59 100644
--- a/src/openvic-simulation/economy/ProductionType.cpp
+++ b/src/openvic-simulation/economy/ProductionType.cpp
@@ -178,7 +178,7 @@ bool ProductionTypeManager::add_production_type(PRODUCTION_TYPE_ARGS, GoodManage
"type", ZERO_OR_ONE, expect_identifier(expect_mapped_string(type_map, assign_variable_callback(type))), \
"workforce", ZERO_OR_ONE, expect_uint(assign_variable_callback(workforce)), \
"input_goods", ZERO_OR_ONE, good_manager.expect_good_decimal_map(move_variable_callback(input_goods)), \
- "output_goods", ZERO_OR_ONE, expect_identifier(good_manager.expect_good_identifier(assign_variable_callback_pointer(output_goods))), \
+ "output_goods", ZERO_OR_ONE, good_manager.expect_good_identifier(assign_variable_callback_pointer(output_goods)), \
"value", ZERO_OR_ONE, expect_fixed_point(assign_variable_callback(value)), \
"efficiency", ZERO_OR_ONE, good_manager.expect_good_decimal_map(move_variable_callback(efficiency)), \
"is_coastal", ZERO_OR_ONE, expect_bool(assign_variable_callback(coastal)), \