From 82875448c485d26375ed6dea4e64e940f6e10f74 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Mon, 8 Jan 2024 15:10:10 +0100 Subject: gemini --- src/Model/Building/Farm.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Model/Building/Farm.php') diff --git a/src/Model/Building/Farm.php b/src/Model/Building/Farm.php index 222d8cd..1a69c89 100644 --- a/src/Model/Building/Farm.php +++ b/src/Model/Building/Farm.php @@ -11,7 +11,12 @@ class Farm extends ResourceGenerator public int $buildTimeFactor = 1; public int $maxLevel = 25; - public array $resourceRequirements = [ + public array $resourceRequirementsBase = [ + 'wood' => 100, + 'clay' => 100, + 'iron' => 100, + ]; + public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 1.0, @@ -22,7 +27,7 @@ class Farm extends ResourceGenerator public function getResourceIncrementor(): int { $populationDemand = array_reduce( - Village::getUnits($this->villageId, Village::FETCH_UNIT_RESIDENCE), + Village::getUnits($this->villageId, Village::FETCH_UNIT_RESIDENCE, Village::RETURN_UNIT_EXISTING), function ($carry, Unit $unit) { return $carry + $unit->getPopulationDemand(); } -- cgit v1.2.3