aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/economy/Good.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic/economy/Good.hpp')
-rw-r--r--src/openvic/economy/Good.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/openvic/economy/Good.hpp b/src/openvic/economy/Good.hpp
index cfe185d..5c8e68c 100644
--- a/src/openvic/economy/Good.hpp
+++ b/src/openvic/economy/Good.hpp
@@ -1,6 +1,7 @@
#pragma once
-#include "../Types.hpp"
+#include "openvic/types/IdentifierRegistry.hpp"
+#include "openvic/types/fixed_point/FP.hpp"
namespace OpenVic {
struct GoodManager;
@@ -20,6 +21,9 @@ namespace OpenVic {
struct Good : HasIdentifierAndColour {
friend struct GoodManager;
+ using price_t = FP;
+ static constexpr price_t NULL_PRICE = FP::_0();
+
private:
const std::string category;
const price_t base_price;
@@ -48,7 +52,7 @@ namespace OpenVic {
public:
GoodManager();
- return_t add_good(const std::string_view identifier, colour_t colour, const std::string_view category, price_t base_price,
+ return_t add_good(const std::string_view identifier, colour_t colour, const std::string_view category, Good::price_t base_price,
bool default_available, bool tradeable, bool currency, bool overseas_maintenance);
void lock_goods();
void reset_to_defaults();