aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/economy/BuildingInstance.cpp
diff options
context:
space:
mode:
author Hop311 <Hop3114@gmail.com>2023-11-22 23:11:42 +0100
committer GitHub <noreply@github.com>2023-11-22 23:11:42 +0100
commita54898b7770e0d66b729216173960686c67e58bb (patch)
treeaf8ed836a4789ef94c5bfed27abb713922f45af3 /src/openvic-simulation/economy/BuildingInstance.cpp
parente76336cd92639f4ec71088fc4c80aea4c25528cd (diff)
parent738a203e0d8b4df87c42888043b99c13d5d97511 (diff)
Merge pull request #78 from OpenVicProject/property-macro
Refactoring (*mostly* related to the property macro)
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;