diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-10-26 18:25:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-26 18:25:15 +0200 |
commit | 8d9ff3266439c6a94c35fdf0d8a0642a2cb34de3 (patch) | |
tree | 46039d0eb5d630cf000e94aed584aebaaa8f3f9b /src/openvic-simulation/modifier/StaticModifierCache.hpp | |
parent | c88cf59997529cbca008f9a2b629822de9deaa2a (diff) | |
parent | 3daebe5db14949f55be2c50220323138260dbaea (diff) |
Merge pull request #210 from OpenVicProject/contextual_modifier_parsing
Contextual modifier parsing
Diffstat (limited to 'src/openvic-simulation/modifier/StaticModifierCache.hpp')
-rw-r--r-- | src/openvic-simulation/modifier/StaticModifierCache.hpp | 83 |
1 files changed, 43 insertions, 40 deletions
diff --git a/src/openvic-simulation/modifier/StaticModifierCache.hpp b/src/openvic-simulation/modifier/StaticModifierCache.hpp index 4b17b82..b31e127 100644 --- a/src/openvic-simulation/modifier/StaticModifierCache.hpp +++ b/src/openvic-simulation/modifier/StaticModifierCache.hpp @@ -1,9 +1,10 @@ #pragma once +#include "openvic-simulation/dataloader/NodeTools.hpp" +#include "openvic-simulation/modifier/Modifier.hpp" #include "openvic-simulation/utility/Getters.hpp" namespace OpenVic { - struct Modifier; struct ModifierManager; struct StaticModifierCache { @@ -11,52 +12,54 @@ namespace OpenVic { private: // Country modifiers - Modifier const* PROPERTY(very_easy_player); - Modifier const* PROPERTY(easy_player); - Modifier const* PROPERTY(hard_player); - Modifier const* PROPERTY(very_hard_player); - Modifier const* PROPERTY(very_easy_ai); - Modifier const* PROPERTY(easy_ai); - Modifier const* PROPERTY(hard_ai); - Modifier const* PROPERTY(very_hard_ai); + Modifier PROPERTY(very_easy_player); + Modifier PROPERTY(easy_player); + Modifier PROPERTY(hard_player); + Modifier PROPERTY(very_hard_player); + Modifier PROPERTY(very_easy_ai); + Modifier PROPERTY(easy_ai); + Modifier PROPERTY(hard_ai); + Modifier PROPERTY(very_hard_ai); - Modifier const* PROPERTY(base_modifier); - Modifier const* PROPERTY(war); - Modifier const* PROPERTY(peace); - Modifier const* PROPERTY(disarming); - Modifier const* PROPERTY(war_exhaustion); - Modifier const* PROPERTY(infamy); - Modifier const* PROPERTY(debt_default_to); - Modifier const* PROPERTY(bad_debter); - Modifier const* PROPERTY(great_power); - Modifier const* PROPERTY(secondary_power); - Modifier const* PROPERTY(civilised); - Modifier const* PROPERTY(uncivilised); - Modifier const* PROPERTY(literacy); - Modifier const* PROPERTY(plurality); - Modifier const* PROPERTY(generalised_debt_default); - Modifier const* PROPERTY(total_occupation); - Modifier const* PROPERTY(total_blockaded); + Modifier PROPERTY(base_modifier); + Modifier PROPERTY(war); + Modifier PROPERTY(peace); + Modifier PROPERTY(disarming); + Modifier PROPERTY(war_exhaustion); + Modifier PROPERTY(infamy); + Modifier PROPERTY(debt_default_to); + Modifier PROPERTY(great_power); + Modifier PROPERTY(secondary_power); + Modifier PROPERTY(civilised); + Modifier PROPERTY(uncivilised); + Modifier PROPERTY(literacy); + Modifier PROPERTY(plurality); + Modifier PROPERTY(total_occupation); + Modifier PROPERTY(total_blockaded); + + // Country event modifiers Modifier const* PROPERTY(in_bankruptcy); + Modifier const* PROPERTY(bad_debtor); + Modifier const* PROPERTY(generalised_debt_default); //possibly, as it's used to trigger gunboat CB // Province modifiers - Modifier const* PROPERTY(overseas); - Modifier const* PROPERTY(coastal); - Modifier const* PROPERTY(non_coastal); - Modifier const* PROPERTY(coastal_sea); - Modifier const* PROPERTY(sea_zone); - Modifier const* PROPERTY(land_province); - Modifier const* PROPERTY(blockaded); - Modifier const* PROPERTY(no_adjacent_controlled); - Modifier const* PROPERTY(core); - Modifier const* PROPERTY(has_siege); - Modifier const* PROPERTY(occupied); - Modifier const* PROPERTY(nationalism); - Modifier const* PROPERTY(infrastructure); + Modifier PROPERTY(overseas); + Modifier PROPERTY(coastal); + Modifier PROPERTY(non_coastal); + Modifier PROPERTY(coastal_sea); + Modifier PROPERTY(sea_zone); + Modifier PROPERTY(land_province); + Modifier PROPERTY(blockaded); + Modifier PROPERTY(no_adjacent_controlled); + Modifier PROPERTY(core); + Modifier PROPERTY(has_siege); + Modifier PROPERTY(occupied); + Modifier PROPERTY(nationalism); + Modifier PROPERTY(infrastructure); StaticModifierCache(); - bool load_static_modifiers(ModifierManager& registry); + bool load_static_modifiers(ModifierManager& modifier_manager, const ast::NodeCPtr root); public: StaticModifierCache(StaticModifierCache&&) = default; |