aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/research
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-06-13 00:24:00 +0200
committer hop311 <hop3114@gmail.com>2024-06-13 00:24:00 +0200
commit4b39e77304094708d5c503b6a221386408cc4409 (patch)
tree7ba5a06714c267185dd3a59aabc6556a105c122f /src/openvic-simulation/research
parentc0ba822ee46551a40ad6b43e8f56b80e27ae35b5 (diff)
Separated GameManager into Definition and Instance Managersinstance-definition-managers
Diffstat (limited to 'src/openvic-simulation/research')
-rw-r--r--src/openvic-simulation/research/Invention.cpp10
-rw-r--r--src/openvic-simulation/research/Invention.hpp4
-rw-r--r--src/openvic-simulation/research/Technology.cpp8
-rw-r--r--src/openvic-simulation/research/Technology.hpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/src/openvic-simulation/research/Invention.cpp b/src/openvic-simulation/research/Invention.cpp
index 0f92632..9680223 100644
--- a/src/openvic-simulation/research/Invention.cpp
+++ b/src/openvic-simulation/research/Invention.cpp
@@ -16,10 +16,10 @@ Invention::Invention(
enabled_crimes { std::move(new_enabled_crimes) }, unlock_gas_attack { new_unlock_gas_attack },
unlock_gas_defence { new_unlock_gas_defence }, limit { std::move(new_limit) }, chance { std::move(new_chance) } {}
-bool Invention::parse_scripts(GameManager const& game_manager) {
+bool Invention::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
- ret &= limit.parse_script(false, game_manager);
- ret &= chance.parse_scripts(game_manager);
+ ret &= limit.parse_script(false, definition_manager);
+ ret &= chance.parse_scripts(definition_manager);
return ret;
}
@@ -90,10 +90,10 @@ bool InventionManager::load_inventions_file(
)(root);
}
-bool InventionManager::parse_scripts(GameManager const& game_manager) {
+bool InventionManager::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
for (Invention& invention : inventions.get_items()) {
- ret &= invention.parse_scripts(game_manager);
+ ret &= invention.parse_scripts(definition_manager);
}
return ret;
}
diff --git a/src/openvic-simulation/research/Invention.hpp b/src/openvic-simulation/research/Invention.hpp
index 43a4e10..881ceab 100644
--- a/src/openvic-simulation/research/Invention.hpp
+++ b/src/openvic-simulation/research/Invention.hpp
@@ -37,7 +37,7 @@ namespace OpenVic {
bool new_unlock_gas_defence, ConditionScript&& new_limit, ConditionalWeight&& new_chance
);
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
public:
Invention(Invention&&) = default;
@@ -58,6 +58,6 @@ namespace OpenVic {
BuildingTypeManager const& building_type_manager, CrimeManager const& crime_manager, ast::NodeCPtr root
); // inventions/*.txt
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
};
} \ No newline at end of file
diff --git a/src/openvic-simulation/research/Technology.cpp b/src/openvic-simulation/research/Technology.cpp
index 027268e..dfda3d9 100644
--- a/src/openvic-simulation/research/Technology.cpp
+++ b/src/openvic-simulation/research/Technology.cpp
@@ -16,8 +16,8 @@ Technology::Technology(
unciv_military { new_unciv_military }, unit { new_unit }, activated_buildings { std::move(new_activated_units) },
activated_units { std::move(new_activated_buildings) }, ai_chance { std::move(new_ai_chance) } {}
-bool Technology::parse_scripts(GameManager const& game_manager) {
- return ai_chance.parse_scripts(game_manager);
+bool Technology::parse_scripts(DefinitionManager const& definition_manager) {
+ return ai_chance.parse_scripts(definition_manager);
}
TechnologySchool::TechnologySchool(std::string_view new_identifier, ModifierValue&& new_values)
@@ -194,11 +194,11 @@ bool TechnologyManager::generate_modifiers(ModifierManager& modifier_manager) co
return ret;
}
-bool TechnologyManager::parse_scripts(GameManager const& game_manager) {
+bool TechnologyManager::parse_scripts(DefinitionManager const& definition_manager) {
bool ret = true;
for (Technology& technology : technologies.get_items()) {
- ret &= technology.parse_scripts(game_manager);
+ ret &= technology.parse_scripts(definition_manager);
}
return ret;
diff --git a/src/openvic-simulation/research/Technology.hpp b/src/openvic-simulation/research/Technology.hpp
index c67ebc0..f13cca3 100644
--- a/src/openvic-simulation/research/Technology.hpp
+++ b/src/openvic-simulation/research/Technology.hpp
@@ -61,7 +61,7 @@ namespace OpenVic {
building_set_t&& new_activated_buildings, ModifierValue&& new_values, ConditionalWeight&& new_ai_chance
);
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
public:
Technology(Technology&&) = default;
@@ -109,6 +109,6 @@ namespace OpenVic {
/* Populates the lists of technology areas for each technology folder and technologies for each technology area. */
bool generate_technology_lists();
- bool parse_scripts(GameManager const& game_manager);
+ bool parse_scripts(DefinitionManager const& definition_manager);
};
} \ No newline at end of file