100, 'clay' => 100, 'iron' => 100, ]; public array $resourceRequirementsFactor = [ 'wood' => 1.0, 'clay' => 1.0, 'iron' => 1.0, ]; public string $resourceType = 'food'; public function getResourceIncrementor(): int { $populationDemand = array_reduce( Village::getUnits($this->villageId, Village::FETCH_UNIT_RESIDENCE, Village::RETURN_UNIT_EXISTING), function ($carry, Unit $unit) { return $carry + $unit->getPopulationDemand(); } ); return parent::getResourceIncrementor() - $populationDemand; } }