Affectable
, Behavable
, BoundedObject
, CloseableLockable
, CMObject
, Contingent
, DBIdentifiable
, Environmental
, Expireable
, Modifiable
, MsgListener
, Physical
, PhysicalAgent
, PrivateProperty
, Readable
, Rideable
, Rider
, SpaceObject
, StatsAffecting
, Tickable
, Exit
, Boardable
, Container
, Electronics
, Item
, SpaceShip
, Technical
, Wearable
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class GenSpaceShip extends GenBoardable implements Electronics, SpaceShip
BoundedObject.BoundedCube
Rideable.Basis
SpaceObject.Distance, SpaceObject.SpaceGateway
SpaceShip.ShipFlag
Technical.TechCommand, Technical.TechType
Wearable.CODES
Modifier and Type | Field | Description |
---|---|---|
protected Manufacturer |
cachedManufact |
|
long[] |
coordinates |
|
double[] |
direction |
|
protected java.util.Map<Technical.TechCommand,java.util.List<MsgListener>> |
extListeners |
|
protected double[] |
facing |
|
protected java.lang.String |
manufacturer |
|
double |
roll |
|
protected java.util.List<TechComponent> |
sensors |
|
protected java.util.Set<SpaceShip.ShipFlag> |
shipFlags |
|
protected SpaceObject |
spaceTarget |
|
double |
speed |
|
protected double |
speedTick |
NAME_REPL_MARKERS, NAME_REPL_STRINGS
idConverter
CONTAIN_ANYTHING, CONTAIN_BODIES, CONTAIN_CAGED, CONTAIN_CLOTHES, CONTAIN_COINS, CONTAIN_DAGGERS, CONTAIN_DESCS, CONTAIN_DRINKABLES, CONTAIN_EATABLES, CONTAIN_FOOTWEAR, CONTAIN_KEYS, CONTAIN_LIQUID, CONTAIN_ONEHANDWEAPONS, CONTAIN_OTHERWEAPONS, CONTAIN_RAWMATERIALS, CONTAIN_READABLES, CONTAIN_SCROLLS, CONTAIN_SHIELDS, CONTAIN_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDS
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
area, head_offTheDeck, homePortID, internalPrice, noun_word, ownerName, price, readableText
capacity, containType, defaultsClosed, defaultsLocked, hasALid, hasALock, isLocked, isOpen, openDelayTicks
_name, affectPhyStats, affects, baseGoldValue, basePhyStats, behaviors, cachedImageName, CODES, databaseID, description, destroyed, displayText, dispossessionTime, material, me, miscText, myContainer, myUses, myWornCode, owner, phyStats, properWornBitmap, rawImageName, riding, scripts, secretIdentity, tickCtr, tickStatus, wornLogicalAnd, xtraValues
closedText, dismountString, doorName, mountString, putString, rideString, stateString, stateSubjectStr, tempExitPairs
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 | Description |
---|---|
GenSpaceShip() |
Modifier and Type | Method | Description |
---|---|---|
void |
activate(boolean truefalse) |
Sets whether this electrical item is "turned on".
|
boolean |
activated() |
Gets whether this electrical item is "turned on".
|
long[] |
coordinates() |
The current absolute coordinates of the object
|
protected Room |
createFirstRoom() |
|
double[] |
direction() |
The direction of travel of this object in radians.
|
void |
dockHere(Room R) |
Designates that this ship is landed and docked in the given
planetary room.
|
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.
|
protected LocationRoom |
findNearestDocks(Room R) |
|
java.lang.String |
genericName() |
Returns a generic name for this object, devoid of its particular
identifying details.
|
Area |
getArea() |
Ships are unique in having an Item stand-in for dirt-side access,
as well as an Area object.
|
protected java.lang.String |
getAreaClassType() |
|
BoundedObject.BoundedCube |
getBounds() |
|
protected java.lang.String |
getElectronicsKey() |
|
Manufacturer |
getFinalManufacturer() |
Returns the Manufacturer object of the manufacturer that
made this electrical item.
|
java.lang.String |
getManufacturerName() |
Gets the Manufacturer ID/Name that made this electrical
item.
|
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
|
protected java.util.List<TechComponent> |
getShipSensors() |
|
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.
|
Technical.TechType |
getTechType() |
Returns the tech type enum for this technical object, which describes more
about its functionality, and is in fact a kind of class proxy.
|
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
|
boolean |
okMessage(Environmental myHost,
CMMsg msg) |
The general message event previewer for the object.
|
long |
powerCapacity() |
Gets the maximum amount of capacitance supported by
this electrical item.
|
int |
powerNeeds() |
Returns the immediate power needs of this electrical item.
|
long |
powerRemaining() |
Gets the amount of power capacitance remaining in this
electrical item.
|
long |
powerTarget() |
Gets the amount of power capacitance to allow this
electrical item to charge up to.
|
long |
radius() |
The current radius of the object
|
void |
recoverPhyStats() |
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to
all surrounding objects with affectPhyStats(Environmental,PhyStats) method.
|
void |
registerListener(Technical.TechCommand command,
MsgListener listener) |
Register a global ship listener.
|
void |
rename(java.lang.String newName) |
Renames the boardable to something else
|
double |
roll() |
The full 360 orientation of the top of the object in radians.
|
boolean |
sameAs(Environmental E) |
Whether this object instance is functionally identical to the object passed in.
|
protected void |
sendComputerMessage(MOB mob,
CMMsg msg) |
|
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 |
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 |
setManufacturerName(java.lang.String name) |
Sets the Manufacturer ID/Name that made this electrical
item.
|
void |
setOMLCoeff(double coeff) |
Set the Outer Mold Line coefficient -- how streamlined are you?
|
void |
setPowerCapacity(long capacity) |
Sets the maximum amount of capacitance supported by
this electrical item.
|
void |
setPowerRemaining(long remaining) |
Sets the amount of power capacitance remaining in this
electrical item.
|
void |
setPowerTarget(long capacity) |
Sets the amount of power capacitance to allow this
electrical item to charge up to.
|
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 setFlag) |
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 |
setTechLevel(int lvl) |
One of the most important methods in the tech game, this denotes
the level of technology of the specific instance of this item.
|
double |
speed() |
The speed of the object through space
|
protected void |
stopThisShip(MOB mob) |
|
int |
techLevel() |
One of the most important methods in the tech game, this denotes
the level of technology of the specific instance of this item.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
Room |
unDock(boolean moveToOutside) |
Designates that this ship is no longer docked, and whether it
should also be moved into its na
|
void |
unregisterListener(Technical.TechCommand command,
MsgListener listener) |
Register a global ship listener.
|
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
getBoardableItem, getHomePortID, getIsDocked, securityCheck, setArea, setDockableItem, setHomePortID
hasALock, isLocked, isOpen
copyOf, initializeClass, newInstance
canSaveDatabaseID, databaseID, setDatabaseID
isGeneric, isLocalStatCode
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isReadable, readableText, setReadable, setReadableText
abilityImbuesMagic, announceToAllAboard, announceToNonOuterViewers, announceToOuterViewers, announceToOuterViewers, announceToOuterViewers, announceToOuterViewers, canViewOuterRoom, cleanMsgForRepeat, confirmAreaMessage, copyOf, destroy, destroyThisBoardable, dismountString, expirationDate, getBoardableItem, getDestinationRoom, getHomePortID, getIsDocked, getOwnerName, getPrice, getRandomOutsideRoom, getTitleID, haveEveryoneLookOutside, isProperlyOwned, isSavable, keyName, mountString, newInstance, okAreaMessage, putString, readableText, renameDestinationRooms, securityCheck, sendAreaMessage, sendAreaMessage, setArea, setDatabaseID, setDockableItem, setExpirationDate, setHomePortID, setKeyName, setMiscText, setOwnerName, setPrice, setReadableText, stopTicking, subjectToWearAndTear, text, transferOwnership, value
canContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasALock, hasContent, isInside, isLocked, isOpen, numberOfItems, recursiveWeight, setCapacity, setContainTypes
addBehavior, addEffect, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectPhyStats, alreadyWornMsg, amBeingWornProperly, amDestroyed, amWearingAt, baseGoldValue, basePhyStats, behaviors, canSaveDatabaseID, canWear, canWearComplete, cloneFix, compareProperLocations, compareTo, container, databaseID, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delEffect, delScript, description, description, displayText, eachBehavior, eachEffect, eachScript, effects, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getSaveStatIndex, getTickStatus, I, image, initializeClass, isStat, L, material, maxRange, minRange, miscTextFormat, name, name, Name, numBehaviors, numEffects, numScripts, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, removeFromOwnerContainer, riding, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDescription, setDisplayText, setImage, setMaterial, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setRiding, setSavable, setSecretIdentity, setUsesRemaining, tackOns, ultimateContainer, unWear, usesRemaining, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
addRider, amRiding, closedText, closeWord, defaultsClosed, defaultsLocked, delRider, displayText, doorName, exitUsage, fetchRider, getDismountString, getMountString, getPutString, getRideBuddies, getRideString, getStateString, getStateStringSubject, getTemporaryExits, hasADoor, isMobileRideBasis, isReadable, lastRoomUsedFrom, mobileRideBasis, numRiders, openDelayTicks, openWord, rideBasis, riderCapacity, riders, rideString, setDismountString, setDoorsNLocks, setExitParams, setMountString, setOpenDelayTicks, setPutString, setReadable, setRideBasis, setRiderCapacity, setRideString, setStateString, setStateStringSubject, setTemporaryDoorLink, stateString, stateStringSubject, temporaryDoorLink, viewableText
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear
protected Manufacturer cachedManufact
protected java.lang.String manufacturer
public long[] coordinates
public double[] direction
public double roll
public double speed
protected SpaceObject spaceTarget
protected double[] facing
protected java.util.Set<SpaceShip.ShipFlag> shipFlags
protected volatile double speedTick
protected volatile java.util.List<TechComponent> sensors
protected java.util.Map<Technical.TechCommand,java.util.List<MsgListener>> extListeners
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class GenBoardable
public java.lang.String genericName()
Physical
genericName
in interface Physical
genericName
in class GenBoardable
public void recoverPhyStats()
Affectable
recoverPhyStats
in interface Affectable
recoverPhyStats
in class StdPortal
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.addEffect(Ability)
,
Behavable.addBehavior(Behavior)
,
PhyStats
protected java.lang.String getAreaClassType()
getAreaClassType
in class StdBoardable
protected java.util.List<TechComponent> getShipSensors()
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdBoardable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
protected Room createFirstRoom()
createFirstRoom
in class StdBoardable
public Area getArea()
Boardable
getArea
in interface Boardable
getArea
in class StdBoardable
public void dockHere(Room R)
Boardable
dockHere
in interface Boardable
dockHere
in class StdBoardable
R
- the coordinate toom in which the ship is docked.public Room unDock(boolean moveToOutside)
Boardable
unDock
in interface Boardable
unDock
in class StdBoardable
moveToOutside
- true to put in space/ocean, or false to leave in limboprotected java.lang.String getElectronicsKey()
public void rename(java.lang.String newName)
Boardable
rename
in interface Boardable
rename
in class StdBoardable
newName
- the new namepublic boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdBoardable
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executedCMMsg
,
CMMsg.source()
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdBoardable
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
protected LocationRoom findNearestDocks(Room R)
findNearestDocks
in class StdBoardable
protected void stopThisShip(MOB mob)
public BoundedObject.BoundedCube getBounds()
getBounds
in interface BoundedObject
public long powerCapacity()
Electronics
powerCapacity
in interface Electronics
Electronics.setPowerCapacity(long)
public void setPowerCapacity(long capacity)
Electronics
setPowerCapacity
in interface Electronics
capacity
- the maximum amount of stored power capacityElectronics.powerCapacity()
public long powerTarget()
Electronics
powerTarget
in interface Electronics
Electronics.setPowerTarget(long)
public void setPowerTarget(long capacity)
Electronics
setPowerTarget
in interface Electronics
capacity
- the amount of power capacitance remainingElectronics.powerTarget()
public long powerRemaining()
Electronics
powerRemaining
in interface Electronics
Electronics.setPowerRemaining(long)
public int powerNeeds()
Electronics
powerNeeds
in interface Electronics
Electronics.powerRemaining()
,
Electronics.powerCapacity()
public void setPowerRemaining(long remaining)
Electronics
setPowerRemaining
in interface Electronics
remaining
- the amount of power capacitance remainingElectronics.powerRemaining()
public void activate(boolean truefalse)
Electronics
activate
in interface Electronics
truefalse
- true to activate, false to deactivateElectronics.activated()
public Technical.TechType getTechType()
Technical
getTechType
in interface Technical
Technical.TechType
public void setShipFlag(SpaceShip.ShipFlag flag, boolean setFlag)
SpaceShip
setShipFlag
in interface SpaceShip
flag
- the flag to set or clearsetFlag
- 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 SpaceObject getShipSpaceObject()
SpaceShip
getShipSpaceObject
in interface SpaceShip
public boolean activated()
Electronics
activated
in interface Electronics
Electronics.activate(boolean)
public int techLevel()
Technical
techLevel
in interface Technical
TechLibrary.getGlobalTechLevel()
,
Technical.setTechLevel(int)
public void setTechLevel(int lvl)
Technical
setTechLevel
in interface Technical
lvl
- the absolute tech level of this itemTechLibrary.getGlobalTechLevel()
,
Technical.techLevel()
public java.lang.String getManufacturerName()
Technical
getManufacturerName
in interface Technical
Technical.setManufacturerName(String)
,
Manufacturer
public void setManufacturerName(java.lang.String name)
Technical
setManufacturerName
in interface Technical
name
- the Manufacturer ID/Name that made thisTechnical.getManufacturerName()
,
Technical.getFinalManufacturer()
,
Manufacturer
public long getMass()
SpaceObject
getMass
in interface SpaceObject
public Manufacturer getFinalManufacturer()
Technical
getFinalManufacturer
in interface Technical
Technical.getManufacturerName()
,
Technical.setManufacturerName(String)
,
Manufacturer
public long[] coordinates()
SpaceObject
coordinates
in interface SpaceObject
public double[] direction()
SpaceObject
direction
in interface SpaceObject
public double roll()
SpaceShip
public void setRoll(double dir)
SpaceShip
public double[] facing()
SpaceShip
public void setFacing(double[] dir)
SpaceShip
public SpaceObject knownTarget()
SpaceObject
knownTarget
in interface SpaceObject
public void setKnownTarget(SpaceObject O)
SpaceObject
setKnownTarget
in interface SpaceObject
O
- the target destinationpublic void setCoords(long[] coords)
SpaceObject
setCoords
in interface SpaceObject
coords
- 3 dimensional array of the coordinates in spacepublic void setDirection(double[] dir)
SpaceObject
setDirection
in interface SpaceObject
dir
- 2 dimensional array for the direction of movementpublic double speed()
SpaceObject
speed
in interface SpaceObject
public void setSpeed(double v)
SpaceObject
setSpeed
in interface SpaceObject
v
- the speedpublic SpaceObject knownSource()
SpaceObject
knownSource
in interface SpaceObject
public void setKnownSource(SpaceObject O)
SpaceObject
setKnownSource
in interface SpaceObject
O
- the source of this objectpublic long radius()
SpaceObject
radius
in interface SpaceObject
public void setRadius(long radius)
SpaceObject
setRadius
in interface SpaceObject
radius
- the current radius of the objectpublic double getOMLCoeff()
SpaceShip
getOMLCoeff
in interface SpaceShip
public void setOMLCoeff(double coeff)
SpaceShip
setOMLCoeff
in interface SpaceShip
coeff
- the Outer Mold Line coefficientpublic 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 java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
getStatCodes
in class GenBoardable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
getStat
in class GenBoardable
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 GenBoardable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public boolean sameAs(Environmental E)
Environmental
sameAs
in interface Environmental
sameAs
in class GenBoardable
E
- the object to compare this one toModifiable.getStatCodes()
,
Modifiable.getStat(String)