Skip to content

Commit

Permalink
fix units counter #126
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieltsants committed Oct 16, 2024
1 parent cc6e641 commit 33ecd79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Http/Controllers/GalaxyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function index(Request $request, PlayerService $player, SettingsService $
'current_galaxy' => $galaxy,
'current_system' => $system,
'espionage_probe_count' => $planet->getObjectAmount('espionage_probe'),
'recycler_count' => 0,
'interplanetary_missiles_count' => 0,
'recycler_count' => $planet->getObjectAmount('recycler'),
'interplanetary_missiles_count' => $planet->getObjectAmount('interplanetary_missile'),
'used_slots' => 0,
'max_slots' => 1,
'max_galaxies' => $settingsService->numberOfGalaxies(),
Expand Down Expand Up @@ -376,7 +376,7 @@ public function ajax(Request $request, PlayerService $player, PlanetServiceFacto
'reservedPositions' => [],
'success' => true,
'system' => [
'availableMissiles' => 0,
'availableMissiles' => $planet->getObjectAmount('interplanetary_missile'),
'availablePathfinders' => 0,
'availableProbes' => $planet->getObjectAmount('espionage_probe'),
'availableRecyclers' => $planet->getObjectAmount('recycler'),
Expand All @@ -399,7 +399,7 @@ public function ajax(Request $request, PlayerService $player, PlanetServiceFacto
'playerId' => $player->getId(),
'settingsProbeCount' => 3,
'showOutlawWarning' => true,
'slotsColonized' => 3,
'slotsColonized' => $player->planets->count(),
'switchGalaxyDeuteriumCosts' => 10,
'toGalaxyLink' => route('galaxy.index', ['galaxy' => $galaxy, 'system' => $system]),
'usedFleetSlots' => 1
Expand Down

0 comments on commit 33ecd79

Please sign in to comment.