diff options
author | Hop311 <hop3114@gmail.com> | 2023-09-25 20:04:07 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-09-25 20:04:07 +0200 |
commit | b84f5a03b40f1925c456cd247c2c2f04af8ef778 (patch) | |
tree | cec684e859b9631bd581699563800bb9888990db /src/openvic-simulation/map/Province.cpp | |
parent | bbfa8faf5337ebdff60ef2106074417aa628eca1 (diff) |
Calculate terrain types from pixels
Diffstat (limited to 'src/openvic-simulation/map/Province.cpp')
-rw-r--r-- | src/openvic-simulation/map/Province.cpp | 12 |
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; +} |