diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-11-29 09:35:27 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-11-29 09:35:27 +0100 |
commit | 3afcaef927391db23fe23c6c8c26b8960e8dae32 (patch) | |
tree | 143b9f6df9e8c795c8c6ed901bffdc7119f40df1 /src/Model/Building.php | |
parent | c4ce3e884a6aa527bcc138771617215cf03265a4 (diff) |
intermediate commit
Diffstat (limited to 'src/Model/Building.php')
-rw-r--r-- | src/Model/Building.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Model/Building.php b/src/Model/Building.php index 78d1aa5..7cae067 100644 --- a/src/Model/Building.php +++ b/src/Model/Building.php @@ -54,6 +54,16 @@ class Building return isset($results[0]) ? $results[0]->cast() : null; } + public static function getEmpty(int $villageId, string $buildingType): Building + { + $building = new Building(); + $building->type = $buildingType; + $building->level = 0; + $building->villageId = $villageId; + + return $building->cast(); + } + public function getBuildTime(): int { |