Summary
Follow-up from #1511 (review by @Geda173): galaxy canColonize / empty-slot colonise eligibility does not account for the player's colony-slot (max planet) limit.
With astrophysics researched and a free fleet slot, colonisation can still look available in the galaxy UI even when the player is already at their planet cap. The mission itself already fails on arrival via getMaxPlanetAmount() in ColonisationMission, but the galaxy tooltip/link should reflect this earlier.
Current behavior (after #1511)
- AJAX
system.canColonize is effectively astrophysics > 0
- Empty-slot colonise mission link requires colony ship + astrophysics + position eligibility + free fleet slot
- Neither path checks whether
planetCount() + 1 > getMaxPlanetAmount()
Expected behavior
- When the player is at their max planet/colony capacity, galaxy colonise should be inactive
- Tooltip should indicate that colonisation is not possible due to the colony-slot / astrophysics planet limit (reuse existing copy if available, otherwise match OGame-style messaging)
Suggested approach
Reuse existing player helpers:
PlayerService::getMaxPlanetAmount()
PlayerService::planets->planetCount()
(same check already used when a colonisation mission arrives)
Related
Summary
Follow-up from #1511 (review by @Geda173): galaxy
canColonize/ empty-slot colonise eligibility does not account for the player's colony-slot (max planet) limit.With astrophysics researched and a free fleet slot, colonisation can still look available in the galaxy UI even when the player is already at their planet cap. The mission itself already fails on arrival via
getMaxPlanetAmount()inColonisationMission, but the galaxy tooltip/link should reflect this earlier.Current behavior (after #1511)
system.canColonizeis effectivelyastrophysics > 0planetCount() + 1 > getMaxPlanetAmount()Expected behavior
Suggested approach
Reuse existing player helpers:
PlayerService::getMaxPlanetAmount()PlayerService::planets->planetCount()(same check already used when a colonisation mission arrives)
Related