Skip to content

feat(officers): add Premium Officers system with UI, admin activation, and tooltips#1385

Draft
piciolo wants to merge 1 commit into
lanedirt:mainfrom
piciolo:Ufficiali
Draft

feat(officers): add Premium Officers system with UI, admin activation, and tooltips#1385
piciolo wants to merge 1 commit into
lanedirt:mainfrom
piciolo:Ufficiali

Conversation

@piciolo

@piciolo piciolo commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a fully working Premium Officers system (Commander, Admiral, Engineer, Geologist, Technocrat) with purchase flow and bonus effects
  • Integrates officers into the premium page UI with live tooltips, active/inactive states, and Dark Matter cost display
  • Adds admin shortcut routes to activate/deactivate officers directly without spending Dark Matter (dev tool)
  • Fixes Commander fleet slot count (was incorrectly granting +1 extra slot)
  • Fixes officer tooltip visibility (tooltip icon now renders inline next to the Advantages label)
  • Adds officer-related i18n translation keys for all supported locales

Changed files (key)

File Change
app/Services/OfficerService.php New service: officer state, activation, benefit calculation
app/Http/ViewComposers/IngameMainComposer.php Injects currentOfficer into every ingame layout
resources/views/ingame/premium/index.blade.php Officer cards with tooltip, purchase button, active state
app/Http/Controllers/Admin/DeveloperShortcutsController.php Admin routes to activate officers
resources/lang/*/t_ingame.php Officer translation keys across all locales

Test plan

  • Navigate to /premium — verify all 5 officer cards display correctly with tooltips
  • Purchase an officer with Dark Matter — verify active state and bonus applied
  • Check Commander: fleet slots should be +4 building queue (no extra fleet slot)
  • Admin: use developer shortcuts to activate/deactivate officers without DM cost
  • Verify $currentOfficer is available on all ingame pages (no Blade undefined variable errors)
image image image

…, and tooltips

Rebased onto current main (squashed). Conflicts in EspionageMission.php and
IngameMainComposer.php resolved to combine main's variable/refactor changes with
the officer bonuses (espionage levels via OfficerService).
@github-actions

Copy link
Copy Markdown

Preview deployment

Preview environment for this PR is ready for functional testing. Use one of the test accounts below to log in.

Status URL Commit Last deployed
✅ Live https://pr-1385.preview.ogamex.dev 195fba3 2026-07-25 15:33:30 UTC
Test accounts (click to expand)
Email (login) Password Role Class Planets Description
test1@ogamex.dev test admin Collector 2 Admin, high resources, mining focus
test2@ogamex.dev test player General 1 Military focus, ships & fleet
test3@ogamex.dev test player Discoverer 1 Exploration, probes & cargo ships
test4@ogamex.dev test player None 1 New player, no class selected yet
test5@ogamex.dev test moderator Collector 1 Moderator, balanced setup
test6@ogamex.dev test player General 1 Vacation mode enabled
test7@ogamex.dev test player General 3 Heavy defense across planets
test8@ogamex.dev test player Discoverer 1 Fleet focus, inactive (i) 8 days
test9@ogamex.dev test player Collector 1 Beginner, long inactive (I) 40 days
test10@ogamex.dev test player General 5 Endgame, 90 unread messages

This preview will be automatically destroyed when the PR is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant