com.planet_ink.coffee_mud.core.interfaces
Interface Rideable

All Superinterfaces:
Affectable, Behavable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Rider, StatsAffecting, Tickable
All Known Subinterfaces:
SailingShip
All Known Implementing Classes:
Bed, Boat, Chair, GenBed, GenBoat, GenCageRideable, GenChair, GenComputerConsole, GenCow, GenGrapples, GenHorse, GenMobilePortal, GenPiano, GenPortal, GenRideable, GenRideable, GenSailingShip, GenSiegeWeapon, GenSpaceShip, GenTable, GenTub, Horse, HorseCart, Pegasus, PegasusGreater, StdBoardable, StdCageRideable, StdComputerConsole, StdGrapples, StdPortal, StdRideable, StdRideable, StdSiegeWeapon, StdTub

public interface Rideable
extends Rider

The interface for an item or mob which may be ridden

See Also:
Rider

Field Summary
static int RIDEABLE_AIR
          constant for the rideType() method.
static java.lang.String[] RIDEABLE_DESCS
          constant for the rideType() method.
static int RIDEABLE_ENTERIN
          constant for the rideType() method.
static int RIDEABLE_LADDER
          constant for the rideType() method.
static int RIDEABLE_LAND
          constant for the rideType() method.
static int RIDEABLE_SIT
          constant for the rideType() method.
static int RIDEABLE_SLEEP
          constant for the rideType() method.
static int RIDEABLE_TABLE
          constant for the rideType() method.
static int RIDEABLE_WAGON
          constant for the rideType() method.
static int RIDEABLE_WATER
          constant for the rideType() method.
 
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
 
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
 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
 Rider fetchRider(int which)
          Returns a particular Rider mounted on this Rideable.
 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 isMobileRideBasis()
          Whether the type of rideable is mobile.
 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
 java.lang.String putString(Rider R)
          Returns a string grammatically correct for the given rider when they are putting something on this Rideable
 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 setMountString(java.lang.String str)
          Setss a string grammatically correct for the given rider when they are mounting this Rideable
 void setPutString(java.lang.String str)
          Set a string grammatically correct for the given rider when they are putting something on this Rideable
 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
 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
 
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, displayText, 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.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, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, 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
 

Field Detail

RIDEABLE_LAND

static final int RIDEABLE_LAND
constant for the rideType() method. Means it is ridden over land

See Also:
Constant Field Values

RIDEABLE_WATER

static final int RIDEABLE_WATER
constant for the rideType() method. Means it is ridden over water

See Also:
Constant Field Values

RIDEABLE_AIR

static final int RIDEABLE_AIR
constant for the rideType() method. Means it is ridden through the air

See Also:
Constant Field Values

RIDEABLE_SIT

static final int RIDEABLE_SIT
constant for the rideType() method. Means it is sat upon

See Also:
Constant Field Values

RIDEABLE_SLEEP

static final int RIDEABLE_SLEEP
constant for the rideType() method. Means it is slept upon

See Also:
Constant Field Values

RIDEABLE_TABLE

static final int RIDEABLE_TABLE
constant for the rideType() method. Means it is sat at

See Also:
Constant Field Values

RIDEABLE_ENTERIN

static final int RIDEABLE_ENTERIN
constant for the rideType() method. Means it is entered into

See Also:
Constant Field Values

RIDEABLE_LADDER

static final int RIDEABLE_LADDER
constant for the rideType() method. Means it is climbed

See Also:
Constant Field Values

RIDEABLE_WAGON

static final int RIDEABLE_WAGON
constant for the rideType() method. Means it is pulled by others

See Also:
Constant Field Values

RIDEABLE_DESCS

static final java.lang.String[] RIDEABLE_DESCS
constant for the rideType() method. Means it is climbed and travels with player

Method Detail

isMobileRideBasis

boolean isMobileRideBasis()
Whether the type of rideable is mobile.

Returns:
Whether this type of rideable is mobile
See Also:
Rideable

rideBasis

int rideBasis()
The type of rideable object this is.

Returns:
the RIDEABLE_* constant describing how this is ridden
See Also:
Rideable

setRideBasis

void setRideBasis(int basis)
Sets type of rideable object this is.

Parameters:
basis - the RIDEABLE_* constant describing how this is ridden
See Also:
Rideable

riderCapacity

int riderCapacity()
The number of Riders which may ride upon this Rideable

Returns:
the maximum riders
See Also:
Rider

setRiderCapacity

void setRiderCapacity(int newCapacity)
Sets the number of Riders which may ride upon this Rideable

Parameters:
newCapacity - the maximum riders
See Also:
Rider

numRiders

int numRiders()
Returns the number of riders currently mounted on this Rideable

Returns:
the number of current Riders
See Also:
Rider

riders

java.util.Enumeration<Rider> riders()
Returns an iterator of the riders on this rideable

Returns:
the riders
See Also:
Rider

fetchRider

Rider fetchRider(int which)
Returns a particular Rider mounted on this Rideable. May return null in the case of a race condition

Parameters:
which - which rider to detch
Returns:
the rider riding
See Also:
Rider, Rideable, numRiders()

addRider

void addRider(Rider mob)
Adds a new Rider to this Rideable. Is called by Rider.setRiding(Rideable) Should also call Rider.setRiding(Rideable) without recursion

Parameters:
mob - Rider object, either an item or a mob
See Also:
Rider, Rideable

delRider

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

Parameters:
mob - Rider object, either an item or a mob
See Also:
Rider, Rideable

amRiding

boolean amRiding(Rider mob)
Returns whether Rider is currently mounted on this Rideable

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

stateString

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

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

getStateString

java.lang.String getStateString()
Returns the custom string grammatically correct for the given rider when they are mounted on this Rideable

Returns:
a custom string describing the riders state of riding this Rideable
See Also:
Rider, setStateString(String), stateString(Rider)

setStateString

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

Parameters:
str - a string describing the riders state of riding this Rideable
See Also:
Rider, stateString(Rider), getStateString()

rideString

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

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

getRideString

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

Returns:
a custom string describing the riders verb of riding this Rideable somewhere
See Also:
Rider, setRideString(String), rideString(Rider)

setRideString

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

Parameters:
str - a string describing the riders verb of riding this Rideable somewhere
See Also:
Rider, rideString(Rider), getRideString()

putString

java.lang.String putString(Rider R)
Returns a string grammatically correct for the given rider when they are putting something on this 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, setPutString(String), getPutString()

getPutString

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

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

setPutString

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

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

stateStringSubject

java.lang.String stateStringSubject(Rider R)
Returns a string grammatically correct for this Rideable when Riders are mounted

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

getStateStringSubject

java.lang.String getStateStringSubject()
Returns a custom string grammatically correct for this Rideable when Riders are mounted

Returns:
a custom string describing the Riderable state of being ridden
See Also:
Rider, setStateStringSubject(String), stateStringSubject(Rider)

setStateStringSubject

void setStateStringSubject(java.lang.String str)
Sets a string grammatically correct for this Rideable when Riders are mounted

Parameters:
str - a string describing the Riderable state of being ridden
See Also:
Rider, stateStringSubject(Rider), getStateStringSubject()

mobileRideBasis

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

Returns:
whether this item moves with the rider
See Also:
rideBasis()

mountString

java.lang.String mountString(int commandType,
                             Rider R)
Returns a string grammatically correct for the given rider when they are mounting this 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, setMountString(String), getMountString(), RIDEABLE_DESCS

getMountString

java.lang.String getMountString()
Returns a custom string grammatically correct for the given rider when they are mounting this Rideable

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

setMountString

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

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

dismountString

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

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

getDismountString

java.lang.String getDismountString()
Returns a custom string grammatically correct for the given rider when they are dismounting this Rideable

Returns:
a custom string describing the riders state of dismounting this Rideable
See Also:
Rider, setDismountString(String), dismountString(Rider)

setDismountString

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

Parameters:
str - a string describing the riders state of dismounting this Rideable
See Also:
Rider, dismountString(Rider), getDismountString()

getRideBuddies

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

Parameters:
list - the hashset into which to add all the mob riders
Returns:
the same list passed in, filled