|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.Items.Basic.StdItem
com.planet_ink.coffee_mud.Items.Basic.StdContainer
com.planet_ink.coffee_mud.Items.Basic.StdPortal
com.planet_ink.coffee_mud.Items.Basic.StdBoardable
com.planet_ink.coffee_mud.Items.BasicTech.GenSpaceShip
public class GenSpaceShip
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Technical |
---|
Technical.TechCommand, Technical.TechType |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
Wearable.CODES |
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 |
Field Summary | |
---|---|
protected Manufacturer |
cachedManufact
|
long[] |
coordinates
|
double[] |
direction
|
protected double[] |
facing
|
protected java.lang.String |
manufacturer
|
double |
roll
|
protected java.util.Set<SpaceShip.ShipFlag> |
shipFlags
|
protected SpaceObject |
spaceTarget
|
double |
speed
|
protected double |
speedTick
|
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdBoardable |
---|
area, homePortID, internalPrice, ownerName, price, readableText |
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdPortal |
---|
closedText, dismountString, doorName, mountString, putString, rideString, stateString, stateSubjectStr |
Fields inherited from class com.planet_ink.coffee_mud.Items.Basic.StdContainer |
---|
capacity, containType, defaultsClosed, defaultsLocked, hasALid, hasALock, isLocked, isOpen, openDelayTicks |
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.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 |
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Rideable |
---|
RIDEABLE_AIR, RIDEABLE_DESCS, RIDEABLE_ENTERIN, RIDEABLE_LADDER, RIDEABLE_LAND, RIDEABLE_SIT, RIDEABLE_SLEEP, RIDEABLE_TABLE, RIDEABLE_WAGON, RIDEABLE_WATER |
Fields inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Container |
---|
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_SMOKEABLES, CONTAIN_SSCOMPONENTS, CONTAIN_SWORDS |
Constructor Summary | |
---|---|
GenSpaceShip()
|
Method Summary | |
---|---|
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)
|
protected java.lang.String |
getAreaClassType()
|
BoundedObject.BoundedCube |
getBounds()
|
protected int |
getCodeNum(java.lang.String code)
|
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? |
Area |
getShipArea()
Space ships are unique in having an Item stand-in for dirt-side access, as well as an Area object. |
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. |
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. |
boolean |
isGeneric()
Whether the fields of this item are set in code, or set 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 |
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 |
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 |
renameShip(java.lang.String newName)
Renames the ship 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 |
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 |
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdBoardable |
---|
announceToShip, confirmAreaMessage, copyOf, destroy, destroyThisShip, dismountString, expirationDate, getDestinationRoom, getHomePortID, getIsDocked, getOwnerName, getOwnerObject, getPrice, getShipItem, getTitleID, isSavable, keyName, mountString, newInstance, okAreaMessage, putString, readableText, renameDestinationRooms, securityCheck, sendAreaMessage, setDatabaseID, setDockableItem, setExpirationDate, setHomePortID, setKeyName, setMiscText, setOwnerName, setPrice, setReadableText, setShipArea, stopTicking, subjectToWearAndTear, text, transferOwnership, value |
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdPortal |
---|
addRider, amRiding, closedText, closeWord, defaultsClosed, defaultsLocked, delRider, displayText, doorName, exitUsage, fetchRider, getDismountString, getMountString, getPutString, getRideBuddies, getRideString, getStateString, getStateStringSubject, 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 |
Methods inherited from class com.planet_ink.coffee_mud.Items.Basic.StdContainer |
---|
canContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasALock, hasContent, isInside, isLocked, isOpen, numberOfItems, recursiveWeight, setCapacity, setContainTypes |
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.Item |
---|
baseGoldValue, container, material, numberOfItems, owner, rawSecretIdentity, recursiveWeight, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Rider |
---|
riding, setRiding |
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.DBIdentifiable |
---|
canSaveDatabaseID, databaseID, setDatabaseID |
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable |
---|
amBeingWornProperly, amWearingAt, canWear, compareProperLocations, fitsOn, rawLogicalAnd, rawProperLocationBitmap, rawWornCode, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, unWear, wearAt, wearEvenIfImpossible, wearIfPossible, wearIfPossible, whereCantWear |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Readable |
---|
isReadable, readableText, setReadable, setReadableText |
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.BoardableShip |
---|
getHomePortID, getIsDocked, getShipItem, setDockableItem, setHomePortID, setShipArea |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CloseableLockable |
---|
hasALock, isLocked, isOpen |
Field Detail |
---|
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
Constructor Detail |
---|
public GenSpaceShip()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdBoardable
public boolean isGeneric()
Environmental
isGeneric
in interface Environmental
isGeneric
in class StdItem
Environmental.text()
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
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 Tickable
Tickable
,
ServiceEngine
,
TickableGroup
protected Room createFirstRoom()
createFirstRoom
in class StdBoardable
public Area getShipArea()
BoardableShip
getShipArea
in interface BoardableShip
getShipArea
in class StdBoardable
public void dockHere(Room R)
BoardableShip
dockHere
in interface BoardableShip
dockHere
in class StdBoardable
R
- the coordinate toom in which the ship is docked.public Room unDock(boolean moveToOutside)
BoardableShip
unDock
in interface BoardableShip
unDock
in class StdBoardable
moveToOutside
- true to put in space/ocean, or false to leave in limbo
public void renameShip(java.lang.String newName)
BoardableShip
renameShip
in interface BoardableShip
renameShip
in class StdBoardable
newName
- the new ship 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 executed
CMMsg
,
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 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()
protected void sendComputerMessage(MOB mob, CMMsg msg)
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 clear
SpaceShip.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()
Electronics
getManufacturerName
in interface Electronics
Electronics.setManufacturerName(String)
,
Manufacturer
public void setManufacturerName(java.lang.String name)
Electronics
setManufacturerName
in interface Electronics
name
- the Manufacturer ID/Name that made thisElectronics.getManufacturerName()
,
Electronics.getFinalManufacturer()
,
Manufacturer
public long getMass()
SpaceObject
getMass
in interface SpaceObject
public Manufacturer getFinalManufacturer()
Electronics
getFinalManufacturer
in interface Electronics
Electronics.getManufacturerName()
,
Electronics.setManufacturerName(String)
,
Manufacturer
public long[] coordinates()
SpaceObject
coordinates
in interface SpaceObject
public double[] direction()
SpaceObject
direction
in interface SpaceObject
public double roll()
SpaceShip
roll
in interface SpaceShip
public void setRoll(double dir)
SpaceShip
setRoll
in interface SpaceShip
dir
- radian for the direction of orientationpublic double[] facing()
SpaceShip
facing
in interface SpaceShip
public void setFacing(double[] dir)
SpaceShip
setFacing
in interface SpaceShip
dir
- 2 dimensional array for the direction of facingpublic 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 java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
getStat
in class StdItem
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 StdItem
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
protected int getCodeNum(java.lang.String code)
getCodeNum
in class StdItem
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
getStatCodes
in class StdItem
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean sameAs(Environmental E)
Environmental
sameAs
in interface Environmental
sameAs
in class StdItem
E
- the object to compare this one to
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |