aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/tech/Technology.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/tech/Technology.hpp')
-rw-r--r--src/openvic-simulation/tech/Technology.hpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/openvic-simulation/tech/Technology.hpp b/src/openvic-simulation/tech/Technology.hpp
index 0aca1f6..6f50f01 100644
--- a/src/openvic-simulation/tech/Technology.hpp
+++ b/src/openvic-simulation/tech/Technology.hpp
@@ -11,7 +11,7 @@ namespace OpenVic {
friend struct TechnologyManager;
private:
- TechnologyFolder(std::string_view identifier);
+ TechnologyFolder(std::string_view new_identifier);
public:
TechnologyFolder(TechnologyFolder&&) = default;
@@ -23,7 +23,7 @@ namespace OpenVic {
private:
TechnologyFolder const& PROPERTY(folder);
- TechnologyArea(std::string_view identifier, TechnologyFolder const& folder);
+ TechnologyArea(std::string_view new_identifier, TechnologyFolder const& new_folder);
public:
TechnologyArea(TechnologyArea&&) = default;
@@ -31,6 +31,7 @@ namespace OpenVic {
struct Technology : Modifier {
friend struct TechnologyManager;
+
using year_t = Date::year_t;
using unit_set_t = std::unordered_set<Unit const*>;
using building_set_t = std::unordered_set<BuildingType const*>;
@@ -46,8 +47,12 @@ namespace OpenVic {
//TODO: implement rules/modifiers and ai_chance
- Technology(std::string_view identifier, TechnologyArea const& area, year_t year, fixed_point_t cost, bool unciv_military, uint8_t unit, unit_set_t activated_units, building_set_t activated_buildings, ModifierValue&& values);
-
+ Technology(
+ std::string_view new_identifier, TechnologyArea const& new_area, year_t new_year, fixed_point_t new_cost,
+ bool new_unciv_military, uint8_t new_unit, unit_set_t&& new_activated_units,
+ building_set_t&& new_activated_buildings, ModifierValue&& new_values
+ );
+
public:
Technology(Technology&&) = default;
};
@@ -74,15 +79,21 @@ namespace OpenVic {
bool add_technology_area(std::string_view identifier, TechnologyFolder const* folder);
IDENTIFIER_REGISTRY_ACCESSORS(technology_area)
- bool add_technology(std::string_view identifier, TechnologyArea const* area, Technology::year_t year, fixed_point_t cost, bool unciv_military, uint8_t unit, Technology::unit_set_t activated_units, Technology::building_set_t activated_buildings, ModifierValue&& values);
+ bool add_technology(
+ std::string_view identifier, TechnologyArea const* area, Technology::year_t year, fixed_point_t cost,
+ bool unciv_military, uint8_t unit, Technology::unit_set_t&& activated_units,
+ Technology::building_set_t&& activated_buildings, ModifierValue&& values);
IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(technology, technologies)
- bool add_technology_school(std::string_view identifier, ModifierValue&& values); //, Modifier::icon_t icon);
+ bool add_technology_school(std::string_view identifier, ModifierValue&& values);
IDENTIFIER_REGISTRY_ACCESSORS(technology_school);
bool load_technology_file_areas(ast::NodeCPtr root); // common/technology.txt
bool load_technology_file_schools(ModifierManager const& modifier_manager, ast::NodeCPtr root); // also common/technology.txt
- bool load_technologies_file(ModifierManager const& modifier_manager, UnitManager const& unit_manager, BuildingManager const& building_manager, ast::NodeCPtr root); // technologies/*.txt
+ bool load_technologies_file(
+ ModifierManager const& modifier_manager, UnitManager const& unit_manager, BuildingManager const& building_manager,
+ ast::NodeCPtr root
+ ); // technologies/*.txt
bool generate_modifiers(ModifierManager& modifier_manager);
};
} \ No newline at end of file