aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/Good.hpp
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-11-22 17:16:34 +0100
committer zaaarf <zaaarf@proton.me>2023-11-22 17:16:34 +0100
commit1683859e333f98fb63f1c72d926bb366a3b89f0b (patch)
treee11dde918a7f1f228d3383ba8f9287385e43b4f5 /src/openvic-simulation/economy/Good.hpp
parent5c6caf6fbb7c606f4ebe0c397cc15c97d776f13d (diff)
chore: use PROPERTY and its variants when possible
Diffstat (limited to 'src/openvic-simulation/economy/Good.hpp')
-rw-r--r--src/openvic-simulation/economy/Good.hpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/openvic-simulation/economy/Good.hpp b/src/openvic-simulation/economy/Good.hpp
index 805e6a5..ac85cbd 100644
--- a/src/openvic-simulation/economy/Good.hpp
+++ b/src/openvic-simulation/economy/Good.hpp
@@ -36,11 +36,15 @@ namespace OpenVic {
using good_map_t = fixed_point_map_t<Good const*>;
private:
- GoodCategory const& category;
- const price_t base_price;
- price_t price;
- const bool available_from_start, tradeable, money, overseas_penalty;
- bool available;
+ GoodCategory const& PROPERTY(category);
+ const price_t PROPERTY(base_price);
+ const bool PROPERTY_CUSTOM_NAME(available_from_start, is_available_from_start);
+ const bool PROPERTY_CUSTOM_NAME(tradeable, is_tradeable);
+ const bool PROPERTY(money);
+ const bool PROPERTY(overseas_penalty);
+
+ price_t PROPERTY_RW(price);
+ bool PROPERTY_RW(available);
Good(
std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price,
@@ -49,15 +53,6 @@ namespace OpenVic {
public:
Good(Good&&) = default;
-
- GoodCategory const& get_category() const;
- price_t get_base_price() const;
- price_t get_price() const;
- bool get_available_from_start() const;
- bool get_available() const;
- bool get_tradeable() const;
- bool get_money() const;
- bool get_overseas_penalty();
void reset_to_defaults();
};