aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/economy/Good.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-08-24 01:32:23 +0200
committer Hop311 <hop3114@gmail.com>2023-08-24 01:32:23 +0200
commitefa88c722fcb6c8fea7a86e1b3b8a83f1f59eb31 (patch)
tree0d64199bf4f19fabaaff083b35aa8625823d6c1e /src/openvic/economy/Good.hpp
parent6f4a6c77c6f2613e65a403c3a2964d5041a538c7 (diff)
Big Dataloader Commit (openvic-simulation)
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();