Class SpaceStation
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceCraft
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceShip
-
- de.extio.spacecraft.shared.model.entity.builtin.composite.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
AbstractCompositeEntity.CollisionCalculationResult, AbstractCompositeEntity.DefaultDamageWaveDamageHandler
-
-
Field Summary
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceShip
DEFAULT_SPACESHIP_DIMENSION_MAX_X, DEFAULT_SPACESHIP_DIMENSION_MAX_Y
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceCraft
crewTilesetName, dead, emEmission, GREEN_HIGHLIGHT, operators, RED_HIGHLIGHT, restrictedHullEntityDefName, restrictedWallEntityDefName, serverEntityGroupsCache, serverLastAttacked, serverLastAttackedBy, shareCode, shipClassName, team, thumbnail, thumbnailVersion
-
Fields inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
accelerationVector, DAMAGE_COLORS, DAMAGE_CONSUMER_BOTH, DAMAGE_CONSUMER_ENTITY, DAMAGE_CONSUMER_SHIELD, DAMAGEWAVE_DIRECTIONS, dimension, dirty, entityManager, fields, fresh, lastMovement, LOGGER, meshes, position, positionDirty, precisePosition, prevPosition, prevVelocityVector, ROTATE_COLLISION_COLOR, splitEntityGroups, sumMassCached, sumMassCachedTurn, uuid, velocityVector, VMAX_M_LB, VMAX_M_UB, VMAX_VEL_MAX, VMAX_VEL_MIN, VMAX_VEL_VAR
-
-
Constructor Summary
Constructors Constructor Description SpaceStation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(UUID uuid, CoordI2 position, CoordI2 dimension)
Called upon initial creation of this composite entity.void
despawn(GameSession gameSession)
Server side: Despawns this space station - unregisters from game session ship slotboolean
isAllTeamsCanEnter()
void
onServerTurnPass0(GameSession gameSession)
Server side: Called every turn to contain any logic related to this entitiy.void
setAllTeamsCanEnter(boolean allTeamsCanEnter)
void
update(AbstractCompositeEntity other)
Updates non-transient fields (i.e.-
Methods inherited from class de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceShip
calculateVMax, compressDimension, damageWave, excludeDynamicSerializationPropertiesPermanentStorage, getCrewControlByEntity, getCrewControlByPlayer, getCrewSlots, getDynamicSerializationProperties, getExtendedViewport, getShieldedHullbreaches, getShipSlotIndex, getViewport, isInGame, killCondition, localInit, onClientActionMessage, onClientDraw, onServerHullBreach, onServerSpaceCraftKilled, resetFieldsForPermanentStorage, setCrewControlByEntity, setCrewControlByPlayer, setCrewSlots, setDynamicSerializationProperties, setExtendedViewport, setInGame, setShieldedHullbreaches, setShipSlotIndex, setViewport
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.builtin.composite.SpaceCraft
getCrewTilesetName, getDynamicSerializationPropertiesForSeparateTransfer, getEmEmission, getOperators, getRestrictedHullEntityDefName, getRestrictedHullEntityDefName, getRestrictedWallEntityDefName, getRestrictedWallEntityDefName, getServerEntityGroupsCache, getServerLastAttacked, getServerLastAttackedBy, getShareCode, getShipClassName, getTeam, getThumbnail, getThumbnailVersion, isDead, localCopy, onServerCollision, onServerTurnPass1, onServerTurnPass2, rotate, serverHullBreach, setCrewTilesetName, setDead, setEmEmission, setOperators, setRestrictedHullEntityDefName, setRestrictedWallEntityDefName, setServerLastAttacked, setServerLastAttackedBy, setShareCode, setShipClassName, setTeam, setThumbnail, setThumbnailVersion
-
Methods inherited from class de.extio.spacecraft.shared.model.entity.AbstractCompositeEntity
accelerate, calculateCollision, getAccelerationVector, getAnimationOffset, getCompositeEntityFactoryClassName, getDimension, getEntityManager, getEntityNetworkConsolesCache, getFields, getLastEdited, getLastRotation, getLastRotationDirection, getMeshes, getPosition, getPrecisePosition, getPrevPosition, getSceneTag, getServerFieldsLastPublished, getServerLastInViewPort, getServerMeshesLastPublished, getServerScannedBy, getUuid, getVelocityVector, handleMove, handleMoveApply, includeInSpatialIndex2ResultSet, isDirty, isFresh, isInSpatialIndex2ResultSet, isLocalInit, isPositionDirty, isRemoved, isShadowed, isSplitEntityGroups, onClientFrame, onRemove, onServerActionMessage, priorityCalculateCollision, resetStatic, restoreFieldsFromPermanentStorage, setAccelerationVector, setCompositeEntityFactoryClassName, setDimension, setDirty, setEntityManager, setFresh, setLastEdited, setPosition, setPositionDirty, setPrecisePosition, setPrevPosition, setSceneTag, setServerFieldsLastPublished, setServerMeshesLastPublished, setShadowed, setSplitEntityGroups, setUuid, setVelocityVector, splitEntityGroups, sumMass
-
-
-
-
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()
-
update
public void update(AbstractCompositeEntity other)
Description copied from class:AbstractCompositeEntity
Updates non-transient fields (i.e. when receiving an entity update from server or copying a composite entity)
-
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 classSpaceShip
-
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)
-
-