aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map/Province.cpp
diff options
context:
space:
mode:
author CptAlanSmith <123112708+CptAlanSmith@users.noreply.github.com>2023-09-25 23:21:59 +0200
committer GitHub <noreply@github.com>2023-09-25 23:21:59 +0200
commit63e462fceff981f79bcbae53e8d90fc59733e8c2 (patch)
tree403b586b3bc3f69f42a2362a273e77415ebf1d22 /src/openvic-simulation/map/Province.cpp
parent127ca294056817bc5814ef5516b29a67ff3fa3bb (diff)
parent932b43953d623557236a31b30899b706307260ed (diff)
Merge pull request #33 from OpenVicProject/terrain-types
Terrain types
Diffstat (limited to 'src/openvic-simulation/map/Province.cpp')
-rw-r--r--src/openvic-simulation/map/Province.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/openvic-simulation/map/Province.cpp b/src/openvic-simulation/map/Province.cpp
index c1e96e9..ef574cf 100644
--- a/src/openvic-simulation/map/Province.cpp
+++ b/src/openvic-simulation/map/Province.cpp
@@ -6,6 +6,8 @@
#include <iterator>
#include <sstream>
+#include "openvic-simulation/map/TerrainType.hpp"
+
using namespace OpenVic;
using namespace OpenVic::NodeTools;
@@ -32,6 +34,10 @@ bool Province::get_water() const {
return water;
}
+TerrainType const* Province::get_terrain_type() const {
+ return terrain_type;
+}
+
Province::life_rating_t Province::get_life_rating() const {
return life_rating;
}
@@ -149,7 +155,7 @@ Province::distance_t Province::adjacency_t::get_distance() const {
return distance;
}
-Province::flags_t Province::adjacency_t::get_flags() {
+Province::flags_t Province::adjacency_t::get_flags() const {
return flags;
}
@@ -175,3 +181,7 @@ bool Province::add_adjacency(Province const* province, distance_t distance, flag
std::vector<Province::adjacency_t> const& Province::get_adjacencies() const {
return adjacencies;
}
+
+void Province::_set_terrain_type(TerrainType const* type) {
+ terrain_type = type;
+}