Area
, Affectable
, Behavable
, BoundedObject
, CMObject
, Contingent
, Economics
, Environmental
, Expireable
, Modifiable
, MsgListener
, Physical
, PhysicalAgent
, Places
, PrivateProperty
, SpaceObject
, StatsAffecting
, Tickable
, Boardable
, SpaceShip
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class StdSpaceShip extends StdBoardableShip implements SpaceShip
Area.CompleteRoomEnumerator, Area.RoomComparator, Area.RoomIDComparator, Area.RoomIDEnumerator, Area.State, Area.Stats
BoundedObject.BoundedCube
SpaceObject.Distance, SpaceObject.SpaceGateway
SpaceShip.ShipFlag
Modifier and Type | Field | Description |
---|---|---|
protected int |
atmosphere |
|
protected static Climate |
climateObj |
|
protected Ability |
gravityFloaterA |
|
protected int |
gravLossDown |
|
protected ShipEngine |
lastEngine |
|
protected double |
lastEThrust |
|
protected TimeClock |
localClock |
|
protected int |
mass |
|
protected long |
nextStaleCheck |
|
protected long |
nextStaleWarn |
|
protected double |
omlCoeff |
|
protected long |
radius |
|
protected SpaceObject |
spaceSource |
|
protected java.util.Set<java.lang.String> |
staleAirList |
DEFAULT_TIME_PASSIVE_LAPSE, FLAG_INSTANCE_CHILD, FLAG_INSTANCE_PARENT, FLAG_THIN, THEME_ALLTHEMES, THEME_BIT_NAMES, THEME_FANTASY, THEME_HEROIC, THEME_INHERIT, THEME_NAMES, THEME_PHRASE, THEME_PHRASE_EXT, THEME_SKILLONLYMASK, THEME_TECHNOLOGY
NAME_REPL_MARKERS, NAME_REPL_STRINGS
idConverter
ALL_CLIMATE_MASK, ATMOSPHERE_INHERIT, CLIMASK_COLD, CLIMASK_DRY, CLIMASK_HOT, CLIMASK_INHERIT, CLIMASK_NORMAL, CLIMASK_VOID, CLIMASK_WET, CLIMASK_WINDY, CLIMATE_DESCS, NUM_CLIMATES, placeComparator
ACCELERATION_DAMAGED, ACCELERATION_G, ACCELERATION_INSTANTDEATH, ACCELERATION_ROLLARCOASTER, ACCELERATION_TYPICALROCKET, ACCELERATION_TYPICALSPACEROCKET, ACCELERATION_UNCONSCIOUSNESS, ASTEROID_MASS, ATMOSPHERIC_DRAG_BRICK, ATMOSPHERIC_DRAG_STREAMLINE, DISTANCES, MOONLET_MASS, MULTIPLIER_GRAVITY_EFFECT_RADIUS, MULTIPLIER_ORBITING_RADIUS_MAX, MULTIPLIER_ORBITING_RADIUS_MIN, MULTIPLIER_PLANET_MASS, MULTIPLIER_STAR_MASS, VELOCITY_ESCAPE, VELOCITY_LIGHT, VELOCITY_ORBITING, VELOCITY_SOUND, VELOCITY_SUBLIGHT, VELOCITY_TRANSWARP1, VELOCITY_TRANSWARP10, VELOCITY_TRANSWARP2, VELOCITY_TRANSWARP3, VELOCITY_TRANSWARP4, VELOCITY_TRANSWARP5, VELOCITY_TRANSWARP6, VELOCITY_TRANSWARP7, VELOCITY_TRANSWARP8, VELOCITY_TRANSWARP9, VELOCITY_WARP1, VELOCITY_WARP10, VELOCITY_WARP2, VELOCITY_WARP3, VELOCITY_WARP4, VELOCITY_WARP5, VELOCITY_WARP6, VELOCITY_WARP7, VELOCITY_WARP8, VELOCITY_WARP9
_name, affects, amDestroyed, author, basePhyStats, behaviors, blurbFlags, currency, description, displayText, empty, flag, imageName, me, miscText, myRooms, parents, phyStats, properRoomIDSet, savedDock, scripts, shipExitCache, shipItem, subOps, tickStatus, xtraValues
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
StdSpaceShip() |
Modifier and Type | Method | Description |
---|---|---|
int[] |
addMaskAndReturn(int[] one,
int[] two) |
|
protected boolean |
changeRoomAir(Room R,
Room notifyRoom,
int atmoResource) |
|
protected void |
cloneFix(StdBoardableShip ship) |
|
long[] |
coordinates() |
The current absolute coordinates of the object
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
void |
destroy() |
Utterly and permanently destroy this object, not only removing it from the map, but
causing this object to be collected as garbage by Java.
|
double[] |
direction() |
The direction of travel of this object in radians.
|
protected void |
doAtmosphereChanges() |
|
void |
dockHere(Room roomR) |
Designates that this ship is landed and docked in the given
planetary room.
|
protected void |
doGravityChangesTick() |
|
protected void |
doStaleCheck() |
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
double[] |
facing() |
The direction of facing of this object in radians.
|
long |
flags() |
Return basic attributed flag about the area.
|
int |
getAtmosphere() |
Returns the resource that represents the atmosphere of this area.
|
int |
getAtmosphereCode() |
Returns the resource (or -1) that represents the atmosphere of this area.
|
BoundedObject.BoundedCube |
getBounds() |
|
Climate |
getClimateObj() |
Returns a reference to the Climate object that represents the
current and future weather for this area.
|
int |
getClimateType() |
Returns a bitmap of the climate for this place.
|
int |
getClimateTypeCode() |
Returns a bitmap of climate flags for this area which will be used to influence
the weather for the area in addition to season and other factors.
|
protected Ability |
getGravityFloat() |
|
Room |
getIsDocked() |
Returns the Room where this ship is docked, or NULL if in space.
|
long |
getMass() |
Returns the mass of this object, derived from its
radius and type, or perhaps from other things.
|
double |
getOMLCoeff() |
The Outer Mold Line coefficient -- how streamlined are you?
|
boolean |
getShipFlag(SpaceShip.ShipFlag flag) |
Gets one of the ship flags
|
SpaceObject |
getShipSpaceObject() |
Space ships are unique in having an Item stand-in for planet-side access,
as well as an Area object.
|
java.lang.String |
getStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String[] |
getStatCodes() |
Returns an array of the string names of those fields which are modifiable on this object at run-time by
builders.
|
int |
getTheme() |
Returns the technology level supported by this area.
|
int |
getThemeCode() |
Returns the technology level supported by this area.
|
TimeClock |
getTimeObj() |
Returns a reference to the TimeClock object that represents the
calendar and date/time for this area.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
isGeneric() |
Whether the fields of this item are set in code, or set by builders.
|
boolean |
isStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
SpaceObject |
knownSource() |
The source object from which this space object is travelling from
|
SpaceObject |
knownTarget() |
If this object is targeting another space object as a destination, this will return it
|
protected void |
moveAtmosphereOut(java.util.Set<Room> doneRooms,
Room startRoom,
int atmo) |
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
long |
radius() |
The current radius of the object
|
void |
registerListener(Technical.TechCommand command,
MsgListener listener) |
Register a global ship listener.
|
double |
roll() |
The full 360 orientation of the top of the object in radians.
|
void |
setAtmosphere(int resourceCode) |
Sets the resource (or -1) that represents the atmosphere of this area.
|
void |
setClimateObj(Climate obj) |
Sets a reference to the Climate object that represents the
current and future weather for this area.
|
void |
setClimateType(int newClimateType) |
Returns a bitmap of climate flags for this area which will be used to influence
the weather for the area in addition to season and other factors.
|
void |
setCoords(long[] coords) |
Sets the current absolute coordinates of the object
|
void |
setDirection(double[] dir) |
Sets the direction of travel of this object in radians.
|
void |
setDockableItem(Item dockableItem) |
When a boardable ship area is created, it is bound to an item
that resides in a room when docked, or possibly, always.
|
void |
setFacing(double[] dir) |
Sets the direction of facing of this object in radians.
|
void |
setKnownSource(SpaceObject O) |
Sets the source object from which this space object is travelling from
|
void |
setKnownTarget(SpaceObject O) |
If this object is targeting another space object as a destination, this will set it
|
void |
setName(java.lang.String newName) |
Sets the raw unmodified name of this object as stored in the database.
|
void |
setOMLCoeff(double coeff) |
Set the Outer Mold Line coefficient -- how streamlined are you?
|
void |
setRadius(long radius) |
Set the current radius of the object
|
void |
setRoll(double dir) |
Sets the full 360 orientation of the top of the object in radians.
|
void |
setShipFlag(SpaceShip.ShipFlag flag,
boolean setShipFlag) |
Sets one of the ship flags
|
void |
setSpeed(double v) |
Sets the speed of the object through space
|
void |
setStat(java.lang.String code,
java.lang.String val) |
An alternative means of setting the values of those fields on this object which are modifiable at
run-time by builders.
|
void |
setTheme(int level) |
Sets the technology level supported by this area.
|
void |
setTimeObj(TimeClock obj) |
Sets a reference to the TimeClock object that represents the
calendar and date/time for this area.
|
double |
speed() |
The speed of the object through space
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
void |
unregisterListener(Technical.TechCommand command,
MsgListener listener) |
Register a global ship listener.
|
getArea, getBoardableItem, getHomePortID, rename, securityCheck, setArea, setHomePortID, unDock
amDestroyed, isSavable, setSavable
description, displayText, image, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setImage, setMiscText, text
expirationDate, setExpirationDate
getSaveStatIndex
okMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
affectCharState, affectCharStats, affectPhyStats
addBehavior, addBlurbFlag, addChild, addEffect, addMetroRoom, addMetroRoomnumber, addNonUninvokableEffect, addParent, addProperRoom, addProperRoomnumber, addScript, addSubOp, affectCharState, affectCharStats, affectPhyStats, allBlurbFlags, amDestroyed, amISubOp, areaBlurbFlags, basePhyStats, behaviors, canChild, canParent, compareTo, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delBlurbFlag, delEffect, delMetroRoom, delMetroRoomnumber, delProperRoom, delProperRoomnumber, delScript, delSubOp, description, description, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fillInAreaRoom, fillInAreaRooms, genericName, getArchivePath, getArea, getAreaIStats, getAreaState, getAreaStats, getAuthorID, getBlurbFlag, getBoardableItem, getCachedRoomnumbers, getChild, getChildren, getCodeNum, getCompleteMap, getFilledCompleteMap, getFilledProperMap, getFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getHomePortID, getMetroCollection, getMetroMap, getMetroRoomnumbers, getNewRoomID, getOwnerName, getParent, getParents, getParentsIterator, getParentsRecurse, getParentsReverseIterator, getPiety, getPlayerLevel, getPrice, getProperMap, getProperRoomnumbers, getRandomMetroRoom, getRandomProperRoom, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, getRoom, getSaveStatIndex, getShipItemArea, getShipItemRoom, getSubOpList, getTickStatus, getTitleID, image, inMyMetroArea, isChild, isChild, isChildRecurse, isParent, isParent, isParentRecurse, isProperlyEmpty, isProperlyOwned, isRoom, isRoomCached, isSavable, L, loadAreas, maxRange, metroSize, minRange, miscTextFormat, name, name, Name, numAllBlurbFlags, numBehaviors, numberOfProperIDedRooms, numBlurbFlags, numEffects, numScripts, okMessage, phyStats, properSize, rawImage, recoverPhyStats, removeChild, removeParent, rename, sameAs, scripts, securityCheck, setArchivePath, setArea, setAreaState, setAuthorID, setBasePhyStats, setBudget, setCurrency, setDescription, setDevalueRate, setDisplayText, setExpirationDate, setHomePortID, setIgnoreMask, setImage, setInvResetRate, setItemPricingAdjustments, setMiscText, setOwnerName, setPlayerLevel, setPrejudiceFactors, setPrice, setProperRoomnumbers, setSavable, setSubOpList, subOps, text, unDock
getTickStatus, name
protected static Climate climateObj
protected volatile ShipEngine lastEngine
protected volatile double lastEThrust
protected volatile int mass
protected SpaceObject spaceSource
protected TimeClock localClock
protected int atmosphere
protected long radius
protected double omlCoeff
protected volatile long nextStaleCheck
protected volatile long nextStaleWarn
protected java.util.Set<java.lang.String> staleAirList
protected Ability gravityFloaterA
protected volatile int gravLossDown
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdBoardableShip
public void initializeClass()
CMObject
initializeClass
in interface CMObject
initializeClass
in class StdBoardableShip
public Room getIsDocked()
Boardable
getIsDocked
in interface Boardable
getIsDocked
in class StdBoardableShip
public void setClimateObj(Climate obj)
Area
setClimateObj
in interface Area
setClimateObj
in class StdBoardableShip
obj
- a com.planet_ink.coffee_mud.Common.interfaces.Climate objectClimate
public Climate getClimateObj()
Area
getClimateObj
in interface Area
getClimateObj
in class StdBoardableShip
Climate
public double getOMLCoeff()
SpaceShip
getOMLCoeff
in interface SpaceShip
public void setOMLCoeff(double coeff)
SpaceShip
setOMLCoeff
in interface SpaceShip
coeff
- the Outer Mold Line coefficientpublic TimeClock getTimeObj()
Area
getTimeObj
in interface Area
getTimeObj
in class StdBoardableShip
TimeClock
public void setTimeObj(TimeClock obj)
Area
setTimeObj
in interface Area
setTimeObj
in class StdBoardableShip
obj
- a com.planet_ink.coffee_mud.Common.interfaces.TimeClock objectTimeClock
public int getAtmosphereCode()
Places
getAtmosphereCode
in interface Places
getAtmosphereCode
in class StdBoardableShip
RawMaterial.MATERIAL_GAS
public void setAtmosphere(int resourceCode)
Places
setAtmosphere
in interface Places
setAtmosphere
in class StdBoardableShip
resourceCode
- the RawMaterial resource to useRawMaterial.MATERIAL_GAS
public int getAtmosphere()
Places
getAtmosphere
in interface Places
getAtmosphere
in class StdBoardableShip
RawMaterial.MATERIAL_GAS
public long radius()
SpaceObject
radius
in interface SpaceObject
public void setRadius(long radius)
SpaceObject
setRadius
in interface SpaceObject
radius
- the current radius of the objectpublic long flags()
Area
flags
in interface Area
flags
in class StdBoardableShip
Area.FLAG_THIN
public SpaceObject knownSource()
SpaceObject
knownSource
in interface SpaceObject
public void setKnownSource(SpaceObject O)
SpaceObject
setKnownSource
in interface SpaceObject
O
- the source of this objectpublic long[] coordinates()
SpaceObject
coordinates
in interface SpaceObject
public void setCoords(long[] coords)
SpaceObject
setCoords
in interface SpaceObject
coords
- 3 dimensional array of the coordinates in spacepublic double[] direction()
SpaceObject
direction
in interface SpaceObject
public double roll()
SpaceShip
public void setRoll(double dir)
SpaceShip
public void setDirection(double[] dir)
SpaceObject
setDirection
in interface SpaceObject
dir
- 2 dimensional array for the direction of movementpublic double[] facing()
SpaceShip
public void setFacing(double[] dir)
SpaceShip
public double speed()
SpaceObject
speed
in interface SpaceObject
public void setSpeed(double v)
SpaceObject
setSpeed
in interface SpaceObject
v
- the speedpublic SpaceObject knownTarget()
SpaceObject
knownTarget
in interface SpaceObject
public void setKnownTarget(SpaceObject O)
SpaceObject
setKnownTarget
in interface SpaceObject
O
- the target destinationpublic void setShipFlag(SpaceShip.ShipFlag flag, boolean setShipFlag)
SpaceShip
setShipFlag
in interface SpaceShip
flag
- the flag to set or clearsetShipFlag
- the flag valueSpaceShip.ShipFlag
,
SpaceShip.getShipFlag(ShipFlag)
public boolean getShipFlag(SpaceShip.ShipFlag flag)
SpaceShip
getShipFlag
in interface SpaceShip
flag
- the flag to set or clearSpaceShip.ShipFlag
,
SpaceShip.setShipFlag(ShipFlag, boolean)
public void setDockableItem(Item dockableItem)
Boardable
setDockableItem
in interface Boardable
setDockableItem
in class StdBoardableShip
dockableItem
- the item that acts as dockable itempublic BoundedObject.BoundedCube getBounds()
getBounds
in interface BoundedObject
public long getMass()
SpaceObject
getMass
in interface SpaceObject
public void destroy()
Contingent
destroy
in interface Contingent
destroy
in class StdBoardableShip
public int getClimateTypeCode()
Places
getClimateTypeCode
in interface Places
getClimateTypeCode
in class StdBoardableShip
Places.CLIMASK_COLD
public int getClimateType()
Places
getClimateType
in interface Places
getClimateType
in class StdBoardableShip
Places.CLIMASK_COLD
public void setClimateType(int newClimateType)
Places
setClimateType
in interface Places
setClimateType
in class StdBoardableShip
newClimateType
- a CLIMASK bitmapPlaces.CLIMASK_COLD
public void setName(java.lang.String newName)
Environmental
setName
in interface Environmental
setName
in class StdBoardableShip
newName
- the raw base name of this object on the map.Environmental.Name()
public int getTheme()
Area
getTheme
in interface Area
getTheme
in class StdBoardableShip
Area.THEME_FANTASY
public int getThemeCode()
Area
getThemeCode
in interface Area
getThemeCode
in class StdBoardableShip
Area.THEME_FANTASY
public void setTheme(int level)
Area
setTheme
in interface Area
setTheme
in class StdBoardableShip
level
- the bitmap representing the tech levelArea.THEME_FANTASY
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
newInstance
in class StdBoardableShip
public boolean isGeneric()
Environmental
isGeneric
in interface Environmental
isGeneric
in class StdBoardableShip
Environmental.text()
protected void cloneFix(StdBoardableShip ship)
cloneFix
in class StdBoardableShip
public CMObject copyOf()
CMObject
copyOf
in interface CMObject
copyOf
in class StdBoardableShip
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdBoardableShip
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public void registerListener(Technical.TechCommand command, MsgListener listener)
SpaceShip
registerListener
in interface SpaceShip
command
- command which should be listened forlistener
- the listenerSpaceShip.unregisterListener(TechCommand, MsgListener)
public void unregisterListener(Technical.TechCommand command, MsgListener listener)
SpaceShip
unregisterListener
in interface SpaceShip
command
- command which should be listened forlistener
- the listenerSpaceShip.registerListener(TechCommand, MsgListener)
public int[] addMaskAndReturn(int[] one, int[] two)
protected void moveAtmosphereOut(java.util.Set<Room> doneRooms, Room startRoom, int atmo)
protected void doStaleCheck()
protected Ability getGravityFloat()
protected void doGravityChangesTick()
protected void doAtmosphereChanges()
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdBoardableShip
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public void dockHere(Room roomR)
Boardable
dockHere
in interface Boardable
dockHere
in class StdBoardableShip
roomR
- the coordinate toom in which the ship is docked.public SpaceObject getShipSpaceObject()
SpaceShip
getShipSpaceObject
in interface SpaceShip
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
getStatCodes
in class StdBoardableShip
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
isStat
in class StdBoardableShip
code
- the name of the field to read.Modifiable.getStatCodes()
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
getStat
in class StdBoardableShip
code
- the name of the field to read.Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
setStat
in class StdBoardableShip
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()