com.planet_ink.coffee_mud.Items.Basic
Class StdSpaceBody

java.lang.Object
  extended by com.planet_ink.coffee_mud.Items.Basic.StdItem
      extended by com.planet_ink.coffee_mud.Items.Basic.StdSpaceBody
All Implemented Interfaces:
Affectable, Behavable, BoundedObject, CMObject, Contingent, DBIdentifiable, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rider, SpaceObject, StatsAffecting, Tickable, Item, Wearable, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenSpaceBody

public class StdSpaceBody
extends StdItem
implements SpaceObject


Nested Class Summary
 
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.Items.interfaces.Wearable
Wearable.CODES
 
Field Summary
protected  long[] coordinates
           
protected  double[] direction
           
protected  long radius
           
protected  SpaceObject spaceSource
           
protected  SpaceObject spaceTarget
           
protected  double speed
           
 
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, name, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, 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.Items.interfaces.Wearable
DEFAULT_WORN_CODES, DEFAULT_WORN_DEPENDENCYGRID, DEFAULT_WORN_DESCS, DEFAULT_WORN_ORDER, DEFAULT_WORN_USUAL_NAMES, DEFAULT_WORN_WEIGHT_POINTS, DEFAULT_WORN_WEIGHTS, FILTER_ANY, FILTER_MOBINVONLY, FILTER_ROOMONLY, FILTER_UNWORNONLY, FILTER_WORNONLY, HIGHEST_WORN_CODE, IN_INVENTORY, WORN_ABOUT_BODY, WORN_ARMS, WORN_BACK, WORN_EARS, WORN_EYES, WORN_FEET, WORN_FLOATING_NEARBY, WORN_HANDS, WORN_HEAD, WORN_HELD, WORN_LEFT_FINGER, WORN_LEFT_WRIST, WORN_LEGS, WORN_MOUTH, WORN_NECK, WORN_RIGHT_FINGER, WORN_RIGHT_WRIST, WORN_TORSO, WORN_WAIST, WORN_WIELD
 
Constructor Summary
StdSpaceBody()
           
 
Method Summary
 long[] coordinates()
          The current absolute coordinates of the object
 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.
 BoundedObject.BoundedCube getBounds()
           
 long getMass()
          Returns the mass of this object, derived from its radius and type, or perhaps from other things.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 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
 long radius()
          The current radius of the object
 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 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 setRadius(long radius)
          Set the current radius of the object
 void setSpeed(double v)
          Sets the speed of the object through space
 double speed()
          The speed of the object through space
 
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdItem
abilityImbuesMagic, addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectPhyStats, alreadyWornMsg, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, canWearComplete, cloneFix, compareProperLocations, compareTo, container, copyOf, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, executeMsg, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getCodeNum, getSaveStatIndex, getStat, getStatCodes, getTickStatus, I, image, initializeClass, isGeneric, isReadable, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, Name, name, newInstance, numBehaviors, numberOfItems, numEffects, numScripts, okMessage, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, recoverPhyStats, recursiveWeight, removeFromOwnerContainer, riding, sameAs, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setMiscText, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadable, setReadableText, setRiding, setSavable, setSecretIdentity, setStat, setUsesRemaining, stopTicking, subjectToWearAndTear, tackOns, text, tick, ultimateContainer, unWear, usesRemaining, value, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
 
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.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
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
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

coordinates

protected long[] coordinates

radius

protected long radius

direction

protected double[] direction

speed

protected double speed

spaceSource

protected SpaceObject spaceSource

spaceTarget

protected SpaceObject spaceTarget
Constructor Detail

StdSpaceBody

public StdSpaceBody()
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 StdItem
Returns:
the name of this class

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 StdItem

getBounds

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

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

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

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

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

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

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

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