Class SpaceStation

  • All Implemented Interfaces:
    HasAttackerInfo, HasServerEntityGroupsCache, HasPosition2, HasPositionAndDimension2, SpatialIndex2Capable

    public class SpaceStation
    extends SpaceShip
    SpaceStation is a specialization of SpaceShip for space stations that may be entered by players.
    When to use which type:
    * SpaceCraft: Ships controlled by AI, cannot spawn on a player slot in a game session
    * SpaceShip: Ships controlled by players or AI, can spawn on a player slot in a game session (but only needs to if players join the ship)
    * SpaceStation: Specialization of SpaceShip for stationary stations. Less restrictions in ship editor but other than that similar to SpaceShip
    • Constructor Detail

      • SpaceStation

        public SpaceStation()
    • Method Detail

      • create

        public void create​(UUID uuid,
                           CoordI2 position,
                           CoordI2 dimension)
        Description copied from class: AbstractCompositeEntity
        Called upon initial creation of this composite entity. This method is not called locally (i.e. when the composite has been transferred from server to client), so only initialize non-transient fields here. See also localInit()
        Overrides:
        create in class SpaceShip
      • onServerTurnPass0

        public void onServerTurnPass0​(GameSession gameSession)
        Description copied from class: AbstractCompositeEntity
        Server side: Called every turn to contain any logic related to this entitiy. Pass0 is called at the beginning of the cycle before entity callbacks have been called.
        Overrides:
        onServerTurnPass0 in class SpaceShip
      • despawn

        public void despawn​(GameSession gameSession)
        Server side: Despawns this space station - unregisters from game session ship slot
      • isAllTeamsCanEnter

        public boolean isAllTeamsCanEnter()
      • setAllTeamsCanEnter

        public void setAllTeamsCanEnter​(boolean allTeamsCanEnter)