Class SpaceCraft

    • Field Detail

      • RED_HIGHLIGHT

        public static final RgbaColor RED_HIGHLIGHT
      • GREEN_HIGHLIGHT

        public static final RgbaColor GREEN_HIGHLIGHT
      • emEmission

        protected double emEmission
      • operators

        protected List<UUID> operators
      • dead

        protected boolean dead
      • team

        protected int team
      • shipClassName

        protected transient String shipClassName
      • thumbnail

        protected transient byte[] thumbnail
      • thumbnailVersion

        protected transient int thumbnailVersion
      • restrictedWallEntityDefName

        protected transient String restrictedWallEntityDefName
      • restrictedHullEntityDefName

        protected transient String restrictedHullEntityDefName
      • crewTilesetName

        protected transient String crewTilesetName
      • shareCode

        protected transient String shareCode
      • serverLastAttacked

        protected transient int serverLastAttacked
      • serverLastAttackedBy

        protected transient List<UUID> serverLastAttackedBy
    • Constructor Detail

      • SpaceCraft

        public SpaceCraft()
    • 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 AbstractCompositeEntity
      • getDynamicSerializationProperties

        public Map<String,​Object> getDynamicSerializationProperties​(boolean incremental,
                                                                          UUID recipient)
        Description copied from class: AbstractCompositeEntity
        Dynamic serialization properties are created when transferring data from server to client (or vice versa) as well as when persisting a composite to disk. These properties provide a way to implement complex serialization logic (i.e. views) and to distinguish between incremental and full updates.
        Overrides:
        getDynamicSerializationProperties in class AbstractCompositeEntity
      • serverHullBreach

        protected void serverHullBreach​(GameSession gameSession)
        Server side: Implements hull breaches on tiles. The hull is breached when floor entity is destroyed and shield strength on this tile is less than 1 plateau. Hull breaches leak O2 to space and may have more custom logic implemented
      • onServerHullBreach

        protected void onServerHullBreach​(CoordI2 position,
                                          int change,
                                          GameSession gameSession)
        Server side: Additional logic on tiles with a hull breach
      • killCondition

        protected boolean killCondition​(GameSession gameSession)
        Server side: Checks if the SpaceCraft has been killed
      • onServerSpaceCraftKilled

        protected void onServerSpaceCraftKilled​(GameSession gameSession,
                                                boolean initial)
        Server side: Called every turn when the spacecraft has been killed
      • getShipClassName

        public String getShipClassName()
      • setShipClassName

        public void setShipClassName​(String shipClassName)
      • getEmEmission

        public double getEmEmission()
      • setEmEmission

        public void setEmEmission​(double emEmission)
      • getOperators

        public List<UUID> getOperators()
      • setOperators

        public void setOperators​(List<UUID> operators)
      • getThumbnail

        public byte[] getThumbnail()
      • setThumbnail

        public void setThumbnail​(byte[] thumbnail)
      • getThumbnailVersion

        public int getThumbnailVersion()
      • setThumbnailVersion

        public void setThumbnailVersion​(int thumbnailVersion)
      • isDead

        public boolean isDead()
      • setDead

        public void setDead​(boolean dead)
      • getTeam

        public int getTeam()
      • setTeam

        public void setTeam​(int team)
      • getRestrictedWallEntityDefName

        public String getRestrictedWallEntityDefName()
      • getRestrictedWallEntityDefName

        public String getRestrictedWallEntityDefName​(boolean team)
      • setRestrictedWallEntityDefName

        public void setRestrictedWallEntityDefName​(String restrictedWallEntityDefName)
      • getRestrictedHullEntityDefName

        public String getRestrictedHullEntityDefName()
      • getRestrictedHullEntityDefName

        public String getRestrictedHullEntityDefName​(boolean team)
      • setRestrictedHullEntityDefName

        public void setRestrictedHullEntityDefName​(String restrictedHullEntityDefName)
      • getCrewTilesetName

        public String getCrewTilesetName()
      • setCrewTilesetName

        public void setCrewTilesetName​(String crewTilesetName)
      • getShareCode

        public String getShareCode()
      • setShareCode

        public void setShareCode​(String shareCode)