diff options
author | Hop311 <Hop3114@gmail.com> | 2023-12-07 22:04:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 22:04:05 +0100 |
commit | 085fe94212c6f0ddbdfca1b2ba58223e7f6dcc8a (patch) | |
tree | 2a73255f595eabb1441419a08bd0d5e5407213e7 /src/openvic-simulation/research/Invention.hpp | |
parent | 48a3f1729d709847d7cad33f594c77cac414e802 (diff) | |
parent | 398377011cb3d3c970451dcd215f3610159f1ae2 (diff) |
Merge pull request #85 from OpenVicProject/container-callbacks
Container (pointer) callbacks + format cleanup
Diffstat (limited to 'src/openvic-simulation/research/Invention.hpp')
-rw-r--r-- | src/openvic-simulation/research/Invention.hpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/openvic-simulation/research/Invention.hpp b/src/openvic-simulation/research/Invention.hpp index 321d982..9cc158c 100644 --- a/src/openvic-simulation/research/Invention.hpp +++ b/src/openvic-simulation/research/Invention.hpp @@ -1,13 +1,17 @@ #pragma once -#include "openvic-simulation/economy/BuildingType.hpp" -#include "openvic-simulation/military/Unit.hpp" #include "openvic-simulation/misc/Modifier.hpp" #include "openvic-simulation/types/IdentifierRegistry.hpp" -#include <string_view> -#include <unordered_set> namespace OpenVic { + struct Unit; + struct BuildingType; + struct Crime; + + struct UnitManager; + struct BuildingTypeManager; + struct CrimeManager; + struct Invention : Modifier { friend struct InventionManager; //TODO implement limit and chance @@ -24,9 +28,9 @@ namespace OpenVic { const bool PROPERTY_CUSTOM_PREFIX(unlock_gas_defence, will); Invention( - std::string_view identifier, ModifierValue&& values, bool news, unit_set_t activated_units, - building_set_t activated_buildings, crime_set_t enabled_crimes, bool unlock_gas_attack, - bool unlock_gas_defence + std::string_view new_identifier, ModifierValue&& new_values, bool new_news, unit_set_t&& new_activated_units, + building_set_t&& new_activated_buildings, crime_set_t&& new_enabled_crimes, bool new_unlock_gas_attack, + bool new_unlock_gas_defence ); public: @@ -40,16 +44,16 @@ namespace OpenVic { InventionManager(); bool add_invention( - std::string_view identifier, ModifierValue&& values, bool news, Invention::unit_set_t activated_units, - Invention::building_set_t activated_buildings, Invention::crime_set_t enabled_crimes, bool unlock_gas_attack, + std::string_view identifier, ModifierValue&& values, bool news, Invention::unit_set_t&& activated_units, + Invention::building_set_t&& activated_buildings, Invention::crime_set_t&& enabled_crimes, bool unlock_gas_attack, bool unlock_gas_defence ); - IDENTIFIER_REGISTRY_ACCESSORS(invention); + IDENTIFIER_REGISTRY_ACCESSORS(invention) bool load_inventions_file( - ModifierManager const& modifier_manager, UnitManager const& unit_manager, BuildingManager const& building_manager, - ast::NodeCPtr root + ModifierManager const& modifier_manager, UnitManager const& unit_manager, + BuildingTypeManager const& building_type_manager, CrimeManager const& crime_manager, ast::NodeCPtr root ); // inventions/*.txt }; }
\ No newline at end of file |