aboutsummaryrefslogtreecommitdiff
path: root/extension/src/openvic2/map/Province.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-04-25 22:35:59 +0200
committer Hop311 <hop3114@gmail.com>2023-04-25 22:35:59 +0200
commit50327abf33078c44fef85c62ce3d90e23056fb34 (patch)
treef39e8fe64c024ecfde01d2bc4faacb7cf0dddc2c /extension/src/openvic2/map/Province.hpp
parent8fba1c8a02f8680e0d80279b8b6451fea4a40a62 (diff)
Further cleanup + reset on return to main menu
Diffstat (limited to 'extension/src/openvic2/map/Province.hpp')
-rw-r--r--extension/src/openvic2/map/Province.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/extension/src/openvic2/map/Province.hpp b/extension/src/openvic2/map/Province.hpp
index 0b7cd4c..aa0329c 100644
--- a/extension/src/openvic2/map/Province.hpp
+++ b/extension/src/openvic2/map/Province.hpp
@@ -19,23 +19,27 @@ namespace OpenVic2 {
static constexpr colour_t NULL_COLOUR = 0, MAX_COLOUR = 0xFFFFFF;
static constexpr index_t NULL_INDEX = 0, MAX_INDEX = 0xFFFF;
private:
- index_t index;
- colour_t colour;
+ const index_t index;
+ const colour_t colour;
Region* region = nullptr;
bool water = false;
life_rating_t life_rating = 0;
- static const char buildings_name[];
- IdentifierRegistry<Building, buildings_name> buildings;
+ IdentifierRegistry<Building> buildings;
Province(index_t new_index, std::string const& new_identifier, colour_t new_colour);
public:
static std::string colour_to_hex_string(colour_t colour);
+ Province(Province&&) = default;
+
index_t get_index() const;
colour_t get_colour() const;
Region* get_region() const;
bool is_water() const;
life_rating_t get_life_rating() const;
+ return_t add_building(BuildingType const& type);
+ void lock_buildings();
+ void reset_buildings();
std::vector<Building> const& get_buildings() const;
return_t expand_building(std::string const& building_type_identifier);
std::string to_string() const;