aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/Good.hpp
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2023-12-10 23:15:41 +0100
committer zaaarf <me@zaaarf.foo>2023-12-10 23:15:41 +0100
commit4ef33d4df6198e613b0f27406d49978c8ea2fb97 (patch)
tree7f07835485b877f3c01c52c188892499e5812f9b /src/openvic-simulation/economy/Good.hpp
parent1eb28bd4fb959b69a30013f6438f0257a2ee7b03 (diff)
feat: improved identifier registry macro
Diffstat (limited to 'src/openvic-simulation/economy/Good.hpp')
-rw-r--r--src/openvic-simulation/economy/Good.hpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/openvic-simulation/economy/Good.hpp b/src/openvic-simulation/economy/Good.hpp
index 1537514..c595768 100644
--- a/src/openvic-simulation/economy/Good.hpp
+++ b/src/openvic-simulation/economy/Good.hpp
@@ -63,20 +63,16 @@ namespace OpenVic {
struct GoodManager {
private:
- IdentifierRegistry<GoodCategory> good_categories;
- IdentifierRegistry<Good> goods;
+ IdentifierRegistry<GoodCategory> IDENTIFIER_REGISTRY_CUSTOM_PLURAL(good_category, good_categories);
+ IdentifierRegistry<Good> IDENTIFIER_REGISTRY(good);
public:
- GoodManager();
-
bool add_good_category(std::string_view identifier);
- IDENTIFIER_REGISTRY_ACCESSORS_CUSTOM_PLURAL(good_category, good_categories)
bool add_good(
std::string_view identifier, colour_t colour, GoodCategory const& category, Good::price_t base_price,
bool available_from_start, bool tradeable, bool money, bool overseas_penalty
);
- IDENTIFIER_REGISTRY_ACCESSORS(good)
void reset_to_defaults();
bool load_goods_file(ast::NodeCPtr root);