Pull request #75: Buildings are not counted as People, and can still be placed, regardless of limit

Merge in CGD/gather-and-defend from origin/bugfix/BuildingsExludedFromPopulation to main

* commit '1fd249a0d2a7687ba203a899ca9ced8a12989e00':
  Made it so that buildings are not counted in the total population count, and that the player can still place those, even when the maximum population has been reached.
This commit is contained in:
Maximilien Blanchard-Bizien 2024-09-24 15:11:57 +00:00
commit 7a9d2c9624

View File

@ -39,11 +39,11 @@ public class Ally : Entity
public override void LevelStart() public override void LevelStart()
{ {
base.LevelStart(); base.LevelStart();
ResourceManager.Instance.CurrentPopulation += PopulationCost; if(this is not Building) ResourceManager.Instance.CurrentPopulation += PopulationCost;
} }
public override void LevelDestroy() public override void LevelDestroy()
{ {
base.LevelDestroy(); base.LevelDestroy();
ResourceManager.Instance.CurrentPopulation -= PopulationCost; if (this is not Building) ResourceManager.Instance.CurrentPopulation -= PopulationCost;
} }
} }