diff options
author | Hop311 <Hop3114@gmail.com> | 2023-12-02 20:42:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-02 20:42:06 +0100 |
commit | 444a27726695478e44e0166e75df1f354b6432d5 (patch) | |
tree | f1f6276c91beceecdfd9b09083d1c91ea8b41b60 /src/openvic-simulation/economy/Good.hpp | |
parent | cd6875d5e0ca5e2545fd0e1647678cd18a6c81c2 (diff) | |
parent | 4a899c1a9e83ab9476b85522751081be434caa35 (diff) |
Merge pull request #82 from OpenVicProject/backlog
Accumulated changes from Dev Diary GUI focus period
Diffstat (limited to 'src/openvic-simulation/economy/Good.hpp')
-rw-r--r-- | src/openvic-simulation/economy/Good.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/openvic-simulation/economy/Good.hpp b/src/openvic-simulation/economy/Good.hpp index 8a239d5..1537514 100644 --- a/src/openvic-simulation/economy/Good.hpp +++ b/src/openvic-simulation/economy/Good.hpp @@ -31,12 +31,15 @@ namespace OpenVic { struct Good : HasIdentifierAndColour { friend struct GoodManager; + using index_t = size_t; + using price_t = fixed_point_t; static constexpr price_t NULL_PRICE = fixed_point_t::_0(); using good_map_t = fixed_point_map_t<Good const*>; private: + const index_t PROPERTY(index); GoodCategory const& PROPERTY(category); const price_t PROPERTY(base_price); const bool PROPERTY_CUSTOM_PREFIX(available_from_start, is); @@ -48,8 +51,9 @@ namespace OpenVic { bool PROPERTY_RW(available); Good( - std::string_view new_identifier, colour_t new_colour, GoodCategory const& new_category, price_t new_base_price, - bool new_available_from_start, bool new_tradeable, bool new_money, bool new_overseas_penalty + std::string_view new_identifier, colour_t new_colour, index_t new_index, GoodCategory const& new_category, + price_t new_base_price, bool new_available_from_start, bool new_tradeable, bool new_money, + bool new_overseas_penalty ); public: |