aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/research/Invention.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2024-03-20 23:30:48 +0100
committer GitHub <noreply@github.com>2024-03-20 23:30:48 +0100
commiteece77afebf0e4d36b4c9ace3b1044f2c3da50f1 (patch)
treed5b186facf7c3a08e6ccf2e8261b7de054957a41 /src/openvic-simulation/research/Invention.cpp
parent2c892c99a6647be15ef23cabf6cc40f08769283d (diff)
parent023860d53a90774dcdba84ad7c0dca3c944c9a49 (diff)
Merge pull request #147 from OpenVicProject/military-units
Military unit instance
Diffstat (limited to 'src/openvic-simulation/research/Invention.cpp')
-rw-r--r--src/openvic-simulation/research/Invention.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvic-simulation/research/Invention.cpp b/src/openvic-simulation/research/Invention.cpp
index 792dcba..0f92632 100644
--- a/src/openvic-simulation/research/Invention.cpp
+++ b/src/openvic-simulation/research/Invention.cpp
@@ -2,7 +2,7 @@
#include "openvic-simulation/economy/BuildingType.hpp"
#include "openvic-simulation/map/Crime.hpp"
-#include "openvic-simulation/military/Unit.hpp"
+#include "openvic-simulation/military/UnitType.hpp"
using namespace OpenVic;
using namespace OpenVic::NodeTools;
@@ -40,11 +40,11 @@ bool InventionManager::add_invention(
}
bool InventionManager::load_inventions_file(
- ModifierManager const& modifier_manager, UnitManager const& unit_manager, BuildingTypeManager const& building_type_manager,
+ ModifierManager const& modifier_manager, UnitTypeManager const& unit_type_manager, BuildingTypeManager const& building_type_manager,
CrimeManager const& crime_manager, ast::NodeCPtr root
) {
return expect_dictionary_reserve_length(
- inventions, [this, &modifier_manager, &unit_manager, &building_type_manager, &crime_manager](
+ inventions, [this, &modifier_manager, &unit_type_manager, &building_type_manager, &crime_manager](
std::string_view identifier, ast::NodeCPtr value) -> bool {
ModifierValue loose_modifiers;
ModifierValue modifiers;
@@ -68,7 +68,7 @@ bool InventionManager::load_inventions_file(
move_variable_callback(modifiers),
"gas_attack", ZERO_OR_ONE, expect_bool(assign_variable_callback(unlock_gas_attack)),
"gas_defence", ZERO_OR_ONE, expect_bool(assign_variable_callback(unlock_gas_defence)),
- "activate_unit", ZERO_OR_MORE, unit_manager.expect_unit_identifier(set_callback_pointer(activated_units)),
+ "activate_unit", ZERO_OR_MORE, unit_type_manager.expect_unit_type_identifier(set_callback_pointer(activated_units)),
"activate_building", ZERO_OR_MORE, building_type_manager.expect_building_type_identifier(
set_callback_pointer(activated_buildings)
),