diff options
author | 2023-09-29 00:33:46 +0200 | |
---|---|---|
committer | 2023-09-29 00:39:06 +0200 | |
commit | 1e40569a49ab0d557a2a43ee900f4f28d5c81cd3 (patch) | |
tree | 745235805b36eb98092c072fba884263d794dba5 /src/openvic-simulation/pop | |
parent | 84b5ee7a7749e2dbfeb214b4cedd16d5522f4197 (diff) |
Data types, defaults, callback cleanup
Diffstat (limited to 'src/openvic-simulation/pop')
-rw-r--r-- | src/openvic-simulation/pop/Pop.cpp | 8 | ||||
-rw-r--r-- | src/openvic-simulation/pop/Religion.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/openvic-simulation/pop/Pop.cpp b/src/openvic-simulation/pop/Pop.cpp index 17bacbf..38cd883 100644 --- a/src/openvic-simulation/pop/Pop.cpp +++ b/src/openvic-simulation/pop/Pop.cpp @@ -152,11 +152,11 @@ bool PopManager::load_pop_type_file(std::string_view filestem, ast::NodeCPtr roo bool state_capital_only = false, is_artisan = false, is_slave = false, demote_migrant = false; Pop::pop_size_t max_size = 0, merge_max_size = 0; bool ret = expect_dictionary_keys( - "sprite", ONE_EXACTLY, expect_uint(assign_variable_callback_uint("poptype sprite", sprite)), + "sprite", ONE_EXACTLY, expect_uint(assign_variable_callback_uint(sprite)), "color", ONE_EXACTLY, expect_colour(assign_variable_callback(colour)), "is_artisan", ZERO_OR_ONE, expect_bool(assign_variable_callback(is_artisan)), - "max_size", ZERO_OR_ONE, expect_uint(assign_variable_callback_uint("poptype max_size", max_size)), - "merge_max_size", ZERO_OR_ONE, expect_uint(assign_variable_callback_uint("poptype merge_max_size", merge_max_size)), + "max_size", ZERO_OR_ONE, expect_uint(assign_variable_callback_uint(max_size)), + "merge_max_size", ZERO_OR_ONE, expect_uint(assign_variable_callback_uint(merge_max_size)), "strata", ONE_EXACTLY, expect_identifier( [&strata](std::string_view identifier) -> bool { using strata_map_t = std::map<std::string, PopType::strata_t, std::less<void>>; @@ -218,7 +218,7 @@ bool PopManager::load_pop_into_province(Province& province, std::string_view pop bool ret = expect_dictionary_keys( "culture", ONE_EXACTLY, culture_manager.expect_culture_identifier(assign_variable_callback_pointer(culture)), "religion", ONE_EXACTLY, religion_manager.expect_religion_identifier(assign_variable_callback_pointer(religion)), - "size", ONE_EXACTLY, expect_uint(assign_variable_callback_uint("pop size", size)), + "size", ONE_EXACTLY, expect_uint(assign_variable_callback_uint(size)), "militancy", ZERO_OR_ONE, success_callback, "rebel_type", ZERO_OR_ONE, success_callback )(pop_node); diff --git a/src/openvic-simulation/pop/Religion.cpp b/src/openvic-simulation/pop/Religion.cpp index c679e00..32a3219 100644 --- a/src/openvic-simulation/pop/Religion.cpp +++ b/src/openvic-simulation/pop/Religion.cpp @@ -91,7 +91,7 @@ bool ReligionManager::load_religion_file(ast::NodeCPtr root) { bool pagan = false; bool ret = expect_dictionary_keys( - "icon", ONE_EXACTLY, expect_uint(assign_variable_callback_uint("religion icon", icon)), + "icon", ONE_EXACTLY, expect_uint(assign_variable_callback_uint(icon)), "color", ONE_EXACTLY, expect_colour(assign_variable_callback(colour)), "pagan", ZERO_OR_ONE, expect_bool(assign_variable_callback(pagan)) )(value); |