aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/BuildingType.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-10-19 12:39:08 +0200
committer hop311 <hop3114@gmail.com>2024-10-19 12:39:08 +0200
commit572ac597d8b43c4c97be4b68aa40de0e7ae6bfe0 (patch)
treec529d60fe49fbcd167522c0fb21ca10139cb5cc7 /src/openvic-simulation/economy/BuildingType.cpp
parent35909d6e79d524f19f9b69dffd02fcf162be5093 (diff)
Require modifier type when parsing ModifierValues
Diffstat (limited to 'src/openvic-simulation/economy/BuildingType.cpp')
-rw-r--r--src/openvic-simulation/economy/BuildingType.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/openvic-simulation/economy/BuildingType.cpp b/src/openvic-simulation/economy/BuildingType.cpp
index 278cde4..a21361f 100644
--- a/src/openvic-simulation/economy/BuildingType.cpp
+++ b/src/openvic-simulation/economy/BuildingType.cpp
@@ -61,9 +61,13 @@ bool BuildingTypeManager::load_buildings_file(
building_types, [this, &good_definition_manager, &production_type_manager, &modifier_manager](
std::string_view key, ast::NodeCPtr value
) -> bool {
+ using enum Modifier::modifier_type_t;
+
BuildingType::building_type_args_t building_type_args {};
- bool ret = modifier_manager.expect_modifier_value_and_keys(move_variable_callback(building_type_args.modifier),
+ bool ret = modifier_manager.expect_modifier_value_and_keys(
+ move_variable_callback(building_type_args.modifier),
+ BUILDING,
"type", ONE_EXACTLY, expect_identifier(assign_variable_callback(building_type_args.type)),
"on_completion", ZERO_OR_ONE, expect_identifier(assign_variable_callback(building_type_args.on_completion)),
"completion_size", ZERO_OR_ONE,