com.planet_ink.coffee_mud.Exits.interfaces
Interface Exit

All Superinterfaces:
Affectable, Behavable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, StatsAffecting, Tickable
All Known Implementing Classes:
ClimbableExit, Door, FlyingExit, GapExit, Gate, GenAirLock, GenDoor, GenExit, GenMobilePortal, GenPortal, GenSSPortal, Grate, HiddenClosedDoorway, HiddenWalkway, Impassable, LockedDoor, LockedGate, NeedleDoor, Open, OpenDescriptable, OpenNameable, PitOpen, StdClosedDoorway, StdExit, StdLockedDoorway, StdOpenDoorway, StdPortal, TrappedDoor, TrappedLockedDoor, UnseenWalkway

public interface Exit
extends PhysicalAgent, Readable

An interface for all mechanisms or pathways through which a mob may travel when trying to get from one Room to another.

See Also:
Room

Field Summary
 
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_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY
 
Method Summary
 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.
 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.
 java.lang.String doorName()
          Returns the short name of this door, e.g.
 short exitUsage(short change)
          Both reads and optionally modifies an internal reference counter for this exit.
 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.
 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
 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 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.
 void setDoorsNLocks(boolean hasADoor, boolean isOpen, boolean defaultsClosed, boolean hasALock, boolean isLocked, boolean defaultsLocked)
          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 setKeyName(java.lang.String keyName)
          For Exits with doors and locks, this sets the unique string representing the key code required to unlock/lock the door.
 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 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.StringBuilder viewableText(MOB mob, Room myRoom)
          Returns the modified and qualified player-viewed description of this exit.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, behaviors, delBehavior, delScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
 
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.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, 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, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, 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
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats
 

Method Detail

isOpen

boolean isOpen()
Returns whether this exit is OPEN and may be travelled through

Returns:
whether this exit is OPEN and may be travelled through

isLocked

boolean isLocked()
Returns whether this exit is LOCKED, and must be unlocked before being used.

Returns:
true if locked, false otherwise
See Also:
hasADoor(), hasALock()

hasADoor

boolean hasADoor()
Returns whether this exit has a door, and must be opened before being used.

Returns:
true if a door is present, false otherwise.
See Also:
isOpen(), isLocked()

hasALock

boolean hasALock()
Returns whether this exit has a lock on its door, and, if locked, must be unlocked before being used.

Returns:
whether a lock is present
See Also:
isOpen(), isLocked(), hasADoor()

defaultsLocked

boolean defaultsLocked()
For exits with a door and lock, this returns whether the door defaults in a closed and locked state.

Returns:
true if defaults closed and locked, false otherwise
See Also:
hasADoor(), defaultsClosed()

defaultsClosed

boolean defaultsClosed()
For exits with a door, this returns whether the door defaults in a closed state.

Returns:
true if defaults closed, false otherwise
See Also:
hasADoor(), defaultsLocked()

setDoorsNLocks

void setDoorsNLocks(boolean hasADoor,
                    boolean isOpen,
                    boolean defaultsClosed,
                    boolean hasALock,
                    boolean isLocked,
                    boolean defaultsLocked)
Modifies the various door/lock settings for this exit.

Parameters:
hasADoor - whether this exit has a door
isOpen - whether this exit is open for travel
defaultsClosed - whether this exit defaults closed
hasALock - whether this exit has a door lock
isLocked - whether this exit is presently locked
defaultsLocked - whether this exit defaults closed and locked.
See Also:
isOpen(), isLocked(), hasADoor(), hasALock(), defaultsClosed(), defaultsLocked()

keyName

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.

Returns:
the key code
See Also:
setKeyName(String)

setKeyName

void setKeyName(java.lang.String keyName)
For Exits with doors and locks, this sets the unique string representing the key code required to unlock/lock the door.

Parameters:
keyName - the new key code
See Also:
keyName()

exitUsage

short exitUsage(short change)
Both reads and optionally modifies an internal reference counter for this exit. Not currently functional.

Parameters:
change - 0 to make no change, or a positive or negative number
Returns:
the value of the usage counter after the change is applied

viewableText

java.lang.StringBuilder viewableText(MOB mob,
                                     Room myRoom)
Returns the modified and qualified player-viewed description of this exit.

Parameters:
mob - the mob doing the viewing
myRoom - the room from which the mob sees the exit
Returns:
the description of this exit from the given player pov

doorName

java.lang.String doorName()
Returns the short name of this door, e.g. gate, door, portal, etc..

Returns:
the short name of this door.
See Also:
setExitParams(String, String, String, String)

closeWord

java.lang.String closeWord()
Returns the verb used for describing closing this exit, e.g. close, lower, drop, etc..

Returns:
the short name of a verb used when closing this door.
See Also:
openWord(), hasADoor(), defaultsClosed(), setExitParams(String, String, String, String)

openWord

java.lang.String openWord()
Returns the verb used for describing opening this exit, e.g. open, raise, lift, etc..

Returns:
the short name of a verb used when opening this door.
See Also:
closeWord(), hasADoor(), defaultsClosed(), setExitParams(String, String, String, String)

closedText

java.lang.String closedText()
Returns a text description of what this exit looks like when closed.

Returns:
A description of this exit when closed.
See Also:
hasADoor(), defaultsClosed()

setExitParams

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.

Parameters:
newDoorName - short name of this door, e.g. door, gate
newCloseWord - verb used to close this door, e.g. close, lower
newOpenWord - verb used to open this door, e.g. open, raise
newClosedText - description of this exit when in a closed state
See Also:
closeWord(), openWord(), doorName(), closedText()

openDelayTicks

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.

Returns:
the number of ticks this exit remains open
See Also:
setOpenDelayTicks(int), Tickable.TICKID_EXIT_REOPEN

setOpenDelayTicks

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.

Parameters:
numTicks - the number of ticks this exit will remain open
See Also:
openDelayTicks(), Tickable.TICKID_EXIT_REOPEN

temporaryDoorLink

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.

Returns:
the room id of the room that will be linked in later
See Also:
setTemporaryDoorLink(String)

setTemporaryDoorLink

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.

Parameters:
link - the room id of the room that will be linked in later
See Also:
temporaryDoorLink()