diff options
author | hop311 <hop3114@gmail.com> | 2023-10-13 23:04:12 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-10-14 12:05:06 +0200 |
commit | d26f9c2fb5a9666822a0f702d76b764600a390d7 (patch) | |
tree | c2a13a44d4c8553f6e87193f5f437052cf1d7067 /src/openvic-simulation/map | |
parent | ce6e70d079f4ab18cdfa082032dc3580ab233b0e (diff) |
Further CLI and modifier reading work
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r-- | src/openvic-simulation/map/TerrainType.cpp | 8 | ||||
-rw-r--r-- | src/openvic-simulation/map/TerrainType.hpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/openvic-simulation/map/TerrainType.cpp b/src/openvic-simulation/map/TerrainType.cpp index 017b220..8624cdb 100644 --- a/src/openvic-simulation/map/TerrainType.cpp +++ b/src/openvic-simulation/map/TerrainType.cpp @@ -5,8 +5,12 @@ using namespace OpenVic; using namespace OpenVic::NodeTools; -TerrainType::TerrainType(std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, bool new_is_water) - : HasIdentifierAndColour { new_identifier, new_colour, true, false }, ModifierValue { std::move(new_values) }, is_water { new_is_water } {} +TerrainType::TerrainType(std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_modifier, bool new_is_water) + : HasIdentifierAndColour { new_identifier, new_colour, true, false }, modifier { std::move(new_modifier) }, is_water { new_is_water } {} + +ModifierValue const& TerrainType::get_modifier() const { + return modifier; +} bool TerrainType::get_is_water() const { return is_water; diff --git a/src/openvic-simulation/map/TerrainType.hpp b/src/openvic-simulation/map/TerrainType.hpp index 1353130..edda0a9 100644 --- a/src/openvic-simulation/map/TerrainType.hpp +++ b/src/openvic-simulation/map/TerrainType.hpp @@ -9,13 +9,15 @@ namespace OpenVic { friend struct TerrainTypeManager; private: + const ModifierValue modifier; const bool is_water; - TerrainType(std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_values, bool new_is_water); + TerrainType(std::string_view new_identifier, colour_t new_colour, ModifierValue&& new_modifier, bool new_is_water); public: TerrainType(TerrainType&&) = default; + ModifierValue const& get_modifier() const; bool get_is_water() const; }; |