Skip to content

Commit

Permalink
Organisations achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Jan 9, 2025
1 parent 5029077 commit e9b8cff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Services/Campaign/AchievementService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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($families, 2),
'module' => $this->moduleName('organisation', 'organisations'),
],
'calendars' => [
'icon' => config('entities.icons.calendar'),
'amount' => $calendars,
Expand Down
1 change: 1 addition & 0 deletions lang/en/campaigns/achievements.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'families' => 'Family planning',
'locations' => 'Builder',
'markers' => 'Cartographer',
'organisations' => 'Merges and acquisitions',
'plugins' => 'Plugin connoisseur',
'quests' => 'Mastermind',
'tags' => 'Under control',
Expand Down

0 comments on commit e9b8cff

Please sign in to comment.