Skip to content

Account for colony-slot limit in galaxy canColonize / colonise tooltips #1516

Description

@tiweb442

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions