aboutsummaryrefslogtreecommitdiff
path: root/src/openvic2/map/Province.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic2/map/Province.cpp')
-rw-r--r--src/openvic2/map/Province.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/openvic2/map/Province.cpp b/src/openvic2/map/Province.cpp
index b3d455b..6c80317 100644
--- a/src/openvic2/map/Province.cpp
+++ b/src/openvic2/map/Province.cpp
@@ -9,7 +9,6 @@ using namespace OpenVic2;
Province::Province(index_t new_index, std::string const& new_identifier, colour_t new_colour) :
HasIdentifier{ new_identifier }, HasColour{ new_colour }, index{ new_index }, buildings{ "buildings" } {
assert(index != NULL_INDEX);
- assert(new_colour != NULL_COLOUR);
}
index_t Province::get_index() const {
@@ -40,6 +39,10 @@ void Province::reset_buildings() {
buildings.reset();
}
+Building const* Province::get_building_by_identifier(std::string const& identifier) const {
+ return buildings.get_item_by_identifier(identifier);
+}
+
std::vector<Building> const& Province::get_buildings() const {
return buildings.get_items();
}
@@ -50,6 +53,10 @@ return_t Province::expand_building(std::string const& building_type_identifier)
return building->expand();
}
+Good const* Province::get_rgo() const {
+ return rgo;
+}
+
std::string Province::to_string() const {
std::stringstream stream;
stream << "(#" << std::to_string(index) << ", " << get_identifier() << ", 0x" << colour_to_hex_string() << ")";