diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 22:28:02 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-01-08 22:28:02 +0100 |
commit | e4351601a7ced91bf5a2c516a38db714d43e6ecf (patch) | |
tree | 045b0fb41621aab160cca3b24fd4184e1d8db9c2 /src/Model/Building/Marketplace.php | |
parent | 82875448c485d26375ed6dea4e64e940f6e10f74 (diff) |
send resources + adminer css
Diffstat (limited to 'src/Model/Building/Marketplace.php')
-rw-r--r-- | src/Model/Building/Marketplace.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Model/Building/Marketplace.php b/src/Model/Building/Marketplace.php index 2d87379..8978003 100644 --- a/src/Model/Building/Marketplace.php +++ b/src/Model/Building/Marketplace.php @@ -3,9 +3,12 @@ namespace App\Model\Building; use App\Model\Building; +use App\Model\Unit\Merchant; +use App\Model\Village; class Marketplace extends Building { + public string $unitType = 'Merchant'; public int $buildTimeFactor = 1; public int $maxLevel = 25; @@ -19,4 +22,11 @@ class Marketplace extends Building 'clay' => 10.0, 'iron' => 8.0, ]; + + public static function getResourceCapabilities(Village $village): int + { + $merchants = Village::getUnit($village, 'Merchant', Village::FETCH_UNIT_RESIDENCE, Village::RETURN_UNIT_EXISTING); + + return Merchant::getResourceCapabilities($village) * $merchants->amount; + } } |