aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/units/Unit.hpp
diff options
context:
space:
mode:
author CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com>2023-09-23 20:25:15 +0200
committer GitHub <noreply@github.com>2023-09-23 20:25:15 +0200
commit005a8026bb424779a146e00cc48621ff1d72b807 (patch)
treedde15211e31d861b61711bf6aebdeb8713393d53 /src/openvic-simulation/units/Unit.hpp
parentebea2e473eefa3945508b0bf622a472b62d70d3b (diff)
Testing (#23)
* Fixes for building scons * Initial proof of concept auto-testing Shows how we can pull loaded data and display it back * Re-did headless Because hubert insisted it be done like this ;) * Auto-Testing Framework Basics * Requirements Calculations * Fix for messy merge (teach me to use merge tools) * Fixing up misc merge issues to fully reconcile with master changes * Re-added missing getters * Move of testing files due to folder reorgs * Use new accessors + int reading fix --------- Co-authored-by: Hop311 <hop3114@gmail.com>
Diffstat (limited to 'src/openvic-simulation/units/Unit.hpp')
-rw-r--r--src/openvic-simulation/units/Unit.hpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/openvic-simulation/units/Unit.hpp b/src/openvic-simulation/units/Unit.hpp
index c9d3434..507adbd 100644
--- a/src/openvic-simulation/units/Unit.hpp
+++ b/src/openvic-simulation/units/Unit.hpp
@@ -47,7 +47,7 @@ namespace OpenVic {
protected:
Unit(std::string_view identifier, std::string_view category, UNIT_PARAMS);
-
+
public:
Unit(Unit&&) = default;
@@ -98,7 +98,7 @@ namespace OpenVic {
struct NavalUnit : Unit {
friend struct UnitManager;
-
+
private:
const icon_t naval_icon;
const bool sail;
@@ -144,18 +144,17 @@ namespace OpenVic {
struct UnitManager {
private:
- GoodManager& good_manager;
IdentifierRegistry<Unit> units;
bool _check_shared_parameters(const std::string_view identifier, UNIT_PARAMS);
-
+
public:
- UnitManager(GoodManager& good_manager);
+ UnitManager();
bool add_land_unit(const std::string_view identifier, UNIT_PARAMS, LAND_PARAMS);
bool add_naval_unit(const std::string_view identifier, UNIT_PARAMS, NAVY_PARAMS);
IDENTIFIER_REGISTRY_ACCESSORS(Unit, unit)
- bool load_unit_file(ast::NodeCPtr root);
+ bool load_unit_file(GoodManager const& good_manager, ast::NodeCPtr root);
};
} \ No newline at end of file