|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Exits.StdExit
public class StdExit
| Field Summary | |
|---|---|
protected java.util.Vector |
affects
|
protected boolean |
amDestroyed
|
protected EnvStats |
baseEnvStats
|
protected java.util.Vector |
behaviors
|
protected EnvStats |
envStats
|
protected java.lang.String |
imageName
|
protected boolean |
isLocked
|
protected boolean |
isOpen
|
protected java.lang.String |
miscText
|
protected java.util.Vector |
scripts
|
protected short |
usage
|
| Constructor Summary | |
|---|---|
StdExit()
|
|
| Method Summary | |
|---|---|
void |
addBehavior(Behavior to)
Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc. |
void |
addEffect(Ability to)
Add a new effect to this object, whether permanent or temporary. |
void |
addNonUninvokableEffect(Ability to)
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. |
void |
addScript(ScriptingEngine S)
Manipulation of the scripts list |
void |
affectCharState(MOB affectedMob,
CharState affectableMaxState)
This method is called by the recoverCharState() method on other MOB objects. |
void |
affectCharStats(MOB affectedMob,
CharStats affectableStats)
This method is called by the recoverCharStats() method on other MOB objects. |
void |
affectEnvStats(Environmental affected,
EnvStats affectableStats)
This method is called by the recoverEnvStats() method on other Environmental objects. |
boolean |
amDestroyed()
Whether the destroy() method has been previousy called on this object. |
EnvStats |
baseEnvStats()
Object containing a set of base, unmodified, mostly numeric fields. |
protected void |
cloneFix(Exit E)
|
java.lang.String |
closedText()
Returns a text description of what this exit looks like when closed. |
java.lang.String |
closeWord()
Returns the verb used for describing closing this exit, e.g. |
protected java.lang.String |
closeWordPastTense()
|
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
boolean |
defaultsClosed()
For exits with a door, this returns whether the door defaults in a closed state. |
boolean |
defaultsLocked()
For exits with a door and lock, this returns whether the door defaults in a closed and locked state. |
void |
delBehavior(Behavior to)
Delete a behavior from this object. |
void |
delEffect(Ability to)
Delete an effect from this object, whether permanent or temporary. |
void |
delScript(ScriptingEngine S)
Remove a running script from this object. |
java.lang.String |
description()
The basic description of this object, as shown when the item is directly LOOKed at. |
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. |
java.lang.String |
displayText()
Gets the raw string used to show what this object looks like in the room. |
java.lang.String |
doorName()
Returns the short name of this door, e.g. |
EnvStats |
envStats()
Object containing a set of current, modified, usable, mostly numeric fields. |
void |
executeMsg(Environmental myHost,
CMMsg msg)
The general message event handler for the object. |
short |
exitUsage(short change)
Both reads and optionally modifies an internal reference counter for this exit. |
long |
expirationDate()
If this object expires, it should have a timestamp saying when it expires, in real time. |
Behavior |
fetchBehavior(int index)
Returns a behavior object on this object. |
Behavior |
fetchBehavior(java.lang.String ID)
Returns a behavior object listed on this object. |
Ability |
fetchEffect(int index)
Returns an ability object listed as an effect on this object. |
Ability |
fetchEffect(java.lang.String ID)
Returns an ability object listed as an effect on this object. |
ScriptingEngine |
fetchScript(int x)
Retreive one of the enumerated scripts running on this object |
protected void |
finalize()
|
protected Rideable |
findALadder(MOB mob,
Room room)
|
protected int |
getCodeNum(java.lang.String code)
|
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
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. |
long |
getTickStatus()
A coded status for this object during the period where its tick method is being called. |
boolean |
hasADoor()
Returns whether this exit has a door, and must be opened before being used. |
boolean |
hasALock()
Returns whether this exit has a lock on its door, and, if locked, must be unlocked before being used. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
java.lang.String |
image()
Returns the fully qualified and determined name of the image file displayed for this object when MXP is used. |
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 |
isLocked()
Returns whether this exit is LOCKED, and must be unlocked before being used. |
boolean |
isOpen()
Returns whether this exit is OPEN and may be travelled through |
boolean |
isReadable()
Returns whether this exit is readable when the player uses the READ command and targets it. |
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. |
java.lang.String |
keyName()
For Exits with doors and locks, this returns the unique string representing the key code required to unlock/lock the door. |
int |
maxRange()
the maximum range of this object, if applicable. |
int |
minRange()
the minimum range of this object, if applicable. |
java.lang.String |
miscTextFormat()
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. |
protected void |
mountLadder(MOB mob,
Rideable ladder)
|
java.lang.String |
name()
The displayable name of this object. |
java.lang.String |
Name()
The raw unmodified name of this object as stored in the database. |
CMObject |
newInstance()
Returns a new instance of this class. |
int |
numBehaviors()
The number of behaviors this object has. |
int |
numEffects()
Returns the number of ability objects listed as effects on this object. |
int |
numScripts()
Return the number of scripts running on this object |
boolean |
okMessage(Environmental myHost,
CMMsg msg)
The general message event previewer for the object. |
int |
openDelayTicks()
Returns the number of ticks that this exit remains open when a mob or player changes it from a closed to an open state, and the door defaults in a closed state. |
java.lang.String |
openWord()
Returns the verb used for describing opening this exit, e.g. |
protected java.lang.String |
openWordPastTense()
|
java.lang.String |
rawImage()
Returns the raw name of the image file to display for this object when MXP is used. |
java.lang.String |
readableText()
For Exits that are readable, this returns the readable string for this exit. |
void |
recoverEnvStats()
This method copies the baseEnvStats() object into the envStats() object, then makes repeated calls to all surrounding objects with affectEnvStats(Environmental,EnvStats) method. |
boolean |
sameAs(Environmental E)
Whether this object instance is functionally identical to the object passed in. |
boolean |
savable()
Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container. |
void |
setBaseEnvStats(EnvStats newBaseEnvStats)
Re-sets the object containing a set of base, unmodified, mostly numeric fields. |
void |
setDescription(java.lang.String newDescription)
Sets the basic description of this object, as shown when the item is directly LOOKed at. |
void |
setDisplayText(java.lang.String newDisplayText)
Sets the raw string used to show what this object looks like in the room. |
void |
setDoorsNLocks(boolean newHasADoor,
boolean newIsOpen,
boolean newDefaultsClosed,
boolean newHasALock,
boolean newIsLocked,
boolean newDefaultsLocked)
Modifies the various door/lock settings for this exit. |
void |
setExitParams(java.lang.String newDoorName,
java.lang.String newCloseWord,
java.lang.String newOpenWord,
java.lang.String newClosedText)
Sets various word descriptions used when doing some dynamic manipulations of this exit. |
void |
setExpirationDate(long time)
If this object expires, it should have a timestamp saying when it expires, in real time. |
void |
setImage(java.lang.String newImage)
Sets the raw name of the image file to display for this object when MXP is used. |
void |
setKeyName(java.lang.String newKeyName)
For Exits with doors and locks, this sets the unique string representing the key code required to unlock/lock the door. |
void |
setMiscText(java.lang.String newMiscText)
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. |
void |
setName(java.lang.String newName)
Sets the raw unmodified name of this object as stored in the database. |
void |
setOpenDelayTicks(int numTicks)
Sets the number of ticks that this exit will remain open when a mob or player changes it from a closed to an open state, and the door defaults in a closed state. |
void |
setReadable(boolean isTrue)
Returns whether this exit is readable when the player uses the READ command and targets it. |
void |
setReadableText(java.lang.String text)
For Exits that are readable, this set the readable string for this exit. |
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 |
setTemporaryDoorLink(java.lang.String link)
If this exit represents a route to a room not yet created, but whose room id is already known, this will set that designated room id. |
java.lang.String |
temporaryDoorLink()
If this exit represents a route to a room not yet created, but whose room id is already known, this will return that designated room id. |
java.lang.String |
text()
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. |
boolean |
tick(Tickable ticking,
int tickID)
this is the method which is called periodically by the threading engine. |
java.lang.StringBuffer |
viewableText(MOB mob,
Room room)
Returns the modified and qualified player-viewed description of this exit. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EnvStats envStats
protected EnvStats baseEnvStats
protected boolean isOpen
protected boolean isLocked
protected java.lang.String miscText
protected java.lang.String imageName
protected java.util.Vector affects
protected java.util.Vector behaviors
protected java.util.Vector scripts
protected boolean amDestroyed
protected short usage
| Constructor Detail |
|---|
public StdExit()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectprotected void finalize()
finalize in class java.lang.Objectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic java.lang.String Name()
Environmental
Name in interface EnvironmentalEnvironmental.name()public boolean hasADoor()
Exit
hasADoor in interface ExitExit.isOpen(),
Exit.isLocked()public boolean hasALock()
Exit
hasALock in interface ExitExit.isOpen(),
Exit.isLocked(),
Exit.hasADoor()public boolean defaultsLocked()
Exit
defaultsLocked in interface ExitExit.hasADoor(),
Exit.defaultsClosed()public boolean defaultsClosed()
Exit
defaultsClosed in interface ExitExit.hasADoor(),
Exit.defaultsLocked()public java.lang.String displayText()
Environmental
displayText in interface Environmentalpublic java.lang.String description()
Environmental
description in interface Environmentalpublic java.lang.String doorName()
Exit
doorName in interface ExitExit.setExitParams(String, String, String, String)public java.lang.String closedText()
Exit
closedText in interface ExitExit.hasADoor(),
Exit.defaultsClosed()public java.lang.String closeWord()
Exit
closeWord in interface ExitExit.openWord(),
Exit.hasADoor(),
Exit.defaultsClosed(),
Exit.setExitParams(String, String, String, String)public java.lang.String openWord()
Exit
openWord in interface ExitExit.closeWord(),
Exit.hasADoor(),
Exit.defaultsClosed(),
Exit.setExitParams(String, String, String, String)public long getTickStatus()
Tickable
getTickStatus in interface TickableTickable.tick(Tickable, int)public short exitUsage(short change)
Exit
exitUsage in interface Exitchange - 0 to make no change, or a positive or negative number
public void setName(java.lang.String newName)
Environmental
setName in interface EnvironmentalnewName - the raw base name of this object on the map.Environmental.Name()public java.lang.String name()
Environmental
name in interface Environmentalname in interface TickableEnvironmental.Name()public EnvStats envStats()
Environmental
envStats in interface EnvironmentalEnvironmental.baseEnvStats(),
Environmental.recoverEnvStats(),
EnvStatspublic EnvStats baseEnvStats()
Environmental
baseEnvStats in interface EnvironmentalEnvironmental.envStats(),
Environmental.recoverEnvStats(),
EnvStatspublic void recoverEnvStats()
Environmental
recoverEnvStats in interface EnvironmentalEnvironmental.baseEnvStats(),
Environmental.envStats(),
Environmental.addEffect(Ability),
Behavable.addBehavior(Behavior),
EnvStatspublic void setBaseEnvStats(EnvStats newBaseEnvStats)
Environmental
setBaseEnvStats in interface EnvironmentalnewBaseEnvStats - a set of state fieldsEnvironmental.envStats(),
Environmental.recoverEnvStats(),
EnvStatspublic void destroy()
Environmental
destroy in interface Environmentalpublic boolean amDestroyed()
Environmental
amDestroyed in interface Environmentalpublic boolean savable()
Environmental
savable in interface Environmentalpublic java.lang.String image()
Environmental
image in interface Environmentalpublic java.lang.String rawImage()
Environmental
rawImage in interface Environmentalpublic void setImage(java.lang.String newImage)
Environmental
setImage in interface EnvironmentalnewImage - the raw name of the mxp image filepublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic boolean isGeneric()
Environmental
isGeneric in interface EnvironmentalEnvironmental.text()protected void cloneFix(Exit E)
public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic void setMiscText(java.lang.String newMiscText)
Environmental
setMiscText in interface EnvironmentalnewMiscText - either an open internal text string, or XMLpublic java.lang.String text()
Environmental
text in interface Environmentalpublic java.lang.String miscTextFormat()
Environmental
miscTextFormat in interface EnvironmentalCMParms,
Environmental.text(),
Environmental.setMiscText(String)public long expirationDate()
Environmental
expirationDate in interface EnvironmentalEnvironmental.setExpirationDate(long)public void setExpirationDate(long time)
Environmental
setExpirationDate in interface Environmentaltime - the time stamp when this thing expiresEnvironmental.expirationDate()public void setDisplayText(java.lang.String newDisplayText)
Environmental
setDisplayText in interface EnvironmentalnewDisplayText - the string describing how this object looks in the roompublic void setDescription(java.lang.String newDescription)
Environmental
setDescription in interface EnvironmentalnewDescription - the basic detail description of this objectpublic int maxRange()
Environmental
maxRange in interface Environmentalpublic int minRange()
Environmental
minRange in interface Environmental
protected Rideable findALadder(MOB mob,
Room room)
protected void mountLadder(MOB mob,
Rideable ladder)
protected final java.lang.String closeWordPastTense()
protected final java.lang.String openWordPastTense()
public boolean okMessage(Environmental myHost,
CMMsg msg)
MsgListener
okMessage in interface MsgListenermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executed
CMMsg,
CMMsg.source()
public java.lang.StringBuffer viewableText(MOB mob,
Room room)
Exit
viewableText in interface Exitmob - the mob doing the viewingroom - the room from which the mob sees the exit
public void executeMsg(Environmental myHost,
CMMsg msg)
MsgListener
executeMsg in interface MsgListenermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsgpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
public boolean tick(Tickable ticking,
int tickID)
Tickable
tick in interface Tickableticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable,
ServiceEngine,
TickableGrouppublic boolean isOpen()
Exit
isOpen in interface Exitpublic boolean isLocked()
Exit
isLocked in interface ExitExit.hasADoor(),
Exit.hasALock()
public void setDoorsNLocks(boolean newHasADoor,
boolean newIsOpen,
boolean newDefaultsClosed,
boolean newHasALock,
boolean newIsLocked,
boolean newDefaultsLocked)
Exit
setDoorsNLocks in interface ExitnewHasADoor - whether this exit has a doornewIsOpen - whether this exit is open for travelnewDefaultsClosed - whether this exit defaults closednewHasALock - whether this exit has a door locknewIsLocked - whether this exit is presently lockednewDefaultsLocked - whether this exit defaults closed and locked.Exit.isOpen(),
Exit.isLocked(),
Exit.hasADoor(),
Exit.hasALock(),
Exit.defaultsClosed(),
Exit.defaultsLocked()public java.lang.String readableText()