aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy
diff options
context:
space:
mode:
author CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com>2023-09-25 23:21:59 +0200
committer GitHub <noreply@github.com>2023-09-25 23:21:59 +0200
commit63e462fceff981f79bcbae53e8d90fc59733e8c2 (patch)
tree403b586b3bc3f69f42a2362a273e77415ebf1d22 /src/openvic-simulation/economy
parent127ca294056817bc5814ef5516b29a67ff3fa3bb (diff)
parent932b43953d623557236a31b30899b706307260ed (diff)
Merge pull request #33 from OpenVicProject/terrain-types
Terrain types
Diffstat (limited to 'src/openvic-simulation/economy')
-rw-r--r--src/openvic-simulation/economy/Good.cpp4
-rw-r--r--src/openvic-simulation/economy/ProductionType.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/openvic-simulation/economy/Good.cpp b/src/openvic-simulation/economy/Good.cpp
index f1da8bd..8a04e39 100644
--- a/src/openvic-simulation/economy/Good.cpp
+++ b/src/openvic-simulation/economy/Good.cpp
@@ -112,8 +112,8 @@ bool GoodManager::load_goods_file(ast::NodeCPtr root) {
[this, good_category](std::string_view key, ast::NodeCPtr value) -> bool {
colour_t colour = NULL_COLOUR;
Good::price_t base_price;
- bool available_from_start, tradeable = true;
- bool money, overseas_penalty = false;
+ bool available_from_start = true, tradeable = true;
+ bool money = false, overseas_penalty = false;
bool ret = expect_dictionary_keys(
"color", ONE_EXACTLY, expect_colour(assign_variable_callback(colour)),
diff --git a/src/openvic-simulation/economy/ProductionType.cpp b/src/openvic-simulation/economy/ProductionType.cpp
index 4ea7967..40ac2a3 100644
--- a/src/openvic-simulation/economy/ProductionType.cpp
+++ b/src/openvic-simulation/economy/ProductionType.cpp
@@ -264,10 +264,12 @@ bool ProductionTypeManager::load_production_types_file(GoodManager& good_manager
}
}
- return ret & PARSE_NODE(node) & add_production_type(
+ ret &= PARSE_NODE(node);
+ ret &= add_production_type(
key, owner, employees, type, workforce, input_goods, output_goods, value,
bonuses, efficiency, coastal, farm, mine, good_manager
);
+ return ret;
}
)(root);