com.planet_ink.coffee_mud.core.interfaces
Interface Rideable

All Superinterfaces:
Behavable, java.lang.Cloneable, CMModifiable, CMObject, java.lang.Comparable<CMObject>, Environmental, MsgListener, StatsAffecting, Tickable
All Known Implementing Classes:
Bed, Boat, Chair, GenBed, GenBoat, GenCageRideable, GenChair, GenMobilePortal, GenPiano, GenPortal, GenRideable, GenRideable, GenSSConsole, GenSSPortal, GenTable, GenTub, Pegasus, PegasusGreater, StdCageRideable, StdPortal, StdRideable, StdRideable, StdShipConsole, StdTub

public interface Rideable
extends Environmental

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
          list of strings describing the RIDEABLE_* constants in their numeric value order
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_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, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
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.util.HashSet getRideBuddies(java.util.HashSet list)
          Adds all of the MOB Riders on this Rideable to the given HashSet and returns it
 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
 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
 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.Environmental
addEffect, addNonUninvokableEffect, amDestroyed, baseEnvStats, delEffect, description, destroy, displayText, envStats, expirationDate, fetchEffect, fetchEffect, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, numEffects, rawImage, recoverEnvStats, sameAs, savable, setBaseEnvStats, 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.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectEnvStats
 
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.CMModifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, delBehavior, delScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts
 

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
list of strings describing the RIDEABLE_* constants in their numeric value order

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

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, Rideable

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, Rideable

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, Rideable

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:
R - The rider object to make grammatically correct.
Returns:
a string describing the riders state of mounting this Rideable
See Also:
Rider, Rideable

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, Rideable

getRideBuddies

java.util.HashSet getRideBuddies(java.util.HashSet list)
Adds all of the MOB Riders on this Rideable to the given HashSet and returns it

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