aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/research/Invention.hpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2023-12-06 23:10:53 +0100
committer hop311 <hop3114@gmail.com>2023-12-07 21:38:17 +0100
commit398377011cb3d3c970451dcd215f3610159f1ae2 (patch)
tree2a73255f595eabb1441419a08bd0d5e5407213e7 /src/openvic-simulation/research/Invention.hpp
parent48a3f1729d709847d7cad33f594c77cac414e802 (diff)
Vec/set callbacks + crime file + prov building pos
Diffstat (limited to 'src/openvic-simulation/research/Invention.hpp')
-rw-r--r--src/openvic-simulation/research/Invention.hpp28
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