com.planet_ink.coffee_mud.Items.Basic
Class StdPortal

java.lang.Object
  extended by com.planet_ink.coffee_mud.Items.Basic.StdItem
      extended by com.planet_ink.coffee_mud.Items.Basic.StdContainer
          extended by com.planet_ink.coffee_mud.Items.Basic.StdPortal
All Implemented Interfaces:
Affectable, Behavable, CloseableLockable, CMObject, Contingent, DBIdentifiable, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Readable, Rideable, Rider, StatsAffecting, Tickable, Exit, Container, Item, Wearable, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenPortal, StdBoardable, StdGrapples

public class StdPortal
extends StdContainer
implements Rideable, Exit


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Wearable
Wearable.CODES
 
Field Summary
protected  java.lang.String closedText
           
protected  java.lang.String dismountString
           
protected  java.lang.String doorName
           
protected  java.lang.String mountString
           
protected  java.lang.String putString
           
protected  java.lang.String rideString
           
protected  java.lang.String stateString
           
protected  java.lang.String 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.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.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.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
 
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
StdPortal()
           
 
Method Summary
 void addRider(Rider mob)
          Adds a new Rider to this Rideable.
 boolean amRiding(Rider mob)
          Returns whether Rider is currently mounted on this Rideable
 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 this defaults in a closed state.
 boolean defaultsLocked()
          For exits with a door and lock, this returns whether this defaults in a closed and locked state.
 void delRider(Rider mob)
          Removes a Rider from this Rideable.
 java.lang.String dismountString(Rider R)
          Returns a string grammatically correct for the given rider when they are dismounting this Rideable
 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.
 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.
 Rider fetchRider(int which)
          Returns a particular Rider mounted on this Rideable.
protected  Room getDestinationRoom(Room fromRoom)
           
 java.lang.String getDismountString()
          Returns a custom string grammatically correct for the given rider when they are dismounting this Rideable
 java.lang.String getMountString()
          Returns a custom string grammatically correct for the given rider when they are mounting this Rideable
 java.lang.String getPutString()
          Returns a custom string grammatically correct for the given rider when they are putting something on this Rideable
 java.util.Set<MOB> getRideBuddies(java.util.Set<MOB> list)
          Adds all of the MOB Riders on this Rideable to the given Set and returns it
 java.lang.String getRideString()
          Returns a custom verb string describing what one does when one rides this Rideable from room to room.
 java.lang.String getStateString()
          Returns the custom string grammatically correct for the given rider when they are mounted on this Rideable
 java.lang.String getStateStringSubject()
          Returns a custom string grammatically correct for this Rideable when Riders are mounted
 boolean hasADoor()
          Returns whether this has a door, and must be opened before being used.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 boolean isMobileRideBasis()
          Whether the type of rideable is mobile.
 boolean isReadable()
          Returns whether this thing is readable when the player uses the READ command and targets it.
 Room lastRoomUsedFrom(Room fromRoom)
          Returns the very last room from or to which this exit was used.
 boolean mobileRideBasis()
          Whether this Rideable moves when the Rider wants to move it.
 java.lang.String mountString(int commandType, Rider R)
          Returns a string grammatically correct for the given rider when they are mounting this Rideable
 int numRiders()
          Returns the number of riders currently mounted on this Rideable
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
 int openDelayTicks()
          Returns the number of ticks that this remains open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.
 java.lang.String openWord()
          Returns the verb used for describing opening this exit, e.g.
 java.lang.String putString(Rider R)
          Returns a string grammatically correct for the given rider when they are putting something on this Rideable
 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.
 int rideBasis()
          The type of rideable object this is.
 int riderCapacity()
          The number of Riders which may ride upon this Rideable
 java.util.Enumeration<Rider> riders()
          Returns an iterator of the riders on this rideable
 java.lang.String rideString(Rider R)
          Returns a verb string describing what one does when one rides this Rideable from room to room.
 void setDismountString(java.lang.String str)
          Sets a string grammatically correct for the given rider when they are dismounting this Rideable
 void setDoorsNLocks(boolean hasADoor, boolean isOpen, boolean defaultsClosed, boolean hasALock, boolean isLocked, boolean defaultsLocked)
          Modifies the various door/lock settings for this thing.
 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 setMountString(java.lang.String str)
          Setss a string grammatically correct for the given rider when they are mounting this Rideable
 void setOpenDelayTicks(int numTicks)
          Sets the number of ticks that this will remain open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.
 void setPutString(java.lang.String str)
          Set a string grammatically correct for the given rider when they are putting something on this Rideable
 void setReadable(boolean isTrue)
          Returns whether this thing is readable when the player uses the READ command and targets it.
 void setRideBasis(int basis)
          Sets type of rideable object this is.
 void setRiderCapacity(int newCapacity)
          Sets the number of Riders which may ride upon this Rideable
 void setRideString(java.lang.String str)
          Sets a verb string describing what one does when one rides this Rideable from room to room.
 void setStateString(java.lang.String str)
          Returns a string grammatically correct for the given rider when they are mounted on this Rideable
 void setStateStringSubject(java.lang.String str)
          Sets a string grammatically correct for this Rideable when Riders are mounted
 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 stateString(Rider R)
          Returns a string grammatically correct for the given rider when they are mounted on this Rideable
 java.lang.String stateStringSubject(Rider R)
          Returns a string grammatically correct for this Rideable when Riders are mounted
 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 class com.planet_ink.coffee_mud.Items.Basic.StdContainer
canContain, capacity, containTypes, emptyPlease, getContents, getDeepContents, hasALock, hasContent, isInside, isLocked, isOpen, keyName, numberOfItems, recursiveWeight, setCapacity, setContainTypes, setKeyName, setMiscText, tick
 
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, destroy, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fitsOn, getCodeNum, getSaveStatIndex, getStat, getStatCodes, getTickStatus, I, image, initializeClass, isGeneric, isSavable, isStat, L, material, maxRange, minRange, miscTextFormat, name, Name, name, newInstance, numBehaviors, numEffects, numScripts, owner, phyStats, rawImage, rawLogicalAnd, rawProperLocationBitmap, rawSecretIdentity, rawWornCode, readableText, removeFromOwnerContainer, riding, sameAs, scripts, secretIdentity, setBasePhyStats, setBaseValue, setContainer, setDatabaseID, setDescription, setDisplayText, setExpirationDate, setImage, setMaterial, setName, setOwner, setRawLogicalAnd, setRawProperLocationBitmap, setRawWornCode, setReadableText, setRiding, setSavable, setSecretIdentity, setStat, setUsesRemaining, stopTicking, subjectToWearAndTear, tackOns, text, 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.Rider
riding, setRiding
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Physical
description, displayText, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, 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.Contingent
amDestroyed, destroy, 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
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, setBasePhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Readable
readableText, setReadableText
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CloseableLockable
hasALock, isLocked, isOpen, keyName, setKeyName
 
Methods inherited from interface com.planet_ink.coffee_mud.Items.interfaces.Item
baseGoldValue, container, material, owner, rawSecretIdentity, removeFromOwnerContainer, secretIdentity, setBaseValue, setContainer, setMaterial, setOwner, setSecretIdentity, setUsesRemaining, stopTicking, subjectToWearAndTear, ultimateContainer, usesRemaining, value
 
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
 

Field Detail

doorName

protected java.lang.String doorName

closedText

protected java.lang.String closedText

putString

protected java.lang.String putString

rideString

protected java.lang.String rideString

stateString

protected java.lang.String stateString

stateSubjectStr

protected java.lang.String stateSubjectStr

mountString

protected java.lang.String mountString

dismountString

protected java.lang.String dismountString
Constructor Detail

StdPortal

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

isMobileRideBasis

public boolean isMobileRideBasis()
Description copied from interface: Rideable
Whether the type of rideable is mobile.

Specified by:
isMobileRideBasis in interface Rideable
Returns:
Whether this type of rideable is mobile
See Also:
Rideable

rideBasis

public int rideBasis()
Description copied from interface: Rideable
The type of rideable object this is.

Specified by:
rideBasis in interface Rideable
Returns:
the RIDEABLE_* constant describing how this is ridden
See Also:
Rideable

setRideBasis

public void setRideBasis(int basis)
Description copied from interface: Rideable
Sets type of rideable object this is.

Specified by:
setRideBasis in interface Rideable
Parameters:
basis - the RIDEABLE_* constant describing how this is ridden
See Also:
Rideable

riderCapacity

public int riderCapacity()
Description copied from interface: Rideable
The number of Riders which may ride upon this Rideable

Specified by:
riderCapacity in interface Rideable
Returns:
the maximum riders
See Also:
Rider

setRiderCapacity

public void setRiderCapacity(int newCapacity)
Description copied from interface: Rideable
Sets the number of Riders which may ride upon this Rideable

Specified by:
setRiderCapacity in interface Rideable
Parameters:
newCapacity - the maximum riders
See Also:
Rider

numRiders

public int numRiders()
Description copied from interface: Rideable
Returns the number of riders currently mounted on this Rideable

Specified by:
numRiders in interface Rideable
Returns:
the number of current Riders
See Also:
Rider

riders

public java.util.Enumeration<Rider> riders()
Description copied from interface: Rideable
Returns an iterator of the riders on this rideable

Specified by:
riders in interface Rideable
Returns:
the riders
See Also:
Rider

fetchRider

public Rider fetchRider(int which)
Description copied from interface: Rideable
Returns a particular Rider mounted on this Rideable. May return null in the case of a race condition

Specified by:
fetchRider in interface Rideable
Parameters:
which - which rider to detch
Returns:
the rider riding
See Also:
Rider, Rideable, Rideable.numRiders()

addRider

public void addRider(Rider mob)
Description copied from interface: Rideable
Adds a new Rider to this Rideable. Is called by Rider.setRiding(Rideable) Should also call Rider.setRiding(Rideable) without recursion

Specified by:
addRider in interface Rideable
Parameters:
mob - Rider object, either an item or a mob
See Also:
Rider, Rideable

delRider

public void delRider(Rider mob)
Description copied from interface: Rideable
Removes a Rider from this Rideable. Is called by Rider.setRiding(null) Should also call Rider.setRiding(null) without recursion

Specified by:
delRider in interface Rideable
Parameters:
mob - Rider object, either an item or a mob
See Also:
Rider, Rideable

recoverPhyStats

public void recoverPhyStats()
Description copied from interface: Affectable
This method copies the basePhyStats() object into the phyStats() object, then makes repeated calls to all surrounding objects with affectPhyStats(Environmental,PhyStats) method. Surrounding objects include the room where the object is located, the Ability objects in the Effects list, the Behaviors in the behaviors list, and race/charclass/area if applicable. Those methods will then make all necessary adjustments to the values in the new phyStats() object. When it returns, phyStats() will have a totally updated object. This method must be called in code whenever the object is placed on the map, or when anything changes in its environment, such as location, effects, or other states.

Specified by:
recoverPhyStats in interface Affectable
Overrides:
recoverPhyStats in class StdItem
See Also:
Affectable.basePhyStats(), Affectable.phyStats(), Affectable.addEffect(Ability), Behavable.addBehavior(Behavior), PhyStats

getRideBuddies

public java.util.Set<MOB> getRideBuddies(java.util.Set<MOB> list)
Description copied from interface: Rideable
Adds all of the MOB Riders on this Rideable to the given Set and returns it

Specified by:
getRideBuddies in interface Rideable
Parameters:
list - the hashset into which to add all the mob riders
Returns:
the same list passed in, filled

mobileRideBasis

public boolean mobileRideBasis()
Description copied from interface: Rideable
Whether this Rideable moves when the Rider wants to move it. Largely derived from rideBasis().

Specified by:
mobileRideBasis in interface Rideable
Returns:
whether this item moves with the rider
See Also:
Rideable.rideBasis()

stateString

public java.lang.String stateString(Rider R)
Description copied from interface: Rideable
Returns a string grammatically correct for the given rider when they are mounted on this Rideable

Specified by:
stateString in interface Rideable
Parameters:
R - The rider object to make grammatically correct.
Returns:
a string describing the riders state of riding this Rideable
See Also:
Rider, Rideable.setStateString(String), Rideable.getStateString()

getStateString

public java.lang.String getStateString()
Description copied from interface: Rideable
Returns the custom string grammatically correct for the given rider when they are mounted on this Rideable

Specified by:
getStateString in interface Rideable
Returns:
a custom string describing the riders state of riding this Rideable
See Also:
Rider, Rideable.setStateString(String), Rideable.stateString(Rider)

setStateString

public void setStateString(java.lang.String str)
Description copied from interface: Rideable
Returns a string grammatically correct for the given rider when they are mounted on this Rideable

Specified by:
setStateString in interface Rideable
Parameters:
str - a string describing the riders state of riding this Rideable
See Also:
Rider, Rideable.stateString(Rider), Rideable.getStateString()

putString

public java.lang.String putString(Rider R)
Description copied from interface: Rideable
Returns a string grammatically correct for the given rider when they are putting something on this Rideable

Specified by:
putString in interface Rideable
Parameters:
R - The rider object to make grammatically correct.
Returns:
a string describing the riders state of putting something on this Rideable
See Also:
Rider, Rideable.setPutString(String), Rideable.getPutString()

getPutString

public java.lang.String getPutString()
Description copied from interface: Rideable
Returns a custom string grammatically correct for the given rider when they are putting something on this Rideable

Specified by:
getPutString in interface Rideable
Returns:
a custom string describing the riders state of putting something on this Rideable
See Also:
Rider, Rideable.setPutString(String), Rideable.putString(Rider)

setPutString

public void setPutString(java.lang.String str)
Description copied from interface: Rideable
Set a string grammatically correct for the given rider when they are putting something on this Rideable

Specified by:
setPutString in interface Rideable
Parameters:
str - a string describing the riders state of putting something on this Rideable
See Also:
Rider, Rideable.putString(Rider), Rideable.getPutString()

mountString

public java.lang.String mountString(int commandType,
                                    Rider R)
Description copied from interface: Rideable
Returns a string grammatically correct for the given rider when they are mounting this Rideable

Specified by:
mountString in interface Rideable
Parameters:
commandType - one of the RIDEABLE_ constants as a type
R - The rider object to make grammatically correct.
Returns:
a string describing the riders state of mounting this Rideable
See Also:
Rider, Rideable.setMountString(String), Rideable.getMountString(), Rideable.RIDEABLE_DESCS

getMountString

public java.lang.String getMountString()
Description copied from interface: Rideable
Returns a custom string grammatically correct for the given rider when they are mounting this Rideable

Specified by:
getMountString in interface Rideable
Returns:
a custom string describing the riders state of mounting this Rideable
See Also:
Rider, Rideable.setMountString(String), Rideable.mountString(int, Rider), Rideable.RIDEABLE_DESCS

setMountString

public void setMountString(java.lang.String str)
Description copied from interface: Rideable
Setss a string grammatically correct for the given rider when they are mounting this Rideable

Specified by:
setMountString in interface Rideable
Parameters:
str - a string describing the riders state of mounting this Rideable
See Also:
Rider, Rideable.mountString(int, Rider), Rideable.getDismountString(), Rideable.RIDEABLE_DESCS

dismountString

public java.lang.String dismountString(Rider R)
Description copied from interface: Rideable
Returns a string grammatically correct for the given rider when they are dismounting this Rideable

Specified by:
dismountString in interface Rideable
Parameters:
R - The rider object to make grammatically correct.
Returns:
a string describing the riders state of dismounting this Rideable
See Also:
Rider, Rideable.setDismountString(String), Rideable.getDismountString()

getDismountString

public java.lang.String getDismountString()
Description copied from interface: Rideable
Returns a custom string grammatically correct for the given rider when they are dismounting this Rideable

Specified by:
getDismountString in interface Rideable
Returns:
a custom string describing the riders state of dismounting this Rideable
See Also:
Rider, Rideable.setDismountString(String), Rideable.dismountString(Rider)

setDismountString

public void setDismountString(java.lang.String str)
Description copied from interface: Rideable
Sets a string grammatically correct for the given rider when they are dismounting this Rideable

Specified by:
setDismountString in interface Rideable
Parameters:
str - a string describing the riders state of dismounting this Rideable
See Also:
Rider, Rideable.dismountString(Rider), Rideable.getDismountString()

stateStringSubject

public java.lang.String stateStringSubject(Rider R)
Description copied from interface: Rideable
Returns a string grammatically correct for this Rideable when Riders are mounted

Specified by:
stateStringSubject in interface Rideable
Parameters:
R - The rider object to make grammatically correct.
Returns:
a string describing the Riderable state of being ridden
See Also:
Rider, Rideable.setStateStringSubject(String), Rideable.getStateStringSubject()

getStateStringSubject

public java.lang.String getStateStringSubject()
Description copied from interface: Rideable
Returns a custom string grammatically correct for this Rideable when Riders are mounted

Specified by:
getStateStringSubject in interface Rideable
Returns:
a custom string describing the Riderable state of being ridden
See Also:
Rider, Rideable.setStateStringSubject(String), Rideable.stateStringSubject(Rider)

setStateStringSubject

public void setStateStringSubject(java.lang.String str)
Description copied from interface: Rideable
Sets a string grammatically correct for this Rideable when Riders are mounted

Specified by:
setStateStringSubject in interface Rideable
Parameters:
str - a string describing the Riderable state of being ridden
See Also:
Rider, Rideable.stateStringSubject(Rider), Rideable.getStateStringSubject()

rideString

public java.lang.String rideString(Rider R)
Description copied from interface: Rideable
Returns a verb string describing what one does when one rides this Rideable from room to room.

Specified by:
rideString in interface Rideable
Parameters:
R - The rider object to make grammatically correct.
Returns:
a string describing the riders verb of riding this Rideable somewhere
See Also:
Rider, Rideable.setRideString(String), Rideable.getRideString()

getRideString

public java.lang.String getRideString()
Description copied from interface: Rideable
Returns a custom verb string describing what one does when one rides this Rideable from room to room.

Specified by:
getRideString in interface Rideable
Returns:
a custom string describing the riders verb of riding this Rideable somewhere
See Also:
Rider, Rideable.setRideString(String), Rideable.rideString(Rider)

setRideString

public void setRideString(java.lang.String str)
Description copied from interface: Rideable
Sets a verb string describing what one does when one rides this Rideable from room to room.

Specified by:
setRideString in interface Rideable
Parameters:
str - a string describing the riders verb of riding this Rideable somewhere
See Also:
Rider, Rideable.rideString(Rider), Rideable.getRideString()

exitUsage

public short exitUsage(short change)
Description copied from interface: Exit
Both reads and optionally modifies an internal reference counter for this exit. Not currently functional.

Specified by:
exitUsage in interface Exit
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

displayText

public java.lang.String displayText()
Description copied from interface: Environmental
Gets the raw string used to show what this object looks like in the room. May be used as a basis for other methods, such as the title of rooms, and what an exit looks like when open. The value for Items may be null if the item is not displayed when the room is seen.

Specified by:
displayText in interface Environmental
Overrides:
displayText in class StdItem
Returns:
the string describing how this object looks in the room

amRiding

public boolean amRiding(Rider mob)
Description copied from interface: Rideable
Returns whether Rider is currently mounted on this Rideable

Specified by:
amRiding in interface Rideable
Parameters:
mob - the Rider to check this Rideable for
Returns:
true if the Rider is mounted on this Rideable
See Also:
Rider, Rideable

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdContainer
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

getDestinationRoom

protected Room getDestinationRoom(Room fromRoom)

lastRoomUsedFrom

public Room lastRoomUsedFrom(Room fromRoom)
Description copied from interface: Exit
Returns the very last room from or to which this exit was used.

Specified by:
lastRoomUsedFrom in interface Exit
Parameters:
fromRoom - the room from which a perspective is desired
Returns:
the last room that mattered to this exit

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdContainer
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

hasADoor

public boolean hasADoor()
Description copied from interface: CloseableLockable
Returns whether this has a door, and must be opened before being used.

Specified by:
hasADoor in interface CloseableLockable
Overrides:
hasADoor in class StdContainer
Returns:
true if a door is present, false otherwise.
See Also:
CloseableLockable.isOpen(), CloseableLockable.isLocked()

defaultsLocked

public boolean defaultsLocked()
Description copied from interface: CloseableLockable
For exits with a door and lock, this returns whether this defaults in a closed and locked state.

Specified by:
defaultsLocked in interface CloseableLockable
Overrides:
defaultsLocked in class StdContainer
Returns:
true if defaults closed and locked, false otherwise
See Also:
CloseableLockable.hasADoor(), CloseableLockable.defaultsClosed()

defaultsClosed

public boolean defaultsClosed()
Description copied from interface: CloseableLockable
For exits with a door, this returns whether this defaults in a closed state.

Specified by:
defaultsClosed in interface CloseableLockable
Overrides:
defaultsClosed in class StdContainer
Returns:
true if defaults closed, false otherwise
See Also:
CloseableLockable.hasADoor(), CloseableLockable.defaultsLocked()

setDoorsNLocks

public void setDoorsNLocks(boolean hasADoor,
                           boolean isOpen,
                           boolean defaultsClosed,
                           boolean hasALock,
                           boolean isLocked,
                           boolean defaultsLocked)
Description copied from interface: CloseableLockable
Modifies the various door/lock settings for this thing.

Specified by:
setDoorsNLocks in interface CloseableLockable
Overrides:
setDoorsNLocks in class StdContainer
Parameters:
hasADoor - whether this has a door
isOpen - whether this is open for use
defaultsClosed - whether this defaults closed
hasALock - whether this has a lock
isLocked - whether this is presently locked
defaultsLocked - whether this defaults closed and locked.
See Also:
CloseableLockable.isOpen(), CloseableLockable.isLocked(), CloseableLockable.hasADoor(), CloseableLockable.hasALock(), CloseableLockable.defaultsClosed(), CloseableLockable.defaultsLocked()

isReadable

public boolean isReadable()
Description copied from interface: Readable
Returns whether this thing is readable when the player uses the READ command and targets it.

Specified by:
isReadable in interface Readable
Overrides:
isReadable in class StdItem
Returns:
true if the thing is readable.
See Also:
Readable.readableText(), Readable.setReadable(boolean), Readable.setReadableText(String)

setReadable

public void setReadable(boolean isTrue)
Description copied from interface: Readable
Returns whether this thing is readable when the player uses the READ command and targets it. Readable text should also be set or unset.

Specified by:
setReadable in interface Readable
Overrides:
setReadable in class StdItem
Parameters:
isTrue - true if the thing is readable, and false otherwise
See Also:
Readable.readableText(), Readable.isReadable(), Readable.setReadableText(String)

viewableText

public java.lang.StringBuilder viewableText(MOB mob,
                                            Room myRoom)
Description copied from interface: Exit
Returns the modified and qualified player-viewed description of this exit.

Specified by:
viewableText in interface 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

public java.lang.String doorName()
Description copied from interface: Exit
Returns the short name of this door, e.g. gate, door, portal, etc..

Specified by:
doorName in interface Exit
Returns:
the short name of this door.
See Also:
Exit.setExitParams(String, String, String, String)

closedText

public java.lang.String closedText()
Description copied from interface: Exit
Returns a text description of what this exit looks like when closed.

Specified by:
closedText in interface Exit
Returns:
A description of this exit when closed.
See Also:
CloseableLockable.hasADoor(), CloseableLockable.defaultsClosed()

closeWord

public java.lang.String closeWord()
Description copied from interface: Exit
Returns the verb used for describing closing this exit, e.g. close, lower, drop, etc..

Specified by:
closeWord in interface Exit
Returns:
the short name of a verb used when closing this door.
See Also:
Exit.openWord(), CloseableLockable.hasADoor(), CloseableLockable.defaultsClosed(), Exit.setExitParams(String, String, String, String)

openWord

public java.lang.String openWord()
Description copied from interface: Exit
Returns the verb used for describing opening this exit, e.g. open, raise, lift, etc..

Specified by:
openWord in interface Exit
Returns:
the short name of a verb used when opening this door.
See Also:
Exit.closeWord(), CloseableLockable.hasADoor(), CloseableLockable.defaultsClosed(), Exit.setExitParams(String, String, String, String)

setExitParams

public void setExitParams(java.lang.String newDoorName,
                          java.lang.String newCloseWord,
                          java.lang.String newOpenWord,
                          java.lang.String newClosedText)
Description copied from interface: Exit
Sets various word descriptions used when doing some dynamic manipulations of this exit.

Specified by:
setExitParams in interface 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:
Exit.closeWord(), Exit.openWord(), Exit.doorName(), Exit.closedText()

openDelayTicks

public int openDelayTicks()
Description copied from interface: CloseableLockable
Returns the number of ticks that this remains open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.

Specified by:
openDelayTicks in interface CloseableLockable
Overrides:
openDelayTicks in class StdContainer
Returns:
the number of ticks this remains open
See Also:
CloseableLockable.setOpenDelayTicks(int), Tickable.TICKID_EXIT_REOPEN

setOpenDelayTicks

public void setOpenDelayTicks(int numTicks)
Description copied from interface: CloseableLockable
Sets the number of ticks that this will remain open when a mob or player changes it from a closed to an open state, and this thing defaults in a closed state.

Specified by:
setOpenDelayTicks in interface CloseableLockable
Overrides:
setOpenDelayTicks in class StdContainer
Parameters:
numTicks - the number of ticks this will remain open
See Also:
CloseableLockable.openDelayTicks(), Tickable.TICKID_EXIT_REOPEN

temporaryDoorLink

public java.lang.String temporaryDoorLink()
Description copied from interface: Exit
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.

Specified by:
temporaryDoorLink in interface Exit
Returns:
the room id of the room that will be linked in later
See Also:
Exit.setTemporaryDoorLink(String)

setTemporaryDoorLink

public void setTemporaryDoorLink(java.lang.String link)
Description copied from interface: Exit
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.

Specified by:
setTemporaryDoorLink in interface Exit
Parameters:
link - the room id of the room that will be linked in later
See Also:
Exit.temporaryDoorLink()