aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/BuildingInstance.cpp
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-11-22 17:16:34 +0100
committer zaaarf <zaaarf@proton.me>2023-11-22 17:16:34 +0100
commit1683859e333f98fb63f1c72d926bb366a3b89f0b (patch)
treee11dde918a7f1f228d3383ba8f9287385e43b4f5 /src/openvic-simulation/economy/BuildingInstance.cpp
parent5c6caf6fbb7c606f4ebe0c397cc15c97d776f13d (diff)
chore: use PROPERTY and its variants when possible
Diffstat (limited to 'src/openvic-simulation/economy/BuildingInstance.cpp')
-rw-r--r--src/openvic-simulation/economy/BuildingInstance.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/openvic-simulation/economy/BuildingInstance.cpp b/src/openvic-simulation/economy/BuildingInstance.cpp
index 417cdda..597b89e 100644
--- a/src/openvic-simulation/economy/BuildingInstance.cpp
+++ b/src/openvic-simulation/economy/BuildingInstance.cpp
@@ -3,17 +3,13 @@
using namespace OpenVic;
BuildingInstance::BuildingInstance(BuildingType const& new_building_type, level_t new_level)
- : HasIdentifier { building_type.get_identifier() }, building_type { new_building_type }, level { new_level },
+ : HasIdentifier { new_building_type.get_identifier() }, building_type { new_building_type }, level { new_level },
expansion_state { ExpansionState::CannotExpand } {}
bool BuildingInstance::_can_expand() const {
return level < building_type.get_max_level();
}
-void BuildingInstance::set_level(BuildingInstance::level_t new_level) {
- level = new_level;
-}
-
bool BuildingInstance::expand() {
if (expansion_state == ExpansionState::CanExpand) {
expansion_state = ExpansionState::Preparing;