Affectable
, Behavable
, CMObject
, Contingent
, Environmental
, Expireable
, ItemCollection
, ItemPossessor
, Modifiable
, MsgListener
, Physical
, PhysicalAgent
, Places
, StatsAffecting
, Tickable
, Room
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
CaveRoom
, CityStreet
, ClimbableSurface
, Desert
, Hills
, HotRoom
, IcePlains
, IceRoom
, IndoorInTheAir
, IndoorUnderWater
, InTheAir
, Jungle
, MagicFreeRoom
, MagicShelter
, MetalRoom
, Mountains
, Plains
, Road
, SewerRoom
, ShallowWater
, Shore
, SpacePort
, StdGrid
, StdThinGrid
, StoneRoom
, Swamp
, UnderWater
, Void
, WaterSurface
, WoodenDeck
, WoodRoom
, Woods
public class StdRoom extends java.lang.Object implements Room
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
Room.VariationCode
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
_roomID |
|
protected EachApplicable.ApplyAffectPhyStats |
affectPhyStats |
|
protected SVector<Ability> |
affects |
|
protected boolean |
amDestroyed |
|
protected int |
atmosphere |
|
protected PhyStats |
basePhyStats |
|
protected SVector<Behavior> |
behaviors |
|
protected java.lang.String |
cachedImageName |
|
protected int |
climask |
|
protected short |
combatTurnMobIndex |
|
protected SVector<Item> |
contents |
|
protected java.lang.Object |
description |
|
protected java.lang.String |
displayText |
|
protected Room[] |
doors |
|
protected Exit[] |
exits |
|
protected long |
expirationDate |
|
protected GridLocale |
gridParent |
|
protected SVector<MOB> |
inhabitants |
|
protected long |
lastResourceTime |
|
protected Room |
me |
|
protected boolean |
mobility |
|
protected Area |
myArea |
|
protected int |
myResource |
|
protected java.lang.String |
name |
|
protected PhyStats |
phyStats |
|
protected java.lang.String |
rawImageName |
|
protected java.util.concurrent.atomic.AtomicInteger |
roomRecoverMarker |
|
protected SVector<ScriptingEngine> |
scripts |
|
protected boolean |
skyedYet |
|
protected static java.lang.String[] |
STDCODES |
|
protected int |
tickStatus |
|
protected java.lang.String[] |
xtraValues |
idConverter
ALL_CLIMATE_MASK, ATMOSPHERE_INHERIT, CLIMASK_COLD, CLIMASK_DRY, CLIMASK_HOT, CLIMASK_INHERIT, CLIMASK_NORMAL, CLIMASK_VOID, CLIMASK_WET, CLIMASK_WINDY, CLIMATE_DESCS, NUM_CLIMATES, placeComparator
DOMAIN_INDOOR_MAP, DOMAIN_INDOORS_AIR, DOMAIN_INDOORS_CAVE, DOMAIN_INDOORS_CAVE_SEAPORT, DOMAIN_INDOORS_DESCS, DOMAIN_INDOORS_MAGIC, DOMAIN_INDOORS_METAL, DOMAIN_INDOORS_SEAPORT, DOMAIN_INDOORS_STONE, DOMAIN_INDOORS_UNDERWATER, DOMAIN_INDOORS_WATERSURFACE, DOMAIN_INDOORS_WOOD, DOMAIN_OUTDOOR_DESCS, DOMAIN_OUTDOOR_MAP, DOMAIN_OUTDOORS_AIR, DOMAIN_OUTDOORS_CITY, DOMAIN_OUTDOORS_DESERT, DOMAIN_OUTDOORS_HILLS, DOMAIN_OUTDOORS_JUNGLE, DOMAIN_OUTDOORS_MOUNTAINS, DOMAIN_OUTDOORS_PLAINS, DOMAIN_OUTDOORS_ROCKS, DOMAIN_OUTDOORS_SEAPORT, DOMAIN_OUTDOORS_SPACEPORT, DOMAIN_OUTDOORS_SWAMP, DOMAIN_OUTDOORS_UNDERWATER, DOMAIN_OUTDOORS_WATERSURFACE, DOMAIN_OUTDOORS_WOODS, FILTER_ROOMONLY, INDOORS
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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
StdRoom() |
Modifier and Type | Method | Description |
---|---|---|
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 |
addInhabitant(MOB mob) |
Adds the given mob to this room as an inhabitant.
|
void |
addItem(Item item) |
Adds a new item to its possessor.
|
void |
addItem(Item item,
ItemPossessor.Expire expire) |
Adds a new item to its possessor, with an expiration code.
|
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 |
affectPhyStats(Physical affected,
PhyStats affectableStats) |
This method is called by the recoverPhyStats() method on other Environmental objects.
|
boolean |
amDestroyed() |
Whether the destroy() method has been previousy called on this object.
|
PhyStats |
basePhyStats() |
Object containing a set of base, unmodified, mostly numeric fields.
|
protected int |
baseThirst() |
|
java.util.Enumeration<Behavior> |
behaviors() |
Returns an enumerator of all the behaviors on this object.
|
void |
bringMobHere(MOB mob,
boolean andFollowers) |
A workhorse method that removes the given mob (and anything
they are riding or being ridden by, recursively, and
optionally any followers, and their riders, recursively)
and places them all in this room.
|
void |
clearSky() |
If this room has attached temporary rooms, such as a sky in an outdoor room,
or underwater rooms in the ocean, this method will empty all of those rooms
of their content, and then destroy those rooms.
|
protected void |
cloneFix(Room R) |
|
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.
|
void |
delAllBehaviors() |
Removes all behaviors from this object.
|
void |
delAllEffects(boolean unInvoke) |
Optionally uninvokes and then certainly removes all effects
from this object.
|
void |
delAllInhabitants(boolean destroy) |
Removes all the mobs from this room as inhabitants and
optionally destroys the mob objects as well.
|
void |
delAllItems(boolean destroy) |
Removes all items from this collection
|
void |
delAllScripts() |
Removes all executing scripts from this object.
|
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 |
delInhabitant(MOB mob) |
Removes the given mob from this room as an inhabitant.
|
void |
delItem(Item item) |
Removes the item from this possessor.
|
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.
|
java.lang.String |
description(MOB mob) |
Returns the description, but as seen by the given viewer.
|
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 |
displayText(MOB mob) |
Returns the displayText, but as seen by the given viewer.
|
int |
domainType() |
Returns the domain-code for this room, which tells you something about its physical makeup,
such as whether it is outdoor, if it's in the woods or surrounded by stone, that sort of thing.
|
void |
eachBehavior(EachApplicable<Behavior> applier) |
Applies the given code to each behavior on this object
|
void |
eachEffect(EachApplicable<Ability> applier) |
Applies the given code to each effect on this object
|
void |
eachInhabitant(EachApplicable<MOB> applier) |
Applies the given applier Java code to each mob in this room
|
void |
eachItem(EachApplicable<Item> applier) |
Applies the given code to each item in this collection
|
void |
eachScript(EachApplicable<ScriptingEngine> applier) |
Applies the given code to each scripting engine on this object
|
java.util.Enumeration<Ability> |
effects() |
Returns an enumerator of abilities listed as effects on this object.
|
void |
executeMsg(Environmental myHost,
CMMsg msg) |
The general message event handler for the object.
|
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.
|
Exit |
fetchExit(java.lang.String itemID) |
Returns the exit in this room with the given name or display text or in
the given direction.
|
PhysicalAgent |
fetchFromMOBRoomFavorsItems(MOB mob,
Item goodLocation,
java.lang.String thingName,
Filterer<Environmental> filter) |
Searches the given mob and this room for a mob, item, or exit that
matches the given search string, favoring the mobs inventory over other
types of objects and items generally.
|
PhysicalAgent |
fetchFromMOBRoomFavorsMOBs(MOB mob,
Item goodLocation,
java.lang.String thingName,
Filterer<Environmental> filter) |
Searches the given mob and this room for a mob, item, or exit that
matches the given search string, favoring the room mobs over other
types of objects.
|
PhysicalAgent |
fetchFromMOBRoomItemExit(MOB mob,
Item goodLocation,
java.lang.String thingName,
Filterer<Environmental> filter) |
Searches the given mob and this room for a mob, item, or exit that
matches the given search string, favoring the mobs inventory over other
types of objects.
|
PhysicalAgent |
fetchFromRoomFavorExits(java.lang.String thingName) |
Searches the room for a mob, item, or exit that matches
the given search string, favoring Exits over other types
of objects.
|
PhysicalAgent |
fetchFromRoomFavorItems(Item goodLocation,
java.lang.String thingName) |
Searches the room for a mob, item, or exit that matches
the given search string, favoring Items over other types
of objects.
|
PhysicalAgent |
fetchFromRoomFavorMOBs(Item goodLocation,
java.lang.String thingName) |
Searches the room for a mob, item, or exit that matches
the given search string, favoring Mobs over other types
of objects.
|
MOB |
fetchInhabitant(int i) |
Returns the inhabitant mob in this room at the given
index, or null if there are none at that index.
|
MOB |
fetchInhabitant(java.lang.String inhabitantID) |
Searches the inhabitants of this room for a mob with the given
ID(), name, or display name.
|
MOB |
fetchInhabitantExact(java.lang.String inhabitantID) |
Searches the inhabitants of this room for a mob with the given
ID(), name, or display name.
|
java.util.List<MOB> |
fetchInhabitants(java.lang.String inhabitantID) |
Searches the inhabitants of this room for mobs with the given
ID(), name, or display name.
|
MOB |
fetchRandomInhabitant() |
Returns a random inhabitant mob in this room, or null
if there are none.
|
ScriptingEngine |
fetchScript(int x) |
Retrieve one of the enumerated scripts running on this
object
|
Item |
findItem(Item goodLocation,
java.lang.String itemID) |
Returns the item in the given container that matches the
given itemID, whether by full name, description, class ID,
or partial name (if no fuller name is found).
|
Item |
findItem(java.lang.String itemID) |
Returns the item in this possessor that matches the
given itemID, whether by full name, description, class ID,
or partial name (if no fuller name is found).
|
java.util.List<Item> |
findItems(Item goodLocation,
java.lang.String itemID) |
Returns all items in the given container that matches the
given itemID, whether by full name, description, class ID,
or partial name (if no fuller names are found).
|
java.util.List<Item> |
findItems(java.lang.String itemID) |
Returns all items in this possessor that matches the
given itemID, whether by full name, description, class ID,
or partial name (if no fuller names are found).
|
java.lang.String |
genericName() |
Returns a generic name for this object, devoid of its particular
identifying details.
|
Area |
getArea() |
Returns the Area to which this room belongs.
|
int |
getAtmosphere() |
Returns the resource that represents the atmosphere of this area.
|
int |
getAtmosphereCode() |
Returns the resource (or -1) that represents the atmosphere of this area.
|
int |
getClimateType() |
Returns a bitmap of the climate for this place.
|
int |
getClimateTypeCode() |
Returns a bitmap of climate flags for this area which will be used to influence
the weather for the area in addition to season and other factors.
|
protected int |
getCodeNum(java.lang.String code) |
|
int |
getCombatTurnMobIndex() |
Returns the index number which represents which mob's "turn" it is in combat.
|
java.lang.String |
getContextName(Environmental E) |
Generates a specific search-string name for the given
object in this possessor.
|
Exit |
getExitInDir(int direction) |
Returns the Exit in this room, in the given direction.
|
GridLocale |
getGridParent() |
If this room is a grid-child room, this method is called to return
the identity of its parent gridlocale room.
|
Item |
getItem(int i) |
Returns the item at the given index, regardless of container status,
visibility, or other modifiers.
|
boolean |
getMobility() |
Gets whether any mobs in this room may, in fact, leave it.
|
protected int |
getMovementCost() |
|
Exit |
getPairedExit(int direction) |
Returns the Exit opposite this one, in the Room in the given direction,
but only if the two exits exist, and have the same Door status.
|
Item |
getRandomItem() |
Returns a random item in this collection, or null
|
Room |
getRawDoor(int direction) |
Returns the raw unresolved room link found in this room in the given
direction.
|
Exit |
getRawExit(int dir) |
Returns the raw unresolved exit found in this room in the given
direction.
|
int |
getReverseDir(int direction) |
Returns the dir opposite this one, from the Room in the given direction.
|
Exit |
getReverseExit(int direction) |
Returns the Exit opposite this one, in the Room in the given direction.
|
Room |
getRoomInDir(int direction) |
Returns the room in the given direction from this room which, depending
on the exit, may be traveled to.
|
protected int |
getRoomSize() |
|
int |
getSaveStatIndex() |
Returns the index into the stat codes array where extra savable fields begins.
|
java.util.List<Room> |
getSky() |
If this room requires attached temporary rooms, such as a sky in an outdoor
room, or underwater rooms in the ocean, this method will return any existing
one, or an empty list if none exist yet.
|
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.
|
int |
getTickStatus() |
A coded status for this object during the period where
its tick method is being called.
|
void |
giveASky(int depth) |
If this room requires attached temporary rooms, such as a sky in an outdoor
room, or underwater rooms in the ocean, this method will create those rooms
at the given left of depth.
|
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.
|
java.util.Enumeration<MOB> |
inhabitants() |
Returns an enumeration of all the inhabitants of
this room.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
protected void |
insertItemUpTop(Item item) |
|
boolean |
isContent(Item item) |
Returns whether the given item is in this possessors list.
|
boolean |
isGeneric() |
Whether the fields of this item are set in code, or set by builders.
|
boolean |
isHere(Environmental E) |
Returns whether the given object either IS this room, or is IN this room.
|
boolean |
isInhabitant(MOB mob) |
Returns whether the given mob is an inhabitant of this room.
|
boolean |
isSavable() |
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.
|
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.util.Enumeration<Item> |
items() |
An enumeration of all the items at this possessor.
|
java.util.Enumeration<Item> |
itemsRecursive() |
Returns an enumeration of all the items in the room,
any items on any inhabitants also.
|
java.lang.String |
L(java.lang.String str,
java.lang.String... xs) |
Localize an internal string -- shortcut.
|
int |
maxRange() |
Returns the maximum range for ranged weapons in this room.
|
int |
minRange() |
the modified 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.
|
void |
moveItemTo(Item container) |
Intelligently removes an item from its current location and
moves it to this possessor, managing any container contents.
|
void |
moveItemTo(Item item,
ItemPossessor.Expire expire,
ItemPossessor.Move... moveFlags) |
Intelligently removes an item from its current location and
moves it to this possessor, managing any container contents,
and possibly followers/riders if the item is a cart.
|
int |
myResource() |
Returns the full resource code for the current gatherable resource in this room.
|
java.lang.String |
name() |
The nice displayable name of this instance of this object
|
java.lang.String |
name(MOB viewerMob) |
Returns the name, but as seen by the given viewer.
|
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 |
numInhabitants() |
Returns the number of all the inhabitants of
this room.
|
int |
numItems() |
Returns the total number of items at this possessor, regardless
of container status.
|
int |
numPCInhabitants() |
Returns the number of player/PC inhabitants of
this room.
|
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.
|
PhyStats |
phyStats() |
Object containing a set of current, modified, usable, mostly numeric fields.
|
int |
pointsPerMove() |
Returns the number of movement points to move through this room.
|
Room |
prepareRoomInDir(Room R,
int direction) |
This method is called by an adjoining room to resolve this room to its
final object.
|
Room[] |
rawDoors() |
Returns array of the Raw room objects that this room connects to via
exits.
|
java.lang.String |
rawImage() |
Returns the raw name of the image file to display for this object when MXP is used.
|
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.
|
void |
recoverRoomStats() |
Causes the room stat affects to be reevaluated, as well as the stat affects
of every inhabitant, exit, and item in the room.
|
java.util.List<java.lang.Integer> |
resourceChoices() |
Returns a list of all resource codes for potentially gatherable resources in this room.
|
java.lang.String |
roomID() |
The room ID is the "address" of the room on the world map.
|
boolean |
sameAs(Environmental E) |
Whether this object instance is functionally identical to the object passed in.
|
java.util.Enumeration<ScriptingEngine> |
scripts() |
Returns an enumerator of all the scripts on this object.
|
void |
send(MOB source,
CMMsg msg) |
Sends the message to the given source, then to the room, and then
handles any trailing messages.
|
protected void |
sendAndExec(MOB source,
CMMsg msg) |
|
void |
sendOthers(MOB source,
CMMsg msg) |
Sends the message to the room, skipping the given source, and then
handles any trailing messages.
|
protected void |
sendTrailermsgs(MOB source,
CMMsg msg,
int depth,
boolean includeSource) |
|
void |
setArea(Area newArea) |
Sets the Area to which this room should belong, which also notifies the Area
object that this room is a new member, and removing itself from any previous
Area it belonged to in the past.
|
void |
setAtmosphere(int resourceCode) |
Sets the resource (or -1) that represents the atmosphere of this area.
|
void |
setBasePhyStats(PhyStats newStats) |
Re-sets the object containing a set of base, unmodified, mostly numeric fields.
|
void |
setClimateType(int climask) |
Returns a bitmap of climate flags for this area which will be used to influence
the weather for the area in addition to season and other factors.
|
void |
setCombatTurnMobIndex(int index) |
Sets the index number which represents which mob's "turn" it is in combat.
|
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 |
setExpirationDate(long time) |
If this object expires, it should have a timestamp saying when it expires, in real time.
|
void |
setGridParent(GridLocale room) |
If this room is a grid-child room, this method is called to notify this child
as to the identity of its parent gridlocale room.
|
void |
setImage(java.lang.String newImage) |
Sets the raw name of the image file to display for this object when MXP is used.
|
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.
|
protected void |
setMovementCost(int newCost) |
|
void |
setName(java.lang.String newName) |
Sets the raw unmodified name of this object as stored in the database.
|
void |
setRawDoor(int direction,
Room R) |
Sets the Room link from in this room to the other
in the given direction.
|
void |
setRawExit(int direction,
Exit to) |
Sets the Exit object found in this room in the given direction.
|
void |
setResource(int resourceCode) |
Sets the full resource code for the current gatherable resource in this room.
|
void |
setRoomID(java.lang.String newID) |
Changes the room ID of this room.
|
protected void |
setRoomSize(int newSize) |
|
void |
setSavable(boolean truefalse) |
Sets whether this object can be saved as a permanent aspect of
its host.
|
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.
|
boolean |
show(MOB source,
Environmental target,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls send to send the message.
|
boolean |
show(MOB source,
Environmental target,
Environmental tool,
int srcCode,
int tarCode,
int othCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls send to send the message.
|
boolean |
show(MOB source,
Environmental target,
Environmental tool,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls send to send the message.
|
boolean |
show(MOB source,
Environmental target,
Environmental tool,
int srcCode,
java.lang.String srcMessage,
int tarCode,
java.lang.String tarMessage,
int othCode,
java.lang.String othMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls send to send the message.
|
boolean |
show(MOB source,
Environmental target,
Environmental tool,
int allCode,
java.lang.String srcMessage,
java.lang.String tarMessage,
java.lang.String othMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls send to send the message.
|
void |
showHappens(int allCode,
Environmental like,
java.lang.String allMessage) |
Constructs a message with the given allCode as the source, target, and others message
code, and the given allMessage as the source, target, and others message, and using
a temporary fake agent/source for the message whose name is the same as the given
"like" Environmental, immediately sends the message without previewing it.
|
void |
showHappens(int allCode,
java.lang.String allMessage) |
Constructs a message with the given allCode as the source, target, and others message
code, and the given allMessage as the source, target, and others message, and using
a temporary fake agent/source for the message, immediately sends the message without
previewing it.
|
boolean |
showOthers(MOB source,
Environmental target,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls sendOthers to send the message.
|
boolean |
showOthers(MOB source,
Environmental target,
Environmental tool,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls sendOthers to send the message.
|
boolean |
showSource(MOB source,
Environmental target,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls executeMsg on the given source mob.
|
boolean |
showSource(MOB source,
Environmental target,
Environmental tool,
int allCode,
java.lang.String allMessage) |
Creates and configures a CMMsg object for use in the room, then, if the
message is not flagged for ALWAYS approval, this method submits
it for approval by calling okMessage on the room, and if it is approved,
calls executeMsg on the given source mob.
|
void |
startItemRejuv() |
When a room is created, this method is called to inspect the item contents
for any rejuvinating items and, if found, causes them to start being tracked.
|
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.
|
int |
thirstPerRound() |
Returns the amount of thirst generated by moving through this room.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
void |
toggleMobility(boolean onoff) |
Sets or clears whether any mobs in this room may, in fact, leave it.
|
protected java.lang.String _roomID
protected java.lang.String name
protected java.lang.String displayText
protected java.lang.String rawImageName
protected java.lang.String cachedImageName
protected java.lang.Object description
protected Area myArea
protected PhyStats phyStats
protected PhyStats basePhyStats
protected Exit[] exits
protected Room[] doors
protected java.lang.String[] xtraValues
protected boolean mobility
protected GridLocale gridParent
protected int tickStatus
protected long expirationDate
protected int atmosphere
protected int climask
protected int myResource
protected long lastResourceTime
protected boolean amDestroyed
protected boolean skyedYet
protected volatile short combatTurnMobIndex
protected final java.util.concurrent.atomic.AtomicInteger roomRecoverMarker
protected SVector<ScriptingEngine> scripts
protected Room me
protected EachApplicable.ApplyAffectPhyStats affectPhyStats
protected static final java.lang.String[] STDCODES
public java.lang.String ID()
CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public java.lang.String roomID()
Room
GridLocale
) in particular may
have an address, if the GridLocale is, itself, a primary room, but
still have an empty roomID. This is not related to the ID()
method.roomID
in interface Room
Room.setRoomID(String)
public java.lang.String Name()
Environmental
Name
in interface Environmental
Tickable.name()
public void setName(java.lang.String newName)
Environmental
setName
in interface Environmental
newName
- the raw base name of this object on the map.Environmental.Name()
public java.lang.String name()
Tickable
name
in interface CMObject
name
in interface Tickable
Environmental.Name()
public java.lang.String name(MOB viewerMob)
Physical
name
in interface Physical
viewerMob
- the mob viewing the physical thingTickable.name()
public java.lang.String genericName()
Physical
genericName
in interface Physical
protected void setMovementCost(int newCost)
protected int getMovementCost()
protected void setRoomSize(int newSize)
protected int getRoomSize()
public int getAtmosphereCode()
Places
getAtmosphereCode
in interface Places
RawMaterial.MATERIAL_GAS
public void setAtmosphere(int resourceCode)
Places
setAtmosphere
in interface Places
resourceCode
- the RawMaterial resource to useRawMaterial.MATERIAL_GAS
public int getAtmosphere()
Places
getAtmosphere
in interface Places
RawMaterial.MATERIAL_GAS
public java.lang.String image()
Environmental
image
in interface Environmental
public java.lang.String rawImage()
Environmental
rawImage
in interface Environmental
public void setImage(java.lang.String newImage)
Environmental
setImage
in interface Environmental
newImage
- the raw name of the mxp image filepublic boolean isGeneric()
Environmental
isGeneric
in interface Environmental
Environmental.text()
protected void cloneFix(Room R)
public CMObject copyOf()
CMObject
public int domainType()
Room
domainType
in interface Room
Room.INDOORS
,
Room.DOMAIN_INDOORS_CAVE
,
Room.DOMAIN_INDOORS_DESCS
,
Room.DOMAIN_OUTDOORS_CITY
,
Room.DOMAIN_OUTDOOR_DESCS
public int getClimateTypeCode()
Places
getClimateTypeCode
in interface Places
Places.CLIMASK_COLD
public void setClimateType(int climask)
Places
setClimateType
in interface Places
climask
- a CLIMASK bitmapPlaces.CLIMASK_COLD
public int getClimateType()
Places
getClimateType
in interface Places
Places.CLIMASK_COLD
public long expirationDate()
Expireable
expirationDate
in interface Expireable
Expireable.setExpirationDate(long)
public void setExpirationDate(long time)
Expireable
setExpirationDate
in interface Expireable
time
- the time stamp when this thing expiresExpireable.expirationDate()
public void setRawExit(int direction, Exit to)
Room
setRawExit
in interface Room
direction
- the direction in this room to look for an exit into
- the raw Exit object in that direction, or nullRoom.getRawDoor(int)
,
Room.setRawDoor(int, Room)
,
Room.getRawExit(int)
,
Room.getExitInDir(int)
,
Room.getReverseExit(int)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public java.lang.String displayText()
Environmental
displayText
in interface Environmental
public void setDisplayText(java.lang.String newDisplayText)
Environmental
setDisplayText
in interface Environmental
newDisplayText
- the string describing how this object looks in the roompublic java.lang.String description()
Environmental
description
in interface Environmental
public void setDescription(java.lang.String newDescription)
Environmental
setDescription
in interface Environmental
newDescription
- the basic detail description of this objectpublic java.lang.String text()
Environmental
text
in interface Environmental
public java.lang.String miscTextFormat()
Environmental
miscTextFormat
in interface Environmental
CMParms
,
Environmental.text()
,
Environmental.setMiscText(String)
public void setMiscText(java.lang.String newMiscText)
Environmental
setMiscText
in interface Environmental
newMiscText
- either an open internal text string, or XMLpublic void setRoomID(java.lang.String newID)
Room
GridLocale
) in particular may
have an address, if the GridLocale is, itself, a primary room, but
still have an empty roomID.setRoomID
in interface Room
newID
- the new room ID of this roomRoom.roomID()
public Area getArea()
Room
getArea
in interface Room
Room.setArea(Area)
,
Area
public void setArea(Area newArea)
Room
setArea
in interface Room
newArea
- the new area that this room belongs roArea
,
Room.getArea()
public void setGridParent(GridLocale room)
Room
setGridParent
in interface Room
room
- the GridLocale parent room to this roomRoom.getGridParent()
,
GridLocale
public GridLocale getGridParent()
Room
getGridParent
in interface Room
Room.setGridParent(GridLocale)
,
GridLocale
public void giveASky(int depth)
Room
giveASky
in interface Room
depth
- the diameter of the sky or underwater to createRoom.clearSky()
,
Room.getSky()
public java.util.List<Room> getSky()
Room
getSky
in interface Room
Room.clearSky()
,
Room.getSky()
public void clearSky()
Room
clearSky
in interface Room
Room.giveASky(int)
,
Room.getSky()
public java.util.List<java.lang.Integer> resourceChoices()
Room
resourceChoices
in interface Room
RawMaterial
,
RawMaterial.CODES
,
Room.myResource()
,
Room.setResource(int)
public void setResource(int resourceCode)
Room
setResource
in interface Room
resourceCode
- the full resource code for the current gatherable resource in this roomRawMaterial
,
RawMaterial.CODES
,
Room.myResource()
,
Room.resourceChoices()
public int myResource()
Room
myResource
in interface Room
RawMaterial
,
RawMaterial.CODES
,
Room.setResource(int)
,
Room.resourceChoices()
public void toggleMobility(boolean onoff)
Room
toggleMobility
in interface Room
onoff
- true to allow mobility, false to disallow mobilitypublic boolean getMobility()
Room
getMobility
in interface Room
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executedCMMsg
,
CMMsg.source()
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public void startItemRejuv()
Room
startItemRejuv
in interface Room
public int getTickStatus()
Tickable
getTickStatus
in interface Tickable
Tickable.tick(Tickable, int)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public PhyStats phyStats()
Affectable
phyStats
in interface Affectable
Affectable.basePhyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public PhyStats basePhyStats()
Affectable
basePhyStats
in interface Affectable
Affectable.phyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public void recoverPhyStats()
Affectable
recoverPhyStats
in interface Affectable
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.addEffect(Ability)
,
Behavable.addBehavior(Behavior)
,
PhyStats
public void recoverRoomStats()
Room
recoverRoomStats
in interface Room
Affectable.recoverPhyStats()
,
MOB.recoverCharStats()
public void setBasePhyStats(PhyStats newStats)
Affectable
setBasePhyStats
in interface Affectable
newStats
- a set of state fieldsAffectable.phyStats()
,
Affectable.recoverPhyStats()
,
PhyStats
public void affectPhyStats(Physical affected, PhyStats affectableStats)
StatsAffecting
affectPhyStats
in interface StatsAffecting
affected
- the host of the PhyStats object being affectedaffectableStats
- the particular PhyStats object being affectedPhyStats
,
Environmental
,
Affectable.basePhyStats()
,
Affectable.phyStats()
,
Affectable.recoverPhyStats()
public void affectCharStats(MOB affectedMob, CharStats affectableStats)
StatsAffecting
affectCharStats
in interface StatsAffecting
affectedMob
- the host of the CharStats object being affectedaffectableStats
- the particular CharStats object being affectedCharStats
,
MOB
,
MOB.baseCharStats()
,
MOB.charStats()
,
MOB.recoverCharStats()
public void affectCharState(MOB affectedMob, CharState affectableMaxState)
StatsAffecting
affectCharState
in interface StatsAffecting
affectedMob
- the host of the CharState object being affectedaffectableMaxState
- the particular CharState object being affectedCharState
,
MOB
,
MOB.baseState()
,
MOB.curState()
,
MOB.recoverMaxState()
public int compareTo(CMObject o)
compareTo
in interface java.lang.Comparable<CMObject>
public java.lang.String displayText(MOB mob)
Physical
displayText
in interface Physical
mob
- the mob viewing the physical thingEnvironmental.displayText()
public java.lang.String description(MOB mob)
Physical
description
in interface Physical
mob
- the mob viewing the physical thingEnvironmental.description()
public void bringMobHere(MOB mob, boolean andFollowers)
Room
bringMobHere
in interface Room
mob
- the mob to move from where he is, to hereandFollowers
- true to include followers, false otherwiseRoom.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.inhabitants()
,
Room.numPCInhabitants()
,
Room.numInhabitants()
,
Room.eachInhabitant(EachApplicable)
public void moveItemTo(Item container)
ItemPossessor
moveItemTo
in interface ItemPossessor
container
- the item to addItemPossessor.Expire
public void moveItemTo(Item item, ItemPossessor.Expire expire, ItemPossessor.Move... moveFlags)
ItemPossessor
moveItemTo
in interface ItemPossessor
item
- the item to addexpire
- the expiration codemoveFlags
- any flags related to the moveItemPossessor.Expire
public int getReverseDir(int direction)
Room
getReverseDir
in interface Room
direction
- the direction from this room to get the reverse dir forRoom.getRawExit(int)
,
Room.getExitInDir(int)
,
Room.setRawExit(int, Exit)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
public Exit getReverseExit(int direction)
Room
getReverseExit
in interface Room
direction
- the direction from this room to get the reverse exit forRoom.getRawExit(int)
,
Room.getExitInDir(int)
,
Room.setRawExit(int, Exit)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public Exit getPairedExit(int direction)
Room
getPairedExit
in interface Room
direction
- the direction from this room to get the reverse exit forRoom.getRawExit(int)
,
Room.getExitInDir(int)
,
Room.setRawExit(int, Exit)
,
Room.getReverseExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public Room prepareRoomInDir(Room R, int direction)
Room
prepareRoomInDir
in interface Room
R
- the room being traveled fromdirection
- the direction from the fromRoom being travelled inpublic Room getRoomInDir(int direction)
Room
getRoomInDir
in interface Room
direction
- the Direction from this room to the nextDirections
,
Room.prepareRoomInDir(Room, int)
,
Room.getRawExit(int)
public Exit getExitInDir(int direction)
Room
getExitInDir
in interface Room
direction
- the direction from this room to get the exit forRoom.getRawExit(int)
,
Room.getPairedExit(int)
,
Room.setRawExit(int, Exit)
,
Room.getReverseExit(int)
,
Room.fetchExit(String)
,
Exit
protected void sendTrailermsgs(MOB source, CMMsg msg, int depth, boolean includeSource)
public void send(MOB source, CMMsg msg)
Room
send
in interface Room
source
- the first receiver of the message, typically the agent/source.msg
- the message to sendRoom.sendOthers(MOB, CMMsg)
,
Room.show(MOB, Environmental, Environmental, int, String, int, String, int, String)
,
CMMsg
public void sendOthers(MOB source, CMMsg msg)
Room
sendOthers
in interface Room
source
- the NON-receiver of the message, typically the agent/source.msg
- the message to sendRoom.send(MOB, CMMsg)
,
Room.show(MOB, Environmental, Environmental, int, String, int, String, int, String)
,
CMMsg
public void showHappens(int allCode, java.lang.String allMessage)
Room
showHappens
in interface Room
allCode
- the source/target/others message codeallMessage
- source/target/others message descriptionCMMsg
,
Room.show(MOB, Environmental, Environmental, int, String)
,
Room.showHappens(int, Environmental, String)
,
Room.send(MOB, CMMsg)
,
Room.show(MOB, Environmental, Environmental, int, String, int, String, int, String)
public void showHappens(int allCode, Environmental like, java.lang.String allMessage)
Room
showHappens
in interface Room
allCode
- the source/target/others message codelike
- the Environmental object to make the source/agent "look" like.allMessage
- source/target/others message descriptionCMMsg
,
Room.show(MOB, Environmental, Environmental, int, String)
,
Room.showHappens(int, Environmental, String)
,
Room.send(MOB, CMMsg)
,
Room.show(MOB, Environmental, Environmental, int, String, int, String, int, String)
public boolean show(MOB source, Environmental target, int allCode, java.lang.String allMessage)
Room
show
in interface Room
source
- the agent source of the actiontarget
- the target of the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendRoom.send(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public boolean show(MOB source, Environmental target, Environmental tool, int allCode, java.lang.String allMessage)
Room
show
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendRoom.send(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public boolean show(MOB source, Environmental target, Environmental tool, int srcCode, int tarCode, int othCode, java.lang.String allMessage)
Room
show
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionsrcCode
- the source code for this actiontarCode
- the target code for this actionothCode
- the others/observed code for this actionallMessage
- the source, target, and others string msg to sendRoom.send(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.targetCode()
,
CMMsg.othersCode()
,
CMMsg.sourceMessage()
public boolean show(MOB source, Environmental target, Environmental tool, int allCode, java.lang.String srcMessage, java.lang.String tarMessage, java.lang.String othMessage)
Room
show
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionallCode
- the source, target, and others code to usesrcMessage
- the action/message as seen by the sourcetarMessage
- the action/message as seen by the targetothMessage
- the action/message as seen by everyone elseRoom.send(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
,
CMMsg.targetMessage()
,
CMMsg.othersMessage()
public boolean show(MOB source, Environmental target, Environmental tool, int srcCode, java.lang.String srcMessage, int tarCode, java.lang.String tarMessage, int othCode, java.lang.String othMessage)
Room
show
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionsrcCode
- the source code for this actionsrcMessage
- the action/message as seen by the sourcetarCode
- the target code for this actiontarMessage
- the action/message as seen by the targetothCode
- the others/observed code for this actionothMessage
- the action/message as seen by everyone elseRoom.send(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.targetCode()
,
CMMsg.othersCode()
,
CMMsg.sourceMessage()
,
CMMsg.targetMessage()
,
CMMsg.othersMessage()
public boolean showOthers(MOB source, Environmental target, int allCode, java.lang.String allMessage)
Room
showOthers
in interface Room
source
- the agent source of the actiontarget
- the target of the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendRoom.sendOthers(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public boolean showOthers(MOB source, Environmental target, Environmental tool, int allCode, java.lang.String allMessage)
Room
showOthers
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendRoom.sendOthers(MOB, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.tool()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public boolean showSource(MOB source, Environmental target, int allCode, java.lang.String allMessage)
Room
showSource
in interface Room
source
- the agent source of the actiontarget
- the target of the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendMsgListener.executeMsg(Environmental, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public boolean showSource(MOB source, Environmental target, Environmental tool, int allCode, java.lang.String allMessage)
Room
showSource
in interface Room
source
- the agent source of the actiontarget
- the target of the actiontool
- the tool used by the source to do the actionallCode
- the source, target, and others code to useallMessage
- the source, target, and others string msg to sendMsgListener.executeMsg(Environmental, CMMsg)
,
MsgListener.okMessage(Environmental, CMMsg)
,
CMMsg.source()
,
CMMsg.target()
,
CMMsg.sourceCode()
,
CMMsg.sourceMessage()
public Exit getRawExit(int dir)
Room
Room.getExitInDir(int)
if you want the final
Exit object in the given direction. This method returns null if
there is no exit in the given direction.getRawExit
in interface Room
dir
- the direction in this room to look for an exit inRoom.getRawDoor(int)
,
Room.setRawDoor(int, Room)
,
Room.setRawExit(int, Exit)
,
Room.getExitInDir(int)
,
Room.getReverseExit(int)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public Room[] rawDoors()
Room
Room.getRoomInDir(int)
if you want a proper Room
object.
These rooms are indexed by Direction code.rawDoors
in interface Room
Directions
,
Room.prepareRoomInDir(Room, int)
,
Room.getRawExit(int)
public Room getRawDoor(int direction)
Room
Room.getRoomInDir(int)
if you want the final
Room link in the given direction. This method returns null if
there is no link in the given direction.getRawDoor
in interface Room
direction
- the direction in this room to look for an exit inRoom.setRawDoor(int, Room)
,
Room.setRawExit(int, Exit)
,
Room.getExitInDir(int)
,
Room.getReverseExit(int)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public void setRawDoor(int direction, Room R)
Room
setRawDoor
in interface Room
direction
- the direction in this room to look for an exit inR
- the Room link in that direction, or nullRoom.getRawDoor(int)
,
Room.getRawExit(int)
,
Room.getExitInDir(int)
,
Room.getReverseExit(int)
,
Room.getPairedExit(int)
,
Room.fetchExit(String)
,
Directions
,
Exit
public boolean isSavable()
Contingent
isSavable
in interface Contingent
public void setSavable(boolean truefalse)
Contingent
setSavable
in interface Contingent
truefalse
- whether this behavior can be saved as part of its host.Contingent.isSavable()
public void destroy()
Contingent
destroy
in interface Contingent
public final boolean amDestroyed()
Contingent
amDestroyed
in interface Contingent
public int getCombatTurnMobIndex()
Room
getCombatTurnMobIndex
in interface Room
public void setCombatTurnMobIndex(int index)
Room
setCombatTurnMobIndex
in interface Room
index
- the index number which represents which mob's "turn" it is in combatpublic boolean isHere(Environmental E)
Room
public MOB fetchRandomInhabitant()
Room
fetchRandomInhabitant
in interface Room
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.isInhabitant(MOB)
,
Room.delAllInhabitants(boolean)
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public MOB fetchInhabitant(java.lang.String inhabitantID)
Room
fetchInhabitant
in interface Room
inhabitantID
- the name, id, or keyword to search forRoom.fetchInhabitants(String)
,
Room.fetchInhabitantExact(String)
,
Room.fetchInhabitant(int)
,
Room.fetchRandomInhabitant()
,
Room.inhabitants()
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public MOB fetchInhabitantExact(java.lang.String inhabitantID)
Room
fetchInhabitantExact
in interface Room
inhabitantID
- the name, id, or keyword to search forRoom.fetchInhabitants(String)
,
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchRandomInhabitant()
,
Room.inhabitants()
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public java.util.List<MOB> fetchInhabitants(java.lang.String inhabitantID)
Room
fetchInhabitants
in interface Room
inhabitantID
- the name, id, or keyword to search forRoom.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchRandomInhabitant()
,
Room.inhabitants()
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.delAllInhabitants(boolean)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public void addInhabitant(MOB mob)
Room
addInhabitant
in interface Room
mob
- the mob to add to this roomMOB.setLocation(Room)
,
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public java.util.Enumeration<MOB> inhabitants()
Room
inhabitants
in interface Room
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public int numInhabitants()
Room
numInhabitants
in interface Room
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.inhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public int numPCInhabitants()
Room
numPCInhabitants
in interface Room
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.addInhabitant(MOB)
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.inhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numInhabitants()
,
Room.eachInhabitant(EachApplicable)
public boolean isInhabitant(MOB mob)
Room
isInhabitant
in interface Room
mob
- the mob to look forRoom.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.addInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public MOB fetchInhabitant(int i)
Room
fetchInhabitant
in interface Room
i
- the index of the mobRoom.fetchInhabitant(String)
,
Room.fetchRandomInhabitant()
,
Room.fetchInhabitants(String)
,
Room.isInhabitant(MOB)
,
Room.delAllInhabitants(boolean)
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public void eachInhabitant(EachApplicable<MOB> applier)
Room
eachInhabitant
in interface Room
applier
- code to execute against each objectRoom.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.delAllInhabitants(boolean)
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.addInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.isInhabitant(MOB)
public void delInhabitant(MOB mob)
Room
delInhabitant
in interface Room
mob
- the mob to remove from this roomMOB.setLocation(Room)
,
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.inhabitants()
,
Room.addInhabitant(MOB)
,
Room.delAllInhabitants(boolean)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public void delAllInhabitants(boolean destroy)
Room
delAllInhabitants
in interface Room
destroy
- true to also destroy the mob objects, false otherwiseMOB.setLocation(Room)
,
Room.fetchInhabitant(String)
,
Room.fetchInhabitant(int)
,
Room.fetchInhabitants(String)
,
Room.fetchRandomInhabitant()
,
Room.inhabitants()
,
Room.delInhabitant(MOB)
,
Room.addInhabitant(MOB)
,
Room.isInhabitant(MOB)
,
Room.numInhabitants()
,
Room.bringMobHere(MOB, boolean)
,
Room.numPCInhabitants()
,
Room.eachInhabitant(EachApplicable)
public Exit fetchExit(java.lang.String itemID)
Room
fetchExit
in interface Room
itemID
- the name or substring of the exit to returnRoom.getRawExit(int)
,
Room.getPairedExit(int)
,
Room.setRawExit(int, Exit)
,
Room.getReverseExit(int)
,
Room.getExitInDir(int)
,
Exit
public Item findItem(java.lang.String itemID)
ItemCollection
findItem
in interface ItemCollection
itemID
- the name or partial name of the item to fetchpublic java.util.Enumeration<Item> items()
ItemCollection
items
in interface ItemCollection
public java.util.Enumeration<Item> itemsRecursive()
Room
itemsRecursive
in interface Room
public Item findItem(Item goodLocation, java.lang.String itemID)
ItemCollection
findItem
in interface ItemCollection
goodLocation
- the container to look in, or null for noneitemID
- the name or partial name of the item to fetchpublic java.util.List<Item> findItems(Item goodLocation, java.lang.String itemID)
ItemCollection
findItems
in interface ItemCollection
goodLocation
- the container to look in, or null for noneitemID
- the name or partial name of the item to fetchpublic java.util.List<Item> findItems(java.lang.String itemID)
ItemCollection
findItems
in interface ItemCollection
itemID
- the name or partial name of the item to fetchpublic void addItem(Item item, ItemPossessor.Expire expire)
ItemPossessor
addItem
in interface ItemPossessor
item
- the item to addexpire
- the expiration argument to decide when it will get cleaned upItemPossessor.Expire
protected void insertItemUpTop(Item item)
public void addItem(Item item)
ItemCollection
addItem
in interface ItemCollection
item
- the item to addItemCollection.delItem(Item)
public void delItem(Item item)
ItemCollection
delItem
in interface ItemCollection
item
- the item to removepublic void delAllItems(boolean destroy)
ItemCollection
delAllItems
in interface ItemCollection
destroy
- true to also destroy the itemspublic int numItems()
ItemCollection
numItems
in interface ItemCollection
public boolean isContent(Item item)
ItemCollection
isContent
in interface ItemCollection
item
- the item to checkpublic Item getItem(int i)
ItemCollection
getItem
in interface ItemCollection
i
- the index of the itempublic void eachItem(EachApplicable<Item> applier)
ItemCollection
eachItem
in interface ItemCollection
applier
- code to execute against each objectpublic Item getRandomItem()
ItemCollection
getRandomItem
in interface ItemCollection
public java.lang.String getContextName(Environmental E)
ItemPossessor
getContextName
in interface ItemPossessor
E
- the mob or item to return a search string forpublic PhysicalAgent fetchFromMOBRoomItemExit(MOB mob, Item goodLocation, java.lang.String thingName, Filterer<Environmental> filter)
Room
fetchFromMOBRoomItemExit
in interface Room
mob
- the mob to search the inventory of first, or null to skipgoodLocation
- the container to look in for items, or nullthingName
- the search stringfilter
- a required filter for item searchespublic PhysicalAgent fetchFromRoomFavorItems(Item goodLocation, java.lang.String thingName)
Room
fetchFromRoomFavorItems
in interface Room
goodLocation
- the container to look in for items, or nullthingName
- the search stringpublic PhysicalAgent fetchFromRoomFavorExits(java.lang.String thingName)
Room
fetchFromRoomFavorExits
in interface Room
thingName
- the search stringpublic PhysicalAgent fetchFromRoomFavorMOBs(Item goodLocation, java.lang.String thingName)
Room
fetchFromRoomFavorMOBs
in interface Room
goodLocation
- the container to look in for items, or nullthingName
- the search stringpublic PhysicalAgent fetchFromMOBRoomFavorsItems(MOB mob, Item goodLocation, java.lang.String thingName, Filterer<Environmental> filter)
Room
fetchFromMOBRoomFavorsItems
in interface Room
mob
- the mob to search the inventory of first, or null to skipgoodLocation
- the container to look in for items, or nullthingName
- the search stringfilter
- a required filter for item searchespublic PhysicalAgent fetchFromMOBRoomFavorsMOBs(MOB mob, Item goodLocation, java.lang.String thingName, Filterer<Environmental> filter)
Room
fetchFromMOBRoomFavorsMOBs
in interface Room
mob
- the mob to search the inventory of first, or null to skipgoodLocation
- the container to look in for items, or nullthingName
- the search stringfilter
- a required filter for item searchespublic int pointsPerMove()
Room
pointsPerMove
in interface Room
protected int baseThirst()
public int thirstPerRound()
Room
thirstPerRound
in interface Room
public int minRange()
Environmental
minRange
in interface Environmental
public int maxRange()
Room
maxRange
in interface Environmental
maxRange
in interface Room
public void addEffect(Ability to)
Affectable
addEffect
in interface Affectable
to
- The ability object to add as an effect.Ability
,
Affectable.recoverPhyStats()
public void addNonUninvokableEffect(Ability to)
Affectable
addNonUninvokableEffect
in interface Affectable
to
- The ability object to add as an effect.Ability
,
Affectable.recoverPhyStats()
public void delEffect(Ability to)
Affectable
delEffect
in interface Affectable
to
- The ability object to remove as an effect on this objectAbility
,
Affectable.recoverPhyStats()
public void eachEffect(EachApplicable<Ability> applier)
Affectable
eachEffect
in interface Affectable
applier
- code to execute against each objectpublic void delAllEffects(boolean unInvoke)
Affectable
delAllEffects
in interface Affectable
unInvoke
- send true to uninvoke before deletingpublic int numEffects()
Affectable
numEffects
in interface Affectable
Ability
public java.util.Enumeration<Ability> effects()
Affectable
effects
in interface Affectable
Ability
public Ability fetchEffect(int index)
Affectable
fetchEffect
in interface Affectable
index
- which object to returnAbility
,
Affectable.numEffects()
public Ability fetchEffect(java.lang.String ID)
Affectable
fetchEffect
in interface Affectable
ID
- the Ability ID to look for in effectsAbility
,
CMObject.ID()
public void addBehavior(Behavior to)
addBehavior
in interface Behavable
to
- The behavior object to add.Behavior
,
Affectable.recoverPhyStats()
public void delBehavior(Behavior to)
Behavable
delBehavior
in interface Behavable
to
- The behavior object to remove.Behavior
,
Affectable.recoverPhyStats()
public void delAllBehaviors()
Behavable
delAllBehaviors
in interface Behavable
public int numBehaviors()
Behavable
numBehaviors
in interface Behavable
Behavior
public java.util.Enumeration<Behavior> behaviors()
Behavable
public Behavior fetchBehavior(int index)
Behavable
fetchBehavior
in interface Behavable
index
- which object to returnBehavior
,
Behavable.numBehaviors()
public Behavior fetchBehavior(java.lang.String ID)
Behavable
fetchBehavior
in interface Behavable
ID
- the Behavior ID to look forBehavior
,
CMObject.ID()
public void eachBehavior(EachApplicable<Behavior> applier)
Behavable
eachBehavior
in interface Behavable
applier
- code to execute against each objectpublic void addScript(ScriptingEngine S)
addScript
in interface Behavable
S
- the scripting engine, fully populated, to addScriptingEngine
public void delScript(ScriptingEngine S)
Behavable
delScript
in interface Behavable
S
- the specific scripting engine to removeScriptingEngine
public void delAllScripts()
Behavable
delAllScripts
in interface Behavable
public int numScripts()
Behavable
numScripts
in interface Behavable
public java.util.Enumeration<ScriptingEngine> scripts()
Behavable
scripts
in interface Behavable
ScriptingEngine
public ScriptingEngine fetchScript(int x)
Behavable
fetchScript
in interface Behavable
x
- which script to returnScriptingEngine
public void eachScript(EachApplicable<ScriptingEngine> applier)
Behavable
eachScript
in interface Behavable
applier
- code to execute against each objectpublic java.lang.String L(java.lang.String str, java.lang.String... xs)
Environmental
L
in interface Environmental
str
- the string to translatexs
- the array of variables to replaceCall with the string to translate, which may contain variables of the form @x1, @x2, etc. The array in xs
is then used to replace the variables AFTER the string is translated.
public int getSaveStatIndex()
Modifiable
getSaveStatIndex
in interface Modifiable
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
protected int getCodeNum(java.lang.String code)
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public boolean sameAs(Environmental E)
Environmental
sameAs
in interface Environmental
E
- the object to compare this one toModifiable.getStatCodes()
,
Modifiable.getStat(String)