diff --git a/app/Services/Campaign/AchievementService.php b/app/Services/Campaign/AchievementService.php index 61accba63..5737a70d7 100644 --- a/app/Services/Campaign/AchievementService.php +++ b/app/Services/Campaign/AchievementService.php @@ -45,6 +45,8 @@ public function stats(): array|false // @phpstan-ignore-next-line $families = $this->campaign->families()->withInvisible()->count() + $this->random(); // @phpstan-ignore-next-line + $organisations = $this->campaign->organisations()->withInvisible()->count() + $this->random(); + // @phpstan-ignore-next-line $dead = $this->campaign->characters()->withInvisible()->where('is_dead', true)->count() + $this->random(10, 30); // @phpstan-ignore-next-line $calendars = $this->campaign->calendars()->withInvisible()->count() + $this->random(5, 15); @@ -85,6 +87,13 @@ public function stats(): array|false 'level' => $this->level($families, 2), 'module' => $this->moduleName('family', 'families'), ], + 'organisations' => [ + 'icon' => config('entities.icons.organisation'), + 'amount' => $organisations, + 'target' => $this->target($organisations, 2), + 'level' => $this->level($organisations, 2), + 'module' => $this->moduleName('organisation', 'organisations'), + ], 'calendars' => [ 'icon' => config('entities.icons.calendar'), 'amount' => $calendars, diff --git a/app/View/Components/InfoBox.php b/app/View/Components/InfoBox.php index a073e0fda..641354c74 100644 --- a/app/View/Components/InfoBox.php +++ b/app/View/Components/InfoBox.php @@ -26,9 +26,8 @@ public function __construct( public string $urlIcon = 'fa-solid fa-angle-right', public bool $ajax = false, public bool $premium = false, - ) - { - // + ) { + } /** diff --git a/lang/en/campaigns/achievements.php b/lang/en/campaigns/achievements.php index 293dae5c1..69fe0ef6d 100644 --- a/lang/en/campaigns/achievements.php +++ b/lang/en/campaigns/achievements.php @@ -25,6 +25,7 @@ 'families' => 'Family planning', 'locations' => 'Builder', 'markers' => 'Cartographer', + 'organisations' => 'Merges and acquisitions', 'plugins' => 'Plugin connoisseur', 'quests' => 'Mastermind', 'tags' => 'Under control',