com.planet_ink.coffee_mud.Areas
Class StdSpaceShip

java.lang.Object
  extended by com.planet_ink.coffee_mud.Areas.StdBoardableShip
      extended by com.planet_ink.coffee_mud.Areas.StdSpaceShip
All Implemented Interfaces:
Area, Affectable, Behavable, BoundedObject, CMObject, Contingent, Economics, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Places, PrivateProperty, SpaceObject, StatsAffecting, Tickable, BoardableShip, SpaceShip, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class StdSpaceShip
extends StdBoardableShip
implements SpaceShip


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.SpaceShip
SpaceShip.ShipFlag
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.SpaceObject
SpaceObject.Distance
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.BoundedObject
BoundedObject.BoundedCube
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.Area
Area.AreaInstanceChild, Area.CompleteRoomEnumerator, Area.RoomComparator, Area.RoomIDComparator, Area.RoomIDEnumerator, Area.State, Area.Stats
 
Field Summary
protected  int atmosphere
           
protected static Climate climateObj
           
protected  Ability gravityFloaterA
           
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
           
 
Fields inherited from class com.planet_ink.coffee_mud.Areas.StdBoardableShip
affects, amDestroyed, author, basePhyStats, behaviors, blurbFlags, currency, description, displayText, empty, flag, imageName, me, miscText, myRooms, name, parents, phyStats, properRoomIDSet, savedDock, scripts, shipExitCache, shipItem, tickStatus, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.SpaceObject
ACCELERATION_DAMAGED, ACCELERATION_G, ACCELERATION_INSTANTDEATH, ACCELERATION_PASSOUT, 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
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Fields inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.Area
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, TIME_PASSIVE_LAPSE
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Places
ALL_CLIMATE_MASK, ATMOSPHERE_INHERIT, CLIMASK_COLD, CLIMASK_DRY, CLIMASK_HOT, CLIMASK_INHERIT, CLIMASK_NORMAL, CLIMASK_WET, CLIMASK_WINDY, CLIMATE_DESCS, NUM_CLIMATES
 
Constructor Summary
StdSpaceShip()
           
 
Method Summary
 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 doGravityChanges()
           
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
 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.
 
Methods inherited from class com.planet_ink.coffee_mud.Areas.StdBoardableShip
addBehavior, addBlurbFlag, addChild, addEffect, addMetroRoom, addMetroRoomnumber, addNonUninvokableEffect, addParent, addProperRoom, addProperRoomnumber, addScript, addSubOp, affectCharState, affectCharStats, affectPhyStats, allBlurbFlags, amDestroyed, amISubOp, areaBlurbFlags, basePhyStats, behaviors, budget, canChild, canParent, compareTo, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delBlurbFlag, delEffect, delMetroRoom, delMetroRoomnumber, delProperRoom, delProperRoomnumber, delScript, delSubOp, description, description, devalueRate, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fillInAreaRoom, fillInAreaRooms, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, getArchivePath, getAreaIStats, getAreaState, getAreaStats, getAuthorID, getBlurbFlag, getCachedRoomnumbers, getChild, getChildren, getCodeNum, getCompleteMap, getCurrency, getFilledCompleteMap, getFilledProperMap, getHomePortID, getMetroCollection, getMetroMap, getMetroRoomnumbers, getNewRoomID, getOwnerName, getOwnerObject, getParent, getParents, getParentsIterator, getParentsRecurse, getParentsReverseIterator, getPlayerLevel, getPrice, getProperMap, getProperRoomnumbers, getRandomMetroRoom, getRandomProperRoom, getRoom, getSaveStatIndex, getShipArea, getShipItem, getShipItemArea, getShipItemRoom, getSubOpList, getTickStatus, getTitleID, ignoreMask, image, inMyMetroArea, invResetRate, isChild, isChild, isParent, isParent, isProperlyEmpty, isRoom, isSavable, itemPricingAdjustments, L, loadAreas, lookOverBow, maxRange, metroSize, minRange, miscTextFormat, name, Name, name, numAllBlurbFlags, numBehaviors, numberOfProperIDedRooms, numBlurbFlags, numEffects, numScripts, okMessage, phyStats, prejudiceFactors, properSize, rawImage, recoverPhyStats, removeChild, removeParent, renameShip, sameAs, scripts, setArchivePath, setAreaState, setAuthorID, setBasePhyStats, setBudget, setCurrency, setDescription, setDevalueRate, setDisplayText, setExpirationDate, setHomePortID, setIgnoreMask, setImage, setInvResetRate, setItemPricingAdjustments, setMiscText, setOwnerName, setPlayerLevel, setPrejudiceFactors, setPrice, setProperRoomnumbers, setSavable, setShipArea, setSubOpList, subOps, text, unDock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.BoardableShip
getHomePortID, getShipArea, getShipItem, renameShip, setHomePortID, setShipArea, unDock
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, isSavable, setSavable
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex
 

Field Detail

climateObj

protected static Climate climateObj

lastEngine

protected volatile ShipEngine lastEngine

lastEThrust

protected volatile double lastEThrust

mass

protected volatile int mass

spaceSource

protected SpaceObject spaceSource

localClock

protected TimeClock localClock

atmosphere

protected int atmosphere

radius

protected long radius

omlCoeff

protected double omlCoeff

nextStaleCheck

protected volatile long nextStaleCheck

nextStaleWarn

protected volatile long nextStaleWarn

staleAirList

protected java.util.Set<java.lang.String> staleAirList

gravityFloaterA

protected Ability gravityFloaterA
Constructor Detail

StdSpaceShip

public StdSpaceShip()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdBoardableShip
Returns:
the name of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject
Overrides:
initializeClass in class StdBoardableShip

getIsDocked

public Room getIsDocked()
Description copied from interface: BoardableShip
Returns the Room where this ship is docked, or NULL if in space.

Specified by:
getIsDocked in interface BoardableShip
Overrides:
getIsDocked in class StdBoardableShip
Returns:
the Room where this ship is docked, or NULL if in space.

setClimateObj

public void setClimateObj(Climate obj)
Description copied from interface: Area
Sets a reference to the Climate object that represents the current and future weather for this area.

Specified by:
setClimateObj in interface Area
Overrides:
setClimateObj in class StdBoardableShip
Parameters:
obj - a com.planet_ink.coffee_mud.Common.interfaces.Climate object
See Also:
Climate

getClimateObj

public Climate getClimateObj()
Description copied from interface: Area
Returns a reference to the Climate object that represents the current and future weather for this area.

Specified by:
getClimateObj in interface Area
Overrides:
getClimateObj in class StdBoardableShip
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.Climate object
See Also:
Climate

getOMLCoeff

public double getOMLCoeff()
Description copied from interface: SpaceShip
The Outer Mold Line coefficient -- how streamlined are you?

Specified by:
getOMLCoeff in interface SpaceShip
Returns:
the coefficient, from 0.05-0.3

setOMLCoeff

public void setOMLCoeff(double coeff)
Description copied from interface: SpaceShip
Set the Outer Mold Line coefficient -- how streamlined are you?

Specified by:
setOMLCoeff in interface SpaceShip
Parameters:
coeff - the Outer Mold Line coefficient

getTimeObj

public TimeClock getTimeObj()
Description copied from interface: Area
Returns a reference to the TimeClock object that represents the calendar and date/time for this area. May be shared by numerous areas.

Specified by:
getTimeObj in interface Area
Overrides:
getTimeObj in class StdBoardableShip
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.TimeClock object
See Also:
TimeClock

setTimeObj

public void setTimeObj(TimeClock obj)
Description copied from interface: Area
Sets a reference to the TimeClock object that represents the calendar and date/time for this area. May be shared by numerous areas.

Specified by:
setTimeObj in interface Area
Overrides:
setTimeObj in class StdBoardableShip
Parameters:
obj - a com.planet_ink.coffee_mud.Common.interfaces.TimeClock object
See Also:
TimeClock

getAtmosphereCode

public int getAtmosphereCode()
Description copied from interface: Places
Returns the resource (or -1) that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Return -1 to have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
getAtmosphereCode in interface Places
Overrides:
getAtmosphereCode in class StdBoardableShip
Returns:
the RawMaterial resource, or -1
See Also:
RawMaterial.MATERIAL_GAS

setAtmosphere

public void setAtmosphere(int resourceCode)
Description copied from interface: Places
Sets the resource (or -1) that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Return -1 to have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
setAtmosphere in interface Places
Overrides:
setAtmosphere in class StdBoardableShip
Parameters:
resourceCode - the RawMaterial resource to use
See Also:
RawMaterial.MATERIAL_GAS

getAtmosphere

public int getAtmosphere()
Description copied from interface: Places
Returns the resource that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Could have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
getAtmosphere in interface Places
Overrides:
getAtmosphere in class StdBoardableShip
Returns:
the RawMaterial resource
See Also:
RawMaterial.MATERIAL_GAS

radius

public long radius()
Description copied from interface: SpaceObject
The current radius of the object

Specified by:
radius in interface SpaceObject
Returns:
the radius, in decameters

setRadius

public void setRadius(long radius)
Description copied from interface: SpaceObject
Set the current radius of the object

Specified by:
setRadius in interface SpaceObject
Parameters:
radius - the current radius of the object

flags

public long flags()
Description copied from interface: Area
Return basic attributed flag about the area.

Specified by:
flags in interface Area
Overrides:
flags in class StdBoardableShip
Returns:
either 0, or a bitmap of FLAG_ constants
See Also:
Area.FLAG_THIN

knownSource

public SpaceObject knownSource()
Description copied from interface: SpaceObject
The source object from which this space object is travelling from

Specified by:
knownSource in interface SpaceObject
Returns:
the source of this object

setKnownSource

public void setKnownSource(SpaceObject O)
Description copied from interface: SpaceObject
Sets the source object from which this space object is travelling from

Specified by:
setKnownSource in interface SpaceObject
Parameters:
O - the source of this object

coordinates

public long[] coordinates()
Description copied from interface: SpaceObject
The current absolute coordinates of the object

Specified by:
coordinates in interface SpaceObject
Returns:
3 dimensional array of the coordinates

setCoords

public void setCoords(long[] coords)
Description copied from interface: SpaceObject
Sets the current absolute coordinates of the object

Specified by:
setCoords in interface SpaceObject
Parameters:
coords - 3 dimensional array of the coordinates in space

direction

public double[] direction()
Description copied from interface: SpaceObject
The direction of travel of this object in radians.

Specified by:
direction in interface SpaceObject
Returns:
2 dimensional array for the direction of movement

roll

public double roll()
Description copied from interface: SpaceShip
The full 360 orientation of the top of the object in radians.

Specified by:
roll in interface SpaceShip
Returns:
radian for the direction of orientation

setRoll

public void setRoll(double dir)
Description copied from interface: SpaceShip
Sets the full 360 orientation of the top of the object in radians.

Specified by:
setRoll in interface SpaceShip
Parameters:
dir - radian for the direction of orientation

setDirection

public void setDirection(double[] dir)
Description copied from interface: SpaceObject
Sets the direction of travel of this object in radians. direction[0] less than or equal to PI direction[1] less than or equal to 2PI

Specified by:
setDirection in interface SpaceObject
Parameters:
dir - 2 dimensional array for the direction of movement

facing

public double[] facing()
Description copied from interface: SpaceShip
The direction of facing of this object in radians.

Specified by:
facing in interface SpaceShip
Returns:
2 dimensional array for the direction of facing

setFacing

public void setFacing(double[] dir)
Description copied from interface: SpaceShip
Sets the direction of facing of this object in radians.

Specified by:
setFacing in interface SpaceShip
Parameters:
dir - 2 dimensional array for the direction of facing

speed

public double speed()
Description copied from interface: SpaceObject
The speed of the object through space

Specified by:
speed in interface SpaceObject
Returns:
the speed

setSpeed

public void setSpeed(double v)
Description copied from interface: SpaceObject
Sets the speed of the object through space

Specified by:
setSpeed in interface SpaceObject
Parameters:
v - the speed

knownTarget

public SpaceObject knownTarget()
Description copied from interface: SpaceObject
If this object is targeting another space object as a destination, this will return it

Specified by:
knownTarget in interface SpaceObject
Returns:
the target destination

setKnownTarget

public void setKnownTarget(SpaceObject O)
Description copied from interface: SpaceObject
If this object is targeting another space object as a destination, this will set it

Specified by:
setKnownTarget in interface SpaceObject
Parameters:
O - the target destination

setShipFlag

public void setShipFlag(SpaceShip.ShipFlag flag,
                        boolean setShipFlag)
Description copied from interface: SpaceShip
Sets one of the ship flags

Specified by:
setShipFlag in interface SpaceShip
Parameters:
flag - the flag to set or clear
setShipFlag - the flag value
See Also:
SpaceShip.ShipFlag, SpaceShip.getShipFlag(ShipFlag)

getShipFlag

public boolean getShipFlag(SpaceShip.ShipFlag flag)
Description copied from interface: SpaceShip
Gets one of the ship flags

Specified by:
getShipFlag in interface SpaceShip
Parameters:
flag - the flag to set or clear
Returns:
flagValue the flag value
See Also:
SpaceShip.ShipFlag, SpaceShip.setShipFlag(ShipFlag, boolean)

setDockableItem

public void setDockableItem(Item dockableItem)
Description copied from interface: BoardableShip
When a boardable ship area is created, it is bound to an item that resides in a room when docked, or possibly, always.

Specified by:
setDockableItem in interface BoardableShip
Overrides:
setDockableItem in class StdBoardableShip
Parameters:
dockableItem - the item that acts as dockable item

getBounds

public BoundedObject.BoundedCube getBounds()
Specified by:
getBounds in interface BoundedObject

getMass

public long getMass()
Description copied from interface: SpaceObject
Returns the mass of this object, derived from its radius and type, or perhaps from other things. Either way, its derived. The mass of space ships is what it is, but the mass of planets will be off by about 15 zeroes, as there just aren't enough bits.

Specified by:
getMass in interface SpaceObject
Returns:
the mass of this object

destroy

public void destroy()
Description copied from interface: Contingent
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Contingent
Overrides:
destroy in class StdBoardableShip

getClimateTypeCode

public int getClimateTypeCode()
Description copied from interface: Places
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.

Specified by:
getClimateTypeCode in interface Places
Overrides:
getClimateTypeCode in class StdBoardableShip
Returns:
a CLIMASK bitmap
See Also:
Places.CLIMASK_COLD

getClimateType

public int getClimateType()
Description copied from interface: Places
Returns a bitmap of the climate for this place. If the climate is CLIMASK_INHERIT, then it will look to parent objects, such as areas, and parent areas, until it eventually finds a non-inherit, or returns CLIMASK_NORMAL;

Specified by:
getClimateType in interface Places
Overrides:
getClimateType in class StdBoardableShip
Returns:
a derived climate
See Also:
Places.CLIMASK_COLD

setClimateType

public void setClimateType(int newClimateType)
Description copied from interface: Places
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.

Specified by:
setClimateType in interface Places
Overrides:
setClimateType in class StdBoardableShip
Parameters:
newClimateType - a CLIMASK bitmap
See Also:
Places.CLIMASK_COLD

setName

public void setName(java.lang.String newName)
Description copied from interface: Environmental
Sets the raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
setName in interface Environmental
Overrides:
setName in class StdBoardableShip
Parameters:
newName - the raw base name of this object on the map.
See Also:
Environmental.Name()

getTheme

public int getTheme()
Description copied from interface: Area
Returns the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag. May result in consulting parent areas to determine a theme

Specified by:
getTheme in interface Area
Overrides:
getTheme in class StdBoardableShip
Returns:
a bitmap of the themes supported by this area.
See Also:
Area.THEME_FANTASY

getThemeCode

public int getThemeCode()
Description copied from interface: Area
Returns the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag. May return THEME_INHERIT if the area inherits a theme from above.

Specified by:
getThemeCode in interface Area
Overrides:
getThemeCode in class StdBoardableShip
Returns:
a bitmap of the themes supported by this area.
See Also:
Area.THEME_FANTASY

setTheme

public void setTheme(int level)
Description copied from interface: Area
Sets the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag.

Specified by:
setTheme in interface Area
Overrides:
setTheme in class StdBoardableShip
Parameters:
level - the bitmap representing the tech level
See Also:
Area.THEME_FANTASY

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Overrides:
newInstance in class StdBoardableShip
Returns:
a new instance of this class

isGeneric

public boolean isGeneric()
Description copied from interface: Environmental
Whether the fields of this item are set in code, or set by builders. Generic means that they are set by builders, in which case XML is returned by the text() method containing all of the values for all the fields.

Specified by:
isGeneric in interface Environmental
Overrides:
isGeneric in class StdBoardableShip
Returns:
whether this item is modifiable by builders
See Also:
Environmental.text()

cloneFix

protected void cloneFix(StdBoardableShip ship)
Overrides:
cloneFix in class StdBoardableShip

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Overrides:
copyOf in class StdBoardableShip
Returns:
a clone of this object

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdBoardableShip
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

addMaskAndReturn

public int[] addMaskAndReturn(int[] one,
                              int[] two)

changeRoomAir

protected boolean changeRoomAir(Room R,
                                Room notifyRoom,
                                int atmoResource)

moveAtmosphereOut

protected void moveAtmosphereOut(java.util.Set<Room> doneRooms,
                                 Room startRoom,
                                 int atmo)

doStaleCheck

protected void doStaleCheck()

getGravityFloat

protected Ability getGravityFloat()

doGravityChanges

protected void doGravityChanges()

doAtmosphereChanges

protected void doAtmosphereChanges()

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Overrides:
tick in class StdBoardableShip
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

dockHere

public void dockHere(Room roomR)
Description copied from interface: BoardableShip
Designates that this ship is landed and docked in the given planetary room.

Specified by:
dockHere in interface BoardableShip
Overrides:
dockHere in class StdBoardableShip
Parameters:
roomR - the coordinate toom in which the ship is docked.

getShipSpaceObject

public SpaceObject getShipSpaceObject()
Description copied from interface: SpaceShip
Space ships are unique in having an Item stand-in for planet-side access, as well as an Area object. This method returns the object that resides in the official space grid.

Specified by:
getShipSpaceObject in interface SpaceShip
Returns:
the official space version of this ship

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Overrides:
getStatCodes in class StdBoardableShip
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Overrides:
isStat in class StdBoardableShip
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Overrides:
getStat in class StdBoardableShip
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Overrides:
setStat in class StdBoardableShip
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()