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:
commit
7a9d2c9624
@ -39,11 +39,11 @@ public class Ally : Entity
|
||||
public override void LevelStart()
|
||||
{
|
||||
base.LevelStart();
|
||||
ResourceManager.Instance.CurrentPopulation += PopulationCost;
|
||||
if(this is not Building) ResourceManager.Instance.CurrentPopulation += PopulationCost;
|
||||
}
|
||||
public override void LevelDestroy()
|
||||
{
|
||||
base.LevelDestroy();
|
||||
ResourceManager.Instance.CurrentPopulation -= PopulationCost;
|
||||
if (this is not Building) ResourceManager.Instance.CurrentPopulation -= PopulationCost;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user