summaryrefslogtreecommitdiff
path: root/src/Model/Unit/Merchant.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-08 22:28:02 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-08 22:28:02 +0100
commite4351601a7ced91bf5a2c516a38db714d43e6ecf (patch)
tree045b0fb41621aab160cca3b24fd4184e1d8db9c2 /src/Model/Unit/Merchant.php
parent82875448c485d26375ed6dea4e64e940f6e10f74 (diff)
send resources + adminer css
Diffstat (limited to 'src/Model/Unit/Merchant.php')
-rw-r--r--src/Model/Unit/Merchant.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Model/Unit/Merchant.php b/src/Model/Unit/Merchant.php
index 8958d27..be0b25e 100644
--- a/src/Model/Unit/Merchant.php
+++ b/src/Model/Unit/Merchant.php
@@ -3,6 +3,7 @@
namespace App\Model\Unit;
use App\Model\Unit;
+use App\Model\Village;
class Merchant extends Unit
{
@@ -22,4 +23,11 @@ class Merchant extends Unit
'iron' => 2.0,
'food' => 2.0,
];
+
+ public static function getResourceCapabilities(Village|int $village): int
+ {
+ $marketplace = Village::getBuilding($village->id ?? $village, 'Marketplace');
+
+ return $marketplace->level * 100;
+ }
}