com.planet_ink.coffee_mud.Areas
Class StdArea

java.lang.Object
  extended by com.planet_ink.coffee_mud.Areas.StdArea
All Implemented Interfaces:
Area, Affectable, Behavable, CMObject, Contingent, Economics, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, Places, StatsAffecting, Tickable, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
StdAutoGenInstance, StdGridArea, StdThinArea, StdTimeZone

public class StdArea
extends java.lang.Object
implements Area


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.Area
Area.AreaInstanceChild, Area.CompleteRoomEnumerator, Area.RoomComparator, Area.RoomIDComparator, Area.RoomIDEnumerator, Area.State, Area.Stats
 
Field Summary
protected  SVector<Ability> affects
           
protected  boolean amDestroyed
           
protected  java.lang.String archPath
           
protected  int atmosphere
           
protected  java.lang.String author
           
protected  PhyStats basePhyStats
           
protected  SVector<Behavior> behaviors
           
protected  STreeMap<java.lang.String,java.lang.String> blurbFlags
           
protected  java.lang.String budget
           
protected  SLinkedList<Area> children
           
protected  int climask
           
protected  Climate climateObj
           
protected  java.lang.String currency
           
protected  int derivedAtmo
           
protected  int derivedClimate
           
protected  int derivedTheme
           
protected  java.lang.String description
           
protected  double[] devalueRate
           
protected static java.lang.String[] empty
           
protected static int[] emptyStats
           
protected  long expirationDate
           
protected  Area.State flag
           
protected  java.lang.String ignoreMask
           
protected  java.lang.String imageName
           
protected  int invResetRate
           
protected  java.lang.String[] itemPricingAdjustments
           
protected  long lastPlayerTime
           
protected  Area me
           
protected  RoomnumberSet metroRoomIDSet
           
protected  java.lang.String miscText
           
protected  TimeClock myClock
           
protected  java.lang.String name
           
protected  SLinkedList<Area> parents
           
protected  PhyStats phyStats
           
protected  int playerLevel
           
protected  java.lang.String prejudiceFactors
           
protected  RoomnumberSet properRoomIDSet
           
protected  STreeMap<java.lang.String,Room> properRooms
           
protected  SVector<ScriptingEngine> scripts
           
protected static java.lang.String[] STDAREACODES
           
protected  SVector<java.lang.String> subOps
           
protected  int theme
           
protected  int tickStatus
           
protected  java.lang.String[] xtraValues
           
 
Fields inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.Area
FLAG_INSTANCE_CHILD, FLAG_INSTANCE_PARENT, FLAG_THIN, THEME_ALLTHEMES, THEME_BIT_NAMES, THEME_FANTASY, THEME_HEROIC, THEME_INHERIT, THEME_NAMES, THEME_PHRASE, THEME_PHRASE_EXT, THEME_SKILLONLYMASK, THEME_TECHNOLOGY, TIME_PASSIVE_LAPSE
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Places
ALL_CLIMATE_MASK, ATMOSPHERE_INHERIT, CLIMASK_COLD, CLIMASK_DRY, CLIMASK_HOT, CLIMASK_INHERIT, CLIMASK_NORMAL, CLIMASK_WET, CLIMASK_WINDY, CLIMATE_DESCS, NUM_CLIMATES
 
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
 
Constructor Summary
StdArea()
           
 
Method Summary
 void addBehavior(Behavior to)
          Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc.
 void addBlurbFlag(java.lang.String flagPlusDesc)
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 void addChild(Area area)
          Designates the given Area object as a Child of this one.
 void addEffect(Ability to)
          Add a new effect to this object, whether permanent or temporary.
 void addMetroRoom(Room R)
          Designates that a given Room object belongs to one of this areas children.
 void addMetroRoomnumber(java.lang.String roomID)
          Designates that a given roomid represents a room which belongs to one of this areas children.
 void addNonUninvokableEffect(Ability to)
          Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked.
 void addParent(Area area)
          Designates the given Area object as a Parent of this one.
 void addProperRoom(Room R)
          This method adds a new Room to this area.
 void addProperRoomnumber(java.lang.String roomID)
          Designates that the given roomID belongs to this Area.
 void addScript(ScriptingEngine S)
          Manipulation of the scripts list
 void addSubOp(java.lang.String username)
          Adds a SubOp to this area.
 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.
 boolean amISubOp(java.lang.String username)
          Returns whether the given player name is a SubOp to this area.
 java.util.Enumeration<java.lang.String> areaBlurbFlags()
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 PhyStats basePhyStats()
          Object containing a set of base, unmodified, mostly numeric fields.
 java.util.Enumeration<Behavior> behaviors()
          Returns an enumerator of all the behaviors on this object.
 java.lang.String budget()
          Returns a description of the buying budget of the shopkeeper.
protected  void buildAreaIMobStats(int[] statData, long[] totalAlignments, Faction theFaction, java.util.List<java.lang.Integer> alignRanges, java.util.List<java.lang.Integer> levelRanges, MOB mob)
           
protected  int[] buildAreaIStats()
           
protected  java.lang.StringBuffer buildAreaStats(int[] statData)
           
 boolean canChild(Area area)
          Returns whether the Area named MAY BE designated as a child of this Area A Child Area inherets certain behaviors and property effects from its Parents
 boolean canParent(Area area)
          Returns whether the Area named MAY BE designated as a parent of this Area A Parent Area passes down certain behaviors and property effects to its children
protected  void cloneFix(StdArea areaA)
           
 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 delAllScripts()
          Removes all executing scripts from this object.
 void delBehavior(Behavior to)
          Delete a behavior from this object.
 void delBlurbFlag(java.lang.String flagOnly)
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 void delEffect(Ability to)
          Delete an effect from this object, whether permanent or temporary.
 void delMetroRoom(Room R)
          Designates that a given Room object no longer belongs to one of this areas children.
 void delMetroRoomnumber(java.lang.String roomID)
          Designates that a given roomid represents a room which no longer belongs to one of this areas children.
 void delProperRoom(Room R)
          This method removes an existing Room from this area.
 void delProperRoomnumber(java.lang.String roomID)
          Designates that the given roomID no longer belongs to this Area.
 void delScript(ScriptingEngine S)
          Remove a running script from this object.
 void delSubOp(java.lang.String username)
          Removes a SubOp to this area.
 java.lang.String description()
          The basic description of this object, as shown when the item is directly LOOKed at.
 java.lang.String description(MOB viewerMob)
          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 devalueRate()
          Returns a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 java.lang.String displayText()
          Gets the raw string used to show what this object looks like in the room.
 java.lang.String displayText(MOB viewerMob)
          Returns the displayText, but as seen by the given viewer.
 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 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.
 ScriptingEngine fetchScript(int x)
          Retrieve one of the enumerated scripts running on this object
 void fillInAreaRoom(Room R)
          This method causes a given room to have its run-time generated Skys to be re-generated.
 void fillInAreaRooms()
          This method causes all proper rooms within this area to have their run-time generated Skys to be re-generated.
protected  Pair<java.lang.Long,TimeClock.TimePeriod> finalAreaBudget(Area A)
           
protected  double[] finalAreaDevalueRate(Area A)
           
 Pair<java.lang.Long,TimeClock.TimePeriod> finalBudget()
          Returns a description of the buying budget of the shopkeeper.
 double[] finalDevalueRate()
          Returns a double array describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 java.lang.String finalIgnoreMask()
          Returns the mask used to determine if a customer is ignored by the ShopKeeper.
protected  java.lang.String finalIgnoreMask(Area A)
           
 int finalInvResetRate()
          Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
protected  int finalInvResetRate(Area A)
           
 java.lang.String[] finalItemPricingAdjustments()
          A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
protected  java.lang.String[] finalItemPricingAdjustments(Area A)
           
 java.lang.String finalPrejudiceFactors()
          A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
protected  java.lang.String finalPrejudiceFactors(Area A)
           
 long flags()
          Return basic attributed flag about the area.
 java.lang.String getArchivePath()
          Returns the coffeemud .cmare filename that will be used when the EXPORT command is used in such a way as to auto-generate filenames.
 int[] getAreaIStats()
          Returns an integer array of statistics about this area based on a snapshot generated the first time it is called.
 Area.State getAreaState()
          Area Flags, unlike flags, is a PURELY run-time set that changes depending upon how the engine is operating on this area or its content.
 java.lang.StringBuffer getAreaStats()
          Returns a descriptive list of statistics about this area based on a snapshot from getAreaIStats(), which is cached after being generated.
 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.
 java.lang.String getAuthorID()
          Returns the name of the author of this area, an arbitrary string
 java.lang.String getBlurbFlag(java.lang.String flag)
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 RoomnumberSet getCachedRoomnumbers()
          Returns a RoomnumberSet for all rooms that properly belong to this area, excluding those not yet loaded.
 Area getChild(java.lang.String named)
          Returns the named Child Area object for this Area A Child Area inherets certain behaviors and property effects from its Parents
 java.util.Enumeration<Area> getChildren()
          An enumerator list of Area objects representing the Children Areas of this Area.
protected  java.util.Iterator<Area> getChildrenIterator()
           
protected  java.util.Iterator<Area> getChildrenReverseIterator()
           
 Climate getClimateObj()
          Returns a reference to the Climate object that represents the current and future weather for 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)
           
 java.util.Enumeration<Room> getCompleteMap()
          This method is the same as getProperMap, except that it will load any Rooms that belong to the area but have not yet been loaded.
 java.lang.String getCurrency()
          Sets the default currency for this area, which will be referenced by shopkeepers, bankers, and other mobs.
 java.util.Enumeration<Room> getFilledCompleteMap()
          This method is the same as getFilledProperMap, except that it will load any Rooms that belong to the area but have not yet been loaded.
 java.util.Enumeration<Room> getFilledProperMap()
          Returns an enumerator for all previously loaded rooms that properly belongs to this area, along with their skys or underwater add-ons.
 java.util.Enumeration<Room> getMetroMap()
          Returns an enumerator for all previously loaded rooms that properly belongs to this area AND to any child areas.
 java.lang.String getNewRoomID(Room startRoom, int direction)
          Generates a new RoomID for a new Room in this area.
 Area getParent(java.lang.String named)
          Returns the named Parent Area object for this Area A Parent Area passes down certain behaviors and property effects to its children
 java.util.Enumeration<Area> getParents()
          An enumerator list of Area objects representing the Parent Areas of this Area.
protected  java.util.Iterator<Area> getParentsIterator()
           
 java.util.List<Area> getParentsRecurse()
          Returns a list of all Parent Area objects to this one, recursively A Parent Area passes down certain behaviors and property effects to its children
protected  java.util.Iterator<Area> getParentsReverseIterator()
           
 int getPercentRoomsCached()
           
 int getPlayerLevel()
          Returns a fake player-level, to be used instead of median or average actual mob level, for cases where you want an area to reflect its higher level mobs over low level trash.
 java.util.Enumeration<Room> getProperMap()
          Returns an enumerator for all previously loaded rooms that properly belongs to this area.
 RoomnumberSet getProperRoomnumbers()
          Returns a RoomnumberSet for all rooms that properly belong to this area, including those not yet loaded.
 Room getRandomMetroRoom()
          Returns a random room from this area, or one of its children, loading it if necessary.
 Room getRandomProperRoom()
          Returns a random room from this area, loading it if necessary.
 Room getRoom(java.lang.String roomID)
          Returns a room of the given roomID, if it has already been added by calling addProperRoom.
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 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.
 java.lang.String getSubOpList()
          Returns a semicolon delimited list of player Names that represent the SubOp list for this area.
 int getTheme()
          Returns the technology level supported by this area.
 int getThemeCode()
          Returns the technology level supported by this area.
 int getTickStatus()
          A coded status for this object during the period where its tick method is being called.
 TimeClock getTimeObj()
          Returns a reference to the TimeClock object that represents the calendar and date/time for this area.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 java.lang.String ignoreMask()
          Returns the mask used to determine if a customer is ignored by the ShopKeeper.
 java.lang.String image()
          Returns the fully qualified and determined name of the image file displayed for this object when MXP is used.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean inMyMetroArea(Area A)
          Returns whether the given Area object is either THIS area, a child of this area, or a decendent.
 int invResetRate()
          Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
 boolean isChild(Area area)
          Returns whether the Area is a child of this Area A Child Area inherets certain behaviors and property effects from its Parents
 boolean isChild(java.lang.String named)
          Returns whether the Area named is a child of this Area A Child Area inherets certain behaviors and property effects from its Parents
 boolean isGeneric()
          Whether the fields of this item are set in code, or set by builders.
 boolean isParent(Area area)
          Returns whether the Area is a Parent of this Area A Parent Area passes down certain behaviors and property effects to its children
 boolean isParent(java.lang.String named)
          Returns whether the Area named is a Parent of this Area A Parent Area passes down certain behaviors and property effects to its children
 boolean isProperlyEmpty()
          Returns whether this area has any proper rooms at all, even if uncached.
 boolean isRoom(Room R)
          Returns whether the given Room object belongs to this Area, even if the Room object properly has not been loaded yet (due to the area being thin).
 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.lang.String[] itemPricingAdjustments()
          A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
 java.lang.String L(java.lang.String str, java.lang.String... xs)
          Localize an internal string -- shortcut.
 SLinkedList<Area> loadAreas(java.util.Collection<java.lang.String> loadableSet)
           
 int maxRange()
          the maximum range of this object, if applicable.
 int metroSize()
          Returns a count of all cached rooms that belong to this area, or to a child area, which have been loaded.
 int minRange()
          the 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.
 java.lang.String name()
          The nice displayable name of this instance of this object
 java.lang.String Name()
          The raw unmodified name of this object as stored in the database.
 java.lang.String name(MOB viewerMob)
          Returns the name, but as seen by the given viewer.
 CMObject newInstance()
          Returns a new instance of this class.
 int numAllBlurbFlags()
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 int numBehaviors()
          The number of behaviors this object has.
 int numberOfProperIDedRooms()
          Returns a count of all cached rooms that belong to this area, excluding skys and auto-generated rooms.
 int numBlurbFlags()
          A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.
 int numEffects()
          Returns the number of ability objects listed as effects on this object.
 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.
 java.lang.String prejudiceFactors()
          A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
 int properSize()
          Returns a count of all cached rooms that belong to this area, which have been loaded.
 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 removeChild(Area area)
          Designates the given Area object as no longer being Child of this one.
 void removeParent(Area area)
          Designates the given Area object as no longer being Parent of this one.
 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 setArchivePath(java.lang.String pathFile)
          Sets the coffeemud .cmare filename that will be used when the EXPORT command is used in such a way as to auto-generate filenames.
 void setAreaState(Area.State newState)
          Area Flags, unlike flags, is a PURELY run-time set that changes depending upon how the engine is operating on this area or its content.
 void setAtmosphere(int resourceCode)
          Sets the resource (or -1) that represents the atmosphere of this area.
 void setAuthorID(java.lang.String authorID)
          Sets the name of the author of this area, an arbitrary string
 void setBasePhyStats(PhyStats newStats)
          Re-sets the object containing a set of base, unmodified, mostly numeric fields.
 void setBudget(java.lang.String factors)
          Sets a description of the buying budget of the shopkeeper.
 void setClimateObj(Climate obj)
          Sets a reference to the Climate object that represents the current and future weather for this area.
 void setClimateType(int newClimateType)
          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 setCurrency(java.lang.String newCurrency)
          Returns the default currency for this area, which will be referenced by shopkeepers, bankers, and other mobs.
 void setDescription(java.lang.String newDescription)
          Sets the basic description of this object, as shown when the item is directly LOOKed at.
 void setDevalueRate(java.lang.String factors)
          Sets a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory.
 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 setIgnoreMask(java.lang.String factors)
          Sets the mask used to determine if a customer is ignored by the ShopKeeper.
 void setImage(java.lang.String newImage)
          Sets the raw name of the image file to display for this object when MXP is used.
 void setInvResetRate(int ticks)
          Sets the number of ticks between totally resetting this ShopKeepers inventory back to what it was.
 void setItemPricingAdjustments(java.lang.String[] factors)
          Sets the string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask
 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.
 void setName(java.lang.String newName)
          Sets the raw unmodified name of this object as stored in the database.
 void setPlayerLevel(int level)
          Sets a fake player-level, to be used instead of median or average actual mob level, for cases where you want an area to reflect its higher level mobs over low level trash.
 void setPrejudiceFactors(java.lang.String factors)
          Sets the string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.
 void setProperRoomnumbers(RoomnumberSet set)
          Sets the RoomnumberSet for all rooms that properly belong to this area, including those not yet loaded.
 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.
 void setSubOpList(java.lang.String list)
          Sets the semicolon delimited list of player Names that represent the SubOp list for this area.
 void setTheme(int level)
          Sets the technology level supported by this area.
 void setTimeObj(TimeClock obj)
          Sets a reference to the TimeClock object that represents the calendar and date/time for this area.
 java.util.Enumeration<java.lang.String> subOps()
          Returns a enumeration of player Names that represent the SubOp list for this area.
 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.
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

miscText

protected java.lang.String miscText

archPath

protected java.lang.String archPath

imageName

protected java.lang.String imageName

playerLevel

protected int playerLevel

theme

protected int theme

atmosphere

protected int atmosphere

derivedTheme

protected int derivedTheme

derivedAtmo

protected int derivedAtmo

climask

protected int climask

derivedClimate

protected int derivedClimate

tickStatus

protected int tickStatus

expirationDate

protected long expirationDate

lastPlayerTime

protected long lastPlayerTime

flag

protected Area.State flag

xtraValues

protected java.lang.String[] xtraValues

author

protected java.lang.String author

currency

protected java.lang.String currency

devalueRate

protected double[] devalueRate

budget

protected java.lang.String budget

ignoreMask

protected java.lang.String ignoreMask

prejudiceFactors

protected java.lang.String prejudiceFactors

invResetRate

protected int invResetRate

amDestroyed

protected boolean amDestroyed

phyStats

protected PhyStats phyStats

basePhyStats

protected PhyStats basePhyStats

blurbFlags

protected STreeMap<java.lang.String,java.lang.String> blurbFlags

properRooms

protected STreeMap<java.lang.String,Room> properRooms

properRoomIDSet

protected RoomnumberSet properRoomIDSet

metroRoomIDSet

protected RoomnumberSet metroRoomIDSet

children

protected SLinkedList<Area> children

parents

protected SLinkedList<Area> parents

affects

protected SVector<Ability> affects

behaviors

protected SVector<Behavior> behaviors

subOps

protected SVector<java.lang.String> subOps

scripts

protected SVector<ScriptingEngine> scripts

me

protected Area me

myClock

protected TimeClock myClock

climateObj

protected Climate climateObj

itemPricingAdjustments

protected java.lang.String[] itemPricingAdjustments

emptyStats

protected static final int[] emptyStats

empty

protected static final java.lang.String[] empty

STDAREACODES

protected static final java.lang.String[] STDAREACODES
Constructor Detail

StdArea

public StdArea()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

flags

public long flags()
Description copied from interface: Area
Return basic attributed flag about the area.

Specified by:
flags in interface Area
Returns:
either 0, or a bitmap of FLAG_ constants
See Also:
Area.FLAG_THIN

setAuthorID

public void setAuthorID(java.lang.String authorID)
Description copied from interface: Area
Sets the name of the author of this area, an arbitrary string

Specified by:
setAuthorID in interface Area
Parameters:
authorID - the author of the area

getAuthorID

public java.lang.String getAuthorID()
Description copied from interface: Area
Returns the name of the author of this area, an arbitrary string

Specified by:
getAuthorID in interface Area
Returns:
the author of the area

setCurrency

public void setCurrency(java.lang.String newCurrency)
Description copied from interface: Area
Returns the default currency for this area, which will be referenced by shopkeepers, bankers, and other mobs. See Archon's Guide for the proper format for this string, as it can be anything from a full current definition, to a reference to an existing one.

Specified by:
setCurrency in interface Area
Parameters:
newCurrency - a currency name/definition

getCurrency

public java.lang.String getCurrency()
Description copied from interface: Area
Sets the default currency for this area, which will be referenced by shopkeepers, bankers, and other mobs. See Archon's Guide for the proper format for this string, as it can be anything from a full current definition, to a reference to an existing one.

Specified by:
getCurrency in interface Area
Returns:
a currency name/definition

getAtmosphereCode

public int getAtmosphereCode()
Description copied from interface: Places
Returns the resource (or -1) that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Return -1 to have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
getAtmosphereCode in interface Places
Returns:
the RawMaterial resource, or -1
See Also:
RawMaterial.MATERIAL_GAS

setAtmosphere

public void setAtmosphere(int resourceCode)
Description copied from interface: Places
Sets the resource (or -1) that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Return -1 to have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
setAtmosphere in interface Places
Parameters:
resourceCode - the RawMaterial resource to use
See Also:
RawMaterial.MATERIAL_GAS

getAtmosphere

public int getAtmosphere()
Description copied from interface: Places
Returns the resource that represents the atmosphere of this area. Since most rooms inherit their atmosphere from the area, this is important. Could have this area inherit its atmosphere from parents (which would ultimately go back to RESOURCE_AIR)

Specified by:
getAtmosphere in interface Places
Returns:
the RawMaterial resource
See Also:
RawMaterial.MATERIAL_GAS

getBlurbFlag

public java.lang.String getBlurbFlag(java.lang.String flag)
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area. This method returns the definition of a named flag

Specified by:
getBlurbFlag in interface Area
Parameters:
flag - the name of the flag to return
Returns:
the definition/string value of the flag

numBlurbFlags

public int numBlurbFlags()
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.

Specified by:
numBlurbFlags in interface Area
Returns:
the number of such strings defined

numAllBlurbFlags

public int numAllBlurbFlags()
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area.

Specified by:
numAllBlurbFlags in interface Area
Returns:
the number of such strings defined for this area AND parent areas

areaBlurbFlags

public java.util.Enumeration<java.lang.String> areaBlurbFlags()
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area. This method returns the name of an enumerated flag.

Specified by:
areaBlurbFlags in interface Area
Returns:
enumeration of blurb flag keys, call getBlurbFlag(String) for the value
See Also:
Area.getBlurbFlag(String)

addBlurbFlag

public void addBlurbFlag(java.lang.String flagPlusDesc)
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area. This method adds a new flag.

Specified by:
addBlurbFlag in interface Area
Parameters:
flagPlusDesc - the flag name, space, followed by definition

delBlurbFlag

public void delBlurbFlag(java.lang.String flagOnly)
Description copied from interface: Area
A blurb flag is a run-time modifiable set of strings that can be added to an area in order to display them in the HELP entry for an area. This method deletes an existing flag by name.

Specified by:
delBlurbFlag in interface Area
Parameters:
flagOnly - the name of the flag to remove.

expirationDate

public long expirationDate()
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
expirationDate in interface Environmental
Returns:
the time stamp when this thing expires
See Also:
Environmental.setExpirationDate(long)

setExpirationDate

public void setExpirationDate(long time)
Description copied from interface: Environmental
If this object expires, it should have a timestamp saying when it expires, in real time. When it expires, a MSG_EXPIRE message will be sent to it.

Specified by:
setExpirationDate in interface Environmental
Parameters:
time - the time stamp when this thing expires
See Also:
Environmental.expirationDate()

setClimateObj

public void setClimateObj(Climate obj)
Description copied from interface: Area
Sets a reference to the Climate object that represents the current and future weather for this area.

Specified by:
setClimateObj in interface Area
Parameters:
obj - a com.planet_ink.coffee_mud.Common.interfaces.Climate object
See Also:
Climate

getClimateObj

public Climate getClimateObj()
Description copied from interface: Area
Returns a reference to the Climate object that represents the current and future weather for this area.

Specified by:
getClimateObj in interface Area
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.Climate object
See Also:
Climate

setTimeObj

public void setTimeObj(TimeClock obj)
Description copied from interface: Area
Sets a reference to the TimeClock object that represents the calendar and date/time for this area. May be shared by numerous areas.

Specified by:
setTimeObj in interface Area
Parameters:
obj - a com.planet_ink.coffee_mud.Common.interfaces.TimeClock object
See Also:
TimeClock

getTimeObj

public TimeClock getTimeObj()
Description copied from interface: Area
Returns a reference to the TimeClock object that represents the calendar and date/time for this area. May be shared by numerous areas.

Specified by:
getTimeObj in interface Area
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.TimeClock object
See Also:
TimeClock

destroy

public void destroy()
Description copied from interface: Contingent
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Contingent

amDestroyed

public boolean amDestroyed()
Description copied from interface: Contingent
Whether the destroy() method has been previousy called on this object.

Specified by:
amDestroyed in interface Contingent
Returns:
whether the object is destroy()ed.

isSavable

public boolean isSavable()
Description copied from interface: Contingent
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. It always returns true except under unique circumstances.

Specified by:
isSavable in interface Contingent
Returns:
true, usually.

setSavable

public void setSavable(boolean truefalse)
Description copied from interface: Contingent
Sets whether this object can be saved as a permanent aspect of its host.

Specified by:
setSavable in interface Contingent
Parameters:
truefalse - whether this behavior can be saved as part of its host.
See Also:
Contingent.isSavable()

name

public java.lang.String name()
Description copied from interface: Tickable
The nice displayable name of this instance of this object

Specified by:
name in interface CMObject
Specified by:
name in interface Tickable
Returns:
the displayable name of this object instance
See Also:
Environmental.Name()

getProperRoomnumbers

public RoomnumberSet getProperRoomnumbers()
Description copied from interface: Area
Returns a RoomnumberSet for all rooms that properly belong to this area, including those not yet loaded.

Specified by:
getProperRoomnumbers in interface Area
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.RoomnumberSet object
See Also:
RoomnumberSet

getCachedRoomnumbers

public RoomnumberSet getCachedRoomnumbers()
Description copied from interface: Area
Returns a RoomnumberSet for all rooms that properly belong to this area, excluding those not yet loaded.

Specified by:
getCachedRoomnumbers in interface Area
Returns:
a com.planet_ink.coffee_mud.Common.interfaces.RoomnumberSet object

setName

public void setName(java.lang.String newName)
Description copied from interface: Environmental
Sets the raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
setName in interface Environmental
Parameters:
newName - the raw base name of this object on the map.
See Also:
Environmental.Name()

Name

public java.lang.String Name()
Description copied from interface: Environmental
The raw unmodified name of this object as stored in the database. This is the name set by builders and used as a basis for the name() method.

Specified by:
Name in interface Environmental
Returns:
the raw base name of this object on the map.
See Also:
Tickable.name()

phyStats

public PhyStats phyStats()
Description copied from interface: Affectable
Object containing a set of current, modified, usable, mostly numeric fields. This object is based on the object from basePhyStats() and then updated and modified by the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Specified by:
phyStats in interface Affectable
Returns:
the current set of state fields
See Also:
Affectable.basePhyStats(), Affectable.recoverPhyStats(), PhyStats

basePhyStats

public PhyStats basePhyStats()
Description copied from interface: Affectable
Object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein.

Specified by:
basePhyStats in interface Affectable
Returns:
a set of state fields
See Also:
Affectable.phyStats(), Affectable.recoverPhyStats(), PhyStats

recoverPhyStats

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

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

setBasePhyStats

public void setBasePhyStats(PhyStats newStats)
Description copied from interface: Affectable
Re-sets the object containing a set of base, unmodified, mostly numeric fields. The values on the fields in this object will be as they were set by the builder. This object is used as a basis for the recoverPhyStats() method. See the PhyStats interface for information on the fields herein. This method is rarely called -- the fields therein are usually set using setter methods from the PhyStats interface on the object itself.

Specified by:
setBasePhyStats in interface Affectable
Parameters:
newStats - a set of state fields
See Also:
Affectable.phyStats(), Affectable.recoverPhyStats(), PhyStats

getThemeCode

public int getThemeCode()
Description copied from interface: Area
Returns the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag. May return THEME_INHERIT if the area inherits a theme from above.

Specified by:
getThemeCode in interface Area
Returns:
a bitmap of the themes supported by this area.
See Also:
Area.THEME_FANTASY

getTheme

public int getTheme()
Description copied from interface: Area
Returns the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag. May result in consulting parent areas to determine a theme

Specified by:
getTheme in interface Area
Returns:
a bitmap of the themes supported by this area.
See Also:
Area.THEME_FANTASY

setTheme

public void setTheme(int level)
Description copied from interface: Area
Sets the technology level supported by this area. Activities within rooms within this area will be affected by the results of this flag.

Specified by:
setTheme in interface Area
Parameters:
level - the bitmap representing the tech level
See Also:
Area.THEME_FANTASY

getArchivePath

public java.lang.String getArchivePath()
Description copied from interface: Area
Returns the coffeemud .cmare filename that will be used when the EXPORT command is used in such a way as to auto-generate filenames.

Specified by:
getArchivePath in interface Area
Returns:
the name of the .cmare filename to use

setArchivePath

public void setArchivePath(java.lang.String pathFile)
Description copied from interface: Area
Sets the coffeemud .cmare filename that will be used when the EXPORT command is used in such a way as to auto-generate filenames.

Specified by:
setArchivePath in interface Area
Parameters:
pathFile - the name of the .cmare filename to use

image

public java.lang.String image()
Description copied from interface: Environmental
Returns the fully qualified and determined name of the image file displayed for this object when MXP is used. If rawImage() is non-empty, it will return rawImage, and otherwise use the mxp default data file.

Specified by:
image in interface Environmental
Returns:
the name of the mxp image to display for this object.

rawImage

public java.lang.String rawImage()
Description copied from interface: Environmental
Returns the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
rawImage in interface Environmental
Returns:
the raw name of the mxp image file

setImage

public void setImage(java.lang.String newImage)
Description copied from interface: Environmental
Sets the raw name of the image file to display for this object when MXP is used. This is the value set by the builder, and may be returned by image() if it is non-empty.

Specified by:
setImage in interface Environmental
Parameters:
newImage - the raw name of the mxp image file

setAreaState

public void setAreaState(Area.State newState)
Description copied from interface: Area
Area Flags, unlike flags, is a PURELY run-time set that changes depending upon how the engine is operating on this area or its content. This method changes the state.

Specified by:
setAreaState in interface Area
Parameters:
newState - the new state to put this entire area into
See Also:
Area.State

getAreaState

public Area.State getAreaState()
Description copied from interface: Area
Area Flags, unlike flags, is a PURELY run-time set that changes depending upon how the engine is operating on this area or its content. This method returns the state.

Specified by:
getAreaState in interface Area
Returns:
a numeric state for this area
See Also:
Area.State

amISubOp

public boolean amISubOp(java.lang.String username)
Description copied from interface: Area
Returns whether the given player name is a SubOp to this area. This must be a valid Player Name. A Player with this designation will have their AREA_ security flags activated when in this area.

Specified by:
amISubOp in interface Area
Parameters:
username - a players Name
Returns:
whether the players name is on the subop list for this area
See Also:
Area.addSubOp(String)

getSubOpList

public java.lang.String getSubOpList()
Description copied from interface: Area
Returns a semicolon delimited list of player Names that represent the SubOp list for this area. A Player with this designation will have their AREA_ security flags activated when in this area.

Specified by:
getSubOpList in interface Area
Returns:
a semicolon delimited list of player Names.
See Also:
Area.addSubOp(String)

setSubOpList

public void setSubOpList(java.lang.String list)
Description copied from interface: Area
Sets the semicolon delimited list of player Names that represent the SubOp list for this area. A Player with this designation will have their AREA_ security flags activated when in this area.

Specified by:
setSubOpList in interface Area
Parameters:
list - a semicolon delimited list of player Names.
See Also:
Area.addSubOp(String)

addSubOp

public void addSubOp(java.lang.String username)
Description copied from interface: Area
Adds a SubOp to this area. This must be a valid Player Name. A Player with this designation will have their AREA security flags activated when in this area.

Specified by:
addSubOp in interface Area
Parameters:
username - a players Name
See Also:
Area.delSubOp(String)

delSubOp

public void delSubOp(java.lang.String username)
Description copied from interface: Area
Removes a SubOp to this area.

Specified by:
delSubOp in interface Area
Parameters:
username - a players Name
See Also:
Area.addSubOp(String)

getNewRoomID

public java.lang.String getNewRoomID(Room startRoom,
                                     int direction)
Description copied from interface: Area
Generates a new RoomID for a new Room in this area.

Specified by:
getNewRoomID in interface Area
Parameters:
startRoom - the room connected to the upcoming new one (or null)
direction - the direction from the startRoom the new one will go
Returns:
a generated new RoomID for the new Room
See Also:
Room

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

isGeneric

public boolean isGeneric()
Description copied from interface: Environmental
Whether the fields of this item are set in code, or set by builders. Generic means that they are set by builders, in which case XML is returned by the text() method containing all of the values for all the fields.

Specified by:
isGeneric in interface Environmental
Returns:
whether this item is modifiable by builders
See Also:
Environmental.text()

cloneFix

protected void cloneFix(StdArea areaA)

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

displayText

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

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

setDisplayText

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

Specified by:
setDisplayText in interface Environmental
Parameters:
newDisplayText - the string describing how this object looks in the room

displayText

public java.lang.String displayText(MOB viewerMob)
Description copied from interface: Physical
Returns the displayText, but as seen by the given viewer. Can differ from displayText() without being saved to the DB. Display Texts are normally the way something appears in a room, or is the roomTitle of rooms.

Specified by:
displayText in interface Physical
Parameters:
viewerMob - the mob viewing the physical thing
Returns:
the displayText as seen by the viewer
See Also:
Environmental.displayText()

name

public java.lang.String name(MOB viewerMob)
Description copied from interface: Physical
Returns the name, but as seen by the given viewer. Can differ from name() without being saved to the DB.

Specified by:
name in interface Physical
Parameters:
viewerMob - the mob viewing the physical thing
Returns:
the name as seen by the viewer
See Also:
Tickable.name()

finalPrejudiceFactors

public java.lang.String finalPrejudiceFactors()
Description copied from interface: Economics
A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
finalPrejudiceFactors in interface Economics
Returns:
the string describing price prejudicing

finalPrejudiceFactors

protected java.lang.String finalPrejudiceFactors(Area A)

prejudiceFactors

public java.lang.String prejudiceFactors()
Description copied from interface: Economics
A string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
prejudiceFactors in interface Economics
Returns:
the string describing price prejudicing

setPrejudiceFactors

public void setPrejudiceFactors(java.lang.String factors)
Description copied from interface: Economics
Sets the string describing how pricing for this ShopKeeper will differ based on customer attributes such as race.

Specified by:
setPrejudiceFactors in interface Economics
Parameters:
factors - the string describing price prejudicing

finalItemPricingAdjustments

public java.lang.String[] finalItemPricingAdjustments()
Description copied from interface: Economics
A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
finalItemPricingAdjustments in interface Economics
Returns:
an array of the strings describing price adjustments

finalItemPricingAdjustments

protected java.lang.String[] finalItemPricingAdjustments(Area A)

itemPricingAdjustments

public java.lang.String[] itemPricingAdjustments()
Description copied from interface: Economics
A string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
itemPricingAdjustments in interface Economics
Returns:
an array of the strings describing price adjustments

setItemPricingAdjustments

public void setItemPricingAdjustments(java.lang.String[] factors)
Description copied from interface: Economics
Sets the string set describing how pricing for this ShopKeeper will differ based on item masks The format for each string is a floating point number followers by a space and a zapper mask

Specified by:
setItemPricingAdjustments in interface Economics
Parameters:
factors - the string describing price prejudicing

finalIgnoreMask

public java.lang.String finalIgnoreMask()
Description copied from interface: Economics
Returns the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
finalIgnoreMask in interface Economics
Returns:
the mask used
See Also:
MaskingLibrary

finalIgnoreMask

protected java.lang.String finalIgnoreMask(Area A)

ignoreMask

public java.lang.String ignoreMask()
Description copied from interface: Economics
Returns the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
ignoreMask in interface Economics
Returns:
the mask used
See Also:
MaskingLibrary

setIgnoreMask

public void setIgnoreMask(java.lang.String factors)
Description copied from interface: Economics
Sets the mask used to determine if a customer is ignored by the ShopKeeper.

Specified by:
setIgnoreMask in interface Economics
Parameters:
factors - the mask to use
See Also:
MaskingLibrary

finalBudget

public Pair<java.lang.Long,TimeClock.TimePeriod> finalBudget()
Description copied from interface: Economics
Returns a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
finalBudget in interface Economics
Returns:
the pair for the shopkeepers buying budget

finalAreaBudget

protected Pair<java.lang.Long,TimeClock.TimePeriod> finalAreaBudget(Area A)

budget

public java.lang.String budget()
Description copied from interface: Economics
Returns a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
budget in interface Economics
Returns:
the string for the shopkeepers buying budget

setBudget

public void setBudget(java.lang.String factors)
Description copied from interface: Economics
Sets a description of the buying budget of the shopkeeper. Format is an amount of base currency followed by HOUR,WEEK,DAY,MONTH or YEAR.

Specified by:
setBudget in interface Economics
Parameters:
factors - the string for the shopkeepers buying budget

finalDevalueRate

public double[] finalDevalueRate()
Description copied from interface: Economics
Returns a double array describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of null or [0,0] would mean no drop in price for either, ever.

Specified by:
finalDevalueRate in interface Economics
Returns:
null, or the price dropping percentage rule for this shopkeeper

finalAreaDevalueRate

protected double[] finalAreaDevalueRate(Area A)

devalueRate

public java.lang.String devalueRate()
Description copied from interface: Economics
Returns a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of "0 0" would mean no drop in price for either, ever.

Specified by:
devalueRate in interface Economics
Returns:
the price dropping percentage rule for this shopkeeper

setDevalueRate

public void setDevalueRate(java.lang.String factors)
Description copied from interface: Economics
Sets a string describing the percentage in the drop of the price at which this ShopKeeper will buy back items based on the number already in his inventory. The format is a number representing the percentage price drop per normal item followed by a space, followed by a number representing the percentage price drop per raw resource item. A value of "0 0" would mean no drop in price for either, ever.

Specified by:
setDevalueRate in interface Economics
Parameters:
factors - the price dropping percentage rule for this shopkeeper

invResetRate

public int invResetRate()
Description copied from interface: Economics
Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
invResetRate in interface Economics
Returns:
the number of ticks between total resets of inventory

setInvResetRate

public void setInvResetRate(int ticks)
Description copied from interface: Economics
Sets the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
setInvResetRate in interface Economics
Parameters:
ticks - the number of ticks between total resets of inventory

finalInvResetRate

public int finalInvResetRate()
Description copied from interface: Economics
Returns the number of ticks between totally resetting this ShopKeepers inventory back to what it was.

Specified by:
finalInvResetRate in interface Economics
Returns:
the number of ticks between total resets of inventory

finalInvResetRate

protected int finalInvResetRate(Area A)

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

miscTextFormat

public java.lang.String miscTextFormat()
Description copied from interface: Environmental
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. Will use the CMParms.MTFORMAT_* constants for definition.

Specified by:
miscTextFormat in interface Environmental
Returns:
the format expected for the miscText field
See Also:
CMParms, Environmental.text(), Environmental.setMiscText(String)

text

public java.lang.String text()
Description copied from interface: Environmental
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. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
text in interface Environmental
Returns:
either an open internal text string, or XML

setMiscText

public void setMiscText(java.lang.String newMiscText)
Description copied from interface: Environmental
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. For objects which have true for their isGeneric method, this is used to set and parse the XML which will be used to fill out the fields in this object. Since Ability objects are never Generic, this will always be where parameters are read from an Ability instance.

Specified by:
setMiscText in interface Environmental
Parameters:
newMiscText - either an open internal text string, or XML

description

public java.lang.String description()
Description copied from interface: Environmental
The basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
description in interface Environmental
Returns:
the basic detail description of this object

setDescription

public void setDescription(java.lang.String newDescription)
Description copied from interface: Environmental
Sets the basic description of this object, as shown when the item is directly LOOKed at.

Specified by:
setDescription in interface Environmental
Parameters:
newDescription - the basic detail description of this object

description

public java.lang.String description(MOB viewerMob)
Description copied from interface: Physical
Returns the description, but as seen by the given viewer. Can differ from description() without being saved to the DB. Descriptions are normally the way something appears when looked at, or is the long description of rooms.

Specified by:
description in interface Physical
Parameters:
viewerMob - the mob viewing the physical thing
Returns:
the description as seen by the viewer
See Also:
Environmental.description()

getClimateTypeCode

public int getClimateTypeCode()
Description copied from interface: Places
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.

Specified by:
getClimateTypeCode in interface Places
Returns:
a CLIMASK bitmap
See Also:
Places.CLIMASK_COLD

setClimateType

public void setClimateType(int newClimateType)
Description copied from interface: Places
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.

Specified by:
setClimateType in interface Places
Parameters:
newClimateType - a CLIMASK bitmap
See Also:
Places.CLIMASK_COLD

getClimateType

public int getClimateType()
Description copied from interface: Places
Returns a bitmap of the climate for this place. If the climate is CLIMASK_INHERIT, then it will look to parent objects, such as areas, and parent areas, until it eventually finds a non-inherit, or returns CLIMASK_NORMAL;

Specified by:
getClimateType in interface Places
Returns:
a derived climate
See Also:
Places.CLIMASK_COLD

okMessage

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

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

executeMsg

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

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

getTickStatus

public int getTickStatus()
Description copied from interface: Tickable
A coded status for this object during the period where its tick method is being called. The statis is defined, at least in part, by constants in this interface STATUS_*. STATUS_NOT should be returned when the objects tick method is not currently in execution. It should never return STATUS_NOT when the objects tick method is in execution.

Specified by:
getTickStatus in interface Tickable
Returns:
the numeric status of this object
See Also:
Tickable.tick(Tickable, int)

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

affectPhyStats

public void affectPhyStats(Physical affected,
                           PhyStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverPhyStats() method on other Environmental objects. It is used to transform the Environmental basePhyStats() object into a finished phyStats() object, both of which are objects implementing the PhyStats interface. See those methods for more information.

Specified by:
affectPhyStats in interface StatsAffecting
Parameters:
affected - the host of the PhyStats object being affected
affectableStats - the particular PhyStats object being affected
See Also:
PhyStats, Environmental, Affectable.basePhyStats(), Affectable.phyStats(), Affectable.recoverPhyStats()

affectCharStats

public void affectCharStats(MOB affectedMob,
                            CharStats affectableStats)
Description copied from interface: StatsAffecting
This method is called by the recoverCharStats() method on other MOB objects. It is used to transform the MOB baseCharStats() object into a finished charStats() object, both of which are objects implementing the CharStats interface. See those methods for more information.

Specified by:
affectCharStats in interface StatsAffecting
Parameters:
affectedMob - the host of the CharStats object being affected
affectableStats - the particular CharStats object being affected
See Also:
CharStats, MOB, MOB.baseCharStats(), MOB.charStats(), MOB.recoverCharStats()

affectCharState

public void affectCharState(MOB affectedMob,
                            CharState affectableMaxState)
Description copied from interface: StatsAffecting
This method is called by the recoverCharState() method on other MOB objects. It is used to transform the MOB baseCharState() object into a finished charState() object, both of which are objects implementing the CharState interface. See those methods for more information.

Specified by:
affectCharState in interface StatsAffecting
Parameters:
affectedMob - the host of the CharState object being affected
affectableMaxState - the particular CharState object being affected
See Also:
CharState, MOB, MOB.baseState(), MOB.curState(), MOB.recoverMaxState()

addNonUninvokableEffect

public void addNonUninvokableEffect(Ability to)
Description copied from interface: Affectable
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. recoverPhyStats() method should be called next. An Ability with a given ID() can only be added once per object.

Specified by:
addNonUninvokableEffect in interface Affectable
Parameters:
to - The ability object to add as an effect.
See Also:
Ability, Affectable.recoverPhyStats()

addEffect

public void addEffect(Ability to)
Description copied from interface: Affectable
Add a new effect to this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modifies the stats. An Ability with a given ID() can only be added once per object.

Specified by:
addEffect in interface Affectable
Parameters:
to - The ability object to add as an effect.
See Also:
Ability, Affectable.recoverPhyStats()

delEffect

public void delEffect(Ability to)
Description copied from interface: Affectable
Delete an effect from this object, whether permanent or temporary. After calling this method, recoverPhyStats() should be called next in case this ability object modified the stats.

Specified by:
delEffect in interface Affectable
Parameters:
to - The ability object to remove as an effect on this object
See Also:
Ability, Affectable.recoverPhyStats()

eachEffect

public void eachEffect(EachApplicable<Ability> applier)
Description copied from interface: Affectable
Applies the given code to each effect on this object

Specified by:
eachEffect in interface Affectable
Parameters:
applier - code to execute against each object

delAllEffects

public void delAllEffects(boolean unInvoke)
Description copied from interface: Affectable
Optionally uninvokes and then certainly removes all effects from this object.

Specified by:
delAllEffects in interface Affectable
Parameters:
unInvoke - send true to uninvoke before deleting

numEffects

public int numEffects()
Description copied from interface: Affectable
Returns the number of ability objects listed as effects on this object.

Specified by:
numEffects in interface Affectable
Returns:
the number of effects this object has
See Also:
Ability

effects

public java.util.Enumeration<Ability> effects()
Description copied from interface: Affectable
Returns an enumerator of abilities listed as effects on this object.

Specified by:
effects in interface Affectable
Returns:
the enumerator of ability objects effecting this object
See Also:
Ability

fetchEffect

public Ability fetchEffect(int index)
Description copied from interface: Affectable
Returns an ability object listed as an effect on this object. May return null even if the index is correct to mark a race condition.

Specified by:
fetchEffect in interface Affectable
Parameters:
index - which object to return
Returns:
the ability object effecting this object
See Also:
Ability, Affectable.numEffects()

fetchEffect

public Ability fetchEffect(java.lang.String ID)
Description copied from interface: Affectable
Returns an ability object listed as an effect on this object. The object will be the one with the same ID() string as passed in.

Specified by:
fetchEffect in interface Affectable
Parameters:
ID - the Ability ID to look for in effects
Returns:
the ability object effecting this object
See Also:
Ability, CMObject.ID()

inMyMetroArea

public boolean inMyMetroArea(Area A)
Description copied from interface: Area
Returns whether the given Area object is either THIS area, a child of this area, or a decendent.

Specified by:
inMyMetroArea in interface Area
Parameters:
A - an Area object
Returns:
whether the Area is downward-kin

fillInAreaRooms

public void fillInAreaRooms()
Description copied from interface: Area
This method causes all proper rooms within this area to have their run-time generated Skys to be re-generated. It is called at boot-time and when areas are reset or re-generated.

Specified by:
fillInAreaRooms in interface Area

fillInAreaRoom

public void fillInAreaRoom(Room R)
Description copied from interface: Area
This method causes a given room to have its run-time generated Skys to be re-generated.

Specified by:
fillInAreaRoom in interface Area
Parameters:
R - the Room object to "fill-in"
See Also:
Room

addBehavior

public void addBehavior(Behavior to)
Manipulation of Behavior objects, which includes movement, speech, spellcasting, etc, etc.

Specified by:
addBehavior in interface Behavable
Parameters:
to - The behavior object to add.
See Also:
Behavior, Affectable.recoverPhyStats()

delBehavior

public void delBehavior(Behavior to)
Description copied from interface: Behavable
Delete a behavior from this object. After calling this method, recoverPhyStats() should be called next in case this behavior object modified the stats.

Specified by:
delBehavior in interface Behavable
Parameters:
to - The behavior object to remove.
See Also:
Behavior, Affectable.recoverPhyStats()

delAllBehaviors

public void delAllBehaviors()
Description copied from interface: Behavable
Removes all behaviors from this object.

Specified by:
delAllBehaviors in interface Behavable

numBehaviors

public int numBehaviors()
Description copied from interface: Behavable
The number of behaviors this object has.

Specified by:
numBehaviors in interface Behavable
Returns:
the number of behaviors
See Also:
Behavior

behaviors

public java.util.Enumeration<Behavior> behaviors()
Description copied from interface: Behavable
Returns an enumerator of all the behaviors on this object.

Specified by:
behaviors in interface Behavable
Returns:
an enumerator of all the behaviors on this object.
See Also:
Behavior

addScript

public void addScript(ScriptingEngine S)
Manipulation of the scripts list

Specified by:
addScript in interface Behavable
Parameters:
S - the scripting engine, fully populated, to add
See Also:
ScriptingEngine

delScript

public void delScript(ScriptingEngine S)
Description copied from interface: Behavable
Remove a running script from this object.

Specified by:
delScript in interface Behavable
Parameters:
S - the specific scripting engine to remove
See Also:
ScriptingEngine

numScripts

public int numScripts()
Description copied from interface: Behavable
Return the number of scripts running on this object

Specified by:
numScripts in interface Behavable
Returns:
number of scripts

scripts

public java.util.Enumeration<ScriptingEngine> scripts()
Description copied from interface: Behavable
Returns an enumerator of all the scripts on this object.

Specified by:
scripts in interface Behavable
Returns:
an enumerator of all the scripts on this object.
See Also:
ScriptingEngine

fetchScript

public ScriptingEngine fetchScript(int x)
Description copied from interface: Behavable
Retrieve one of the enumerated scripts running on this object

Specified by:
fetchScript in interface Behavable
Parameters:
x - which script to return
Returns:
the scripting engine
See Also:
ScriptingEngine

delAllScripts

public void delAllScripts()
Description copied from interface: Behavable
Removes all executing scripts from this object.

Specified by:
delAllScripts in interface Behavable

eachScript

public void eachScript(EachApplicable<ScriptingEngine> applier)
Description copied from interface: Behavable
Applies the given code to each scripting engine on this object

Specified by:
eachScript in interface Behavable
Parameters:
applier - code to execute against each object

maxRange

public int maxRange()
Description copied from interface: Environmental
the maximum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat.

Specified by:
maxRange in interface Environmental
Returns:
the maximum range

minRange

public int minRange()
Description copied from interface: Environmental
the minimum range of this object, if applicable. Can refer to the size of a room, the range of a weapon, or the calculated range of a mob in combat. Usually 0.

Specified by:
minRange in interface Environmental
Returns:
the minimum range

buildAreaIMobStats

protected void buildAreaIMobStats(int[] statData,
                                  long[] totalAlignments,
                                  Faction theFaction,
                                  java.util.List<java.lang.Integer> alignRanges,
                                  java.util.List<java.lang.Integer> levelRanges,
                                  MOB mob)

buildAreaIStats

protected int[] buildAreaIStats()

getPlayerLevel

public int getPlayerLevel()
Description copied from interface: Area
Returns a fake player-level, to be used instead of median or average actual mob level, for cases where you want an area to reflect its higher level mobs over low level trash. Returns 0 if none is applied and the median or average should instead be used.

Specified by:
getPlayerLevel in interface Area
Returns:
the player level, or 0
See Also:
Area.setPlayerLevel(int)

setPlayerLevel

public void setPlayerLevel(int level)
Description copied from interface: Area
Sets a fake player-level, to be used instead of median or average actual mob level, for cases where you want an area to reflect its higher level mobs over low level trash. Returns 0 if none is applied and the median or average should instead be used.

Specified by:
setPlayerLevel in interface Area
Parameters:
level - the player level, or 0
See Also:
Area.getPlayerLevel()

getAreaIStats

public int[] getAreaIStats()
Description copied from interface: Area
Returns an integer array of statistics about this area based on a snapshot generated the first time it is called. This array is the cached for future calls, but can be unloaded from resources using the UNLOAD command, to force a re-generation. The array is dereferenced using AREASTAT_ constants.

Specified by:
getAreaIStats in interface Area
Returns:
an array of integer statistics
See Also:
Area.Stats

getPercentRoomsCached

public int getPercentRoomsCached()

buildAreaStats

protected java.lang.StringBuffer buildAreaStats(int[] statData)

getAreaStats

public java.lang.StringBuffer getAreaStats()
Description copied from interface: Area
Returns a descriptive list of statistics about this area based on a snapshot from getAreaIStats(), which is cached after being generated. This stringbuffer returned is user-readable.

Specified by:
getAreaStats in interface Area
Returns:
a user readable string describing stats about the area.
See Also:
Area.getAreaIStats()

fetchBehavior

public Behavior fetchBehavior(int index)
Description copied from interface: Behavable
Returns a behavior object on this object. May return null even if the index is correct to mark a race condition.

Specified by:
fetchBehavior in interface Behavable
Parameters:
index - which object to return
Returns:
the behavior object
See Also:
Behavior, Behavable.numBehaviors()

fetchBehavior

public Behavior fetchBehavior(java.lang.String ID)
Description copied from interface: Behavable
Returns a behavior object listed on this object. The object will be the one with the same ID() string as passed in.

Specified by:
fetchBehavior in interface Behavable
Parameters:
ID - the Behavior ID to look for
Returns:
the behavior object
See Also:
Behavior, CMObject.ID()

eachBehavior

public void eachBehavior(EachApplicable<Behavior> applier)
Description copied from interface: Behavable
Applies the given code to each behavior on this object

Specified by:
eachBehavior in interface Behavable
Parameters:
applier - code to execute against each object

properSize

public int properSize()
Description copied from interface: Area
Returns a count of all cached rooms that belong to this area, which have been loaded.

Specified by:
properSize in interface Area
Returns:
the number of rooms loaded.

setProperRoomnumbers

public void setProperRoomnumbers(RoomnumberSet set)
Description copied from interface: Area
Sets the RoomnumberSet for all rooms that properly belong to this area, including those not yet loaded.

Specified by:
setProperRoomnumbers in interface Area
Parameters:
set - a com.planet_ink.coffee_mud.Common.interfaces.RoomnumberSet object
See Also:
RoomnumberSet

addProperRoom

public void addProperRoom(Room R)
Description copied from interface: Area
This method adds a new Room to this area. It is called by the Room.setArea( method, and should rarely if ever be called directly. It calls addMetroRoom on all parent areas to make them aware of it as well.

Specified by:
addProperRoom in interface Area
Parameters:
R - the Room to add.
See Also:
Area.addMetroRoom(Room), Room

addMetroRoom

public void addMetroRoom(Room R)
Description copied from interface: Area
Designates that a given Room object belongs to one of this areas children.

Specified by:
addMetroRoom in interface Area
Parameters:
R - a Room object from one of this areas child areas.
See Also:
Room

delMetroRoom

public void delMetroRoom(Room R)
Description copied from interface: Area
Designates that a given Room object no longer belongs to one of this areas children.

Specified by:
delMetroRoom in interface Area
Parameters:
R - a Room object formerly from one of this areas child areas.
See Also:
Room

addProperRoomnumber

public void addProperRoomnumber(java.lang.String roomID)
Description copied from interface: Area
Designates that the given roomID belongs to this Area.

Specified by:
addProperRoomnumber in interface Area
Parameters:
roomID - the roomID of a room which should belong to this Area.

delProperRoomnumber

public void delProperRoomnumber(java.lang.String roomID)
Description copied from interface: Area
Designates that the given roomID no longer belongs to this Area.

Specified by:
delProperRoomnumber in interface Area
Parameters:
roomID - the roomID of a room which should no longer belong to this Area.

addMetroRoomnumber

public void addMetroRoomnumber(java.lang.String roomID)
Description copied from interface: Area
Designates that a given roomid represents a room which belongs to one of this areas children.

Specified by:
addMetroRoomnumber in interface Area
Parameters:
roomID - a roomid for a room

delMetroRoomnumber

public void delMetroRoomnumber(java.lang.String roomID)
Description copied from interface: Area
Designates that a given roomid represents a room which no longer belongs to one of this areas children.

Specified by:
delMetroRoomnumber in interface Area
Parameters:
roomID - a roomid for a former room

isRoom

public boolean isRoom(Room R)
Description copied from interface: Area
Returns whether the given Room object belongs to this Area, even if the Room object properly has not been loaded yet (due to the area being thin).

Specified by:
isRoom in interface Area
Parameters:
R - the Room object to check for
Returns:
whether it belongs to this Area or no.
See Also:
Room

delProperRoom

public void delProperRoom(Room R)
Description copied from interface: Area
This method removes an existing Room from this area. It also removes it from parent areas.

Specified by:
delProperRoom in interface Area
Parameters:
R - the Room to delete.
See Also:
Area.delMetroRoom(Room), Room

getRoom

public Room getRoom(java.lang.String roomID)
Description copied from interface: Area
Returns a room of the given roomID, if it has already been added by calling addProperRoom.

Specified by:
getRoom in interface Area
Parameters:
roomID - the roomID of the room to return.
Returns:
a reference to the room that the id refers to, IF the room belongs here.
See Also:
Room

metroSize

public int metroSize()
Description copied from interface: Area
Returns a count of all cached rooms that belong to this area, or to a child area, which have been loaded.

Specified by:
metroSize in interface Area
Returns:
the count of rooms in this metro area

numberOfProperIDedRooms

public int numberOfProperIDedRooms()
Description copied from interface: Area
Returns a count of all cached rooms that belong to this area, excluding skys and auto-generated rooms.

Specified by:
numberOfProperIDedRooms in interface Area
Returns:
a count of the number of rooms that have an ID

isProperlyEmpty

public boolean isProperlyEmpty()
Description copied from interface: Area
Returns whether this area has any proper rooms at all, even if uncached.

Specified by:
isProperlyEmpty in interface Area
Returns:
true if there are no proper rooms, false otherwise

getRandomProperRoom

public Room getRandomProperRoom()
Description copied from interface: Area
Returns a random room from this area, loading it if necessary.

Specified by:
getRandomProperRoom in interface Area
Returns:
a reference to a random room from this area.
See Also:
Room

getRandomMetroRoom

public Room getRandomMetroRoom()
Description copied from interface: Area
Returns a random room from this area, or one of its children, loading it if necessary.

Specified by:
getRandomMetroRoom in interface Area
Returns:
a random Room object from this or a child area
See Also:
Room

getProperMap

public java.util.Enumeration<Room> getProperMap()
Description copied from interface: Area
Returns an enumerator for all previously loaded rooms that properly belongs to this area.

Specified by:
getProperMap in interface Area
Returns:
an enumerator of Room objects
See Also:
Area.getCompleteMap(), Room

getFilledProperMap

public java.util.Enumeration<Room> getFilledProperMap()
Description copied from interface: Area
Returns an enumerator for all previously loaded rooms that properly belongs to this area, along with their skys or underwater add-ons.

Specified by:
getFilledProperMap in interface Area
Returns:
an enumerator of Room objects
See Also:
Area.getProperMap(), Room

getCompleteMap

public java.util.Enumeration<Room> getCompleteMap()
Description copied from interface: Area
This method is the same as getProperMap, except that it will load any Rooms that belong to the area but have not yet been loaded. The Enumerator returned is thus a more complete set than returned by getProperMap

Specified by:
getCompleteMap in interface Area
Returns:
an enumerator of Room objects
See Also:
Area.getProperMap(), Room

getFilledCompleteMap

public java.util.Enumeration<Room> getFilledCompleteMap()
Description copied from interface: Area
This method is the same as getFilledProperMap, except that it will load any Rooms that belong to the area but have not yet been loaded. The Enumerator returned is thus a more complete set than returned by getFilledProperMap

Specified by:
getFilledCompleteMap in interface Area
Returns:
an enumerator of Room objects
See Also:
Area.getFilledProperMap(), Room

getMetroMap

public java.util.Enumeration<Room> getMetroMap()
Description copied from interface: Area
Returns an enumerator for all previously loaded rooms that properly belongs to this area AND to any child areas.

Specified by:
getMetroMap in interface Area
Returns:
an enumerator of Room objects
See Also:
Room

subOps

public java.util.Enumeration<java.lang.String> subOps()
Description copied from interface: Area
Returns a enumeration of player Names that represent the SubOp list for this area. A Player with this designation will have their AREA_ security flags activated when in this area.

Specified by:
subOps in interface Area
Returns:
enumeration of player Names

loadAreas

public SLinkedList<Area> loadAreas(java.util.Collection<java.lang.String> loadableSet)

getParentsIterator

protected final java.util.Iterator<Area> getParentsIterator()

getParentsReverseIterator

protected final java.util.Iterator<Area> getParentsReverseIterator()

getChildrenIterator

protected final java.util.Iterator<Area> getChildrenIterator()

getChildrenReverseIterator

protected final java.util.Iterator<Area> getChildrenReverseIterator()

getChildren

public java.util.Enumeration<Area> getChildren()
Description copied from interface: Area
An enumerator list of Area objects representing the Children Areas of this Area. A Child Area inherets certain behaviors and property effects from its parents

Specified by:
getChildren in interface Area
Returns:
an enumerator of Area objects

getChild

public Area getChild(java.lang.String named)
Description copied from interface: Area
Returns the named Child Area object for this Area A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
getChild in interface Area
Parameters:
named - the name of an Area
Returns:
an Area Child object

isChild

public boolean isChild(Area area)
Description copied from interface: Area
Returns whether the Area is a child of this Area A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
isChild in interface Area
Parameters:
area - an Area object
Returns:
whether the area is a child of this one

isChild

public boolean isChild(java.lang.String named)
Description copied from interface: Area
Returns whether the Area named is a child of this Area A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
isChild in interface Area
Parameters:
named - the name of an Area
Returns:
whether the area named is a child of this one

addChild

public void addChild(Area area)
Description copied from interface: Area
Designates the given Area object as a Child of this one. A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
addChild in interface Area
Parameters:
area - an Area object

removeChild

public void removeChild(Area area)
Description copied from interface: Area
Designates the given Area object as no longer being Child of this one. A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
removeChild in interface Area
Parameters:
area - an Area object

canChild

public boolean canChild(Area area)
Description copied from interface: Area
Returns whether the Area named MAY BE designated as a child of this Area A Child Area inherets certain behaviors and property effects from its Parents

Specified by:
canChild in interface Area
Parameters:
area - an Area to check
Returns:
whether the Area named MAY BE designated as a child of this Area

getParents

public java.util.Enumeration<Area> getParents()
Description copied from interface: Area
An enumerator list of Area objects representing the Parent Areas of this Area. A Parent Area passes down certain behaviors and property effects to its children

Specified by:
getParents in interface Area
Returns:
an enumerator of Area objects

getParentsRecurse

public java.util.List<Area> getParentsRecurse()
Description copied from interface: Area
Returns a list of all Parent Area objects to this one, recursively A Parent Area passes down certain behaviors and property effects to its children

Specified by:
getParentsRecurse in interface Area
Returns:
a list of Area objects

getParent

public Area getParent(java.lang.String named)
Description copied from interface: Area
Returns the named Parent Area object for this Area A Parent Area passes down certain behaviors and property effects to its children

Specified by:
getParent in interface Area
Parameters:
named - the name of an Area
Returns:
an Area Parent object

isParent

public boolean isParent(Area area)
Description copied from interface: Area
Returns whether the Area is a Parent of this Area A Parent Area passes down certain behaviors and property effects to its children

Specified by:
isParent in interface Area
Parameters:
area - an Area object
Returns:
whether the area is a Parent of this one

isParent

public boolean isParent(java.lang.String named)
Description copied from interface: Area
Returns whether the Area named is a Parent of this Area A Parent Area passes down certain behaviors and property effects to its children

Specified by:
isParent in interface Area
Parameters:
named - the name of an Area
Returns:
whether the area named is a Parent of this one

addParent

public void addParent(Area area)
Description copied from interface: Area
Designates the given Area object as a Parent of this one. A Parent Area passes down certain behaviors and property effects to its children

Specified by:
addParent in interface Area
Parameters:
area - an Area object

removeParent

public void removeParent(Area area)
Description copied from interface: Area
Designates the given Area object as no longer being Parent of this one. A Parent Area passes down certain behaviors and property effects to its children

Specified by:
removeParent in interface Area
Parameters:
area - an Area object

canParent

public boolean canParent(Area area)
Description copied from interface: Area
Returns whether the Area named MAY BE designated as a parent of this Area A Parent Area passes down certain behaviors and property effects to its children

Specified by:
canParent in interface Area
Parameters:
area - an Area to check
Returns:
whether the Area named MAY BE designated as a parent of this Area

L

public java.lang.String L(java.lang.String str,
                          java.lang.String... xs)
Description copied from interface: Environmental
Localize an internal string -- shortcut. Same as calling:

Specified by:
L in interface Environmental
Parameters:
str - the string to translate
xs - the array of variables to replace
Returns:
the translated string, with all variables in place
See Also:
Call 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.

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

getCodeNum

protected int getCodeNum(java.lang.String code)

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

sameAs

public boolean sameAs(Environmental E)
Description copied from interface: Environmental
Whether this object instance is functionally identical to the object passed in. Works by repeatedly calling getStat on both objects and comparing the values.

Specified by:
sameAs in interface Environmental
Parameters:
E - the object to compare this one to
Returns:
whether this object is the same as the one passed in
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String)