diff options
author | Hop311 <hop3114@gmail.com> | 2023-04-25 01:03:15 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-04-25 01:03:15 +0200 |
commit | 8fba1c8a02f8680e0d80279b8b6451fea4a40a62 (patch) | |
tree | ba88378d61e2121a26847b2f68ac5111b5c9baec /extension/src/openvic2/map/Building.hpp | |
parent | 639f86febf39184cccde9f898fc328375048233f (diff) |
Req comments + cleanup + c++ registry refactoring
Diffstat (limited to 'extension/src/openvic2/map/Building.hpp')
-rw-r--r-- | extension/src/openvic2/map/Building.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/extension/src/openvic2/map/Building.hpp b/extension/src/openvic2/map/Building.hpp index 7a1a777..08ede3a 100644 --- a/extension/src/openvic2/map/Building.hpp +++ b/extension/src/openvic2/map/Building.hpp @@ -9,7 +9,12 @@ namespace OpenVic2 { struct BuildingManager; struct BuildingType; - struct Building { + /* REQUIREMENTS: + * MAP-11, MAP-72, MAP-73 + * MAP-12, MAP-75, MAP-76 + * MAP-13, MAP-78, MAP-79 + */ + struct Building : HasIdentifier { friend struct BuildingManager; using level_t = int8_t; @@ -52,8 +57,8 @@ namespace OpenVic2 { struct BuildingManager { private: - std::vector<BuildingType> building_types; - bool building_types_locked = false; + static const char building_types_name[]; + IdentifierRegistry<BuildingType, building_types_name> building_types; public: return_t add_building_type(std::string const& identifier, Building::level_t max_level, Timespan build_time); void lock_building_types(); |