aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/units/Unit.hpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-09-28 20:51:56 +0200
committer GitHub <noreply@github.com>2023-09-28 20:51:56 +0200
commitae0be2a8d2e1b717f6c4a4617096f17089ce8701 (patch)
tree897742b074547e4d1694ddff1f4e9e8f14d82d6a /src/openvic-simulation/units/Unit.hpp
parentd21255b2ca2fe6cea7f41e88fbb22d138bac74eb (diff)
parentc541a249247b7fe3bdd4c62bce6638e875790f8a (diff)
Merge pull request #37 from OpenVicProject/dataloading-buildings
Dataloading buildings
Diffstat (limited to 'src/openvic-simulation/units/Unit.hpp')
-rw-r--r--src/openvic-simulation/units/Unit.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openvic-simulation/units/Unit.hpp b/src/openvic-simulation/units/Unit.hpp
index 507adbd..dc7c00f 100644
--- a/src/openvic-simulation/units/Unit.hpp
+++ b/src/openvic-simulation/units/Unit.hpp
@@ -7,10 +7,11 @@
#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
#include "openvic-simulation/dataloader/NodeTools.hpp"
#include "openvic-simulation/economy/Good.hpp"
+#include "openvic-simulation/types/Date.hpp"
#define UNIT_PARAMS Unit::icon_t icon, Unit::sprite_t sprite, bool active, std::string_view type, \
bool floating_flag, uint32_t priority, fixed_point_t max_strength, fixed_point_t default_organisation, \
- fixed_point_t maximum_speed, fixed_point_t weighted_value, uint32_t build_time, \
+ fixed_point_t maximum_speed, fixed_point_t weighted_value, Timespan build_time, \
std::map<const Good*, fixed_point_t> build_cost, fixed_point_t supply_consumption, \
std::map<const Good*, fixed_point_t> supply_cost
#define LAND_PARAMS fixed_point_t reconnaissance, fixed_point_t attack, fixed_point_t defence, fixed_point_t discipline, \
@@ -40,7 +41,7 @@ namespace OpenVic {
const fixed_point_t maximum_speed;
const fixed_point_t weighted_value;
- const uint32_t build_time;
+ const Timespan build_time;
const std::map<const Good*, fixed_point_t> build_cost;
const fixed_point_t supply_consumption;
const std::map<const Good*, fixed_point_t> supply_cost;
@@ -64,7 +65,7 @@ namespace OpenVic {
fixed_point_t get_maximum_speed() const;
fixed_point_t get_weighted_value() const;
- uint32_t get_build_time() const;
+ Timespan get_build_time() const;
std::map<const Good*, fixed_point_t> const& get_build_cost() const;
fixed_point_t get_supply_consumption() const;
std::map<const Good*, fixed_point_t> const& get_supply_cost() const;