com.planet_ink.coffee_mud.Areas
Class StdThinInstance

java.lang.Object
  extended by com.planet_ink.coffee_mud.Areas.StdArea
      extended by com.planet_ink.coffee_mud.Areas.StdThinArea
          extended by com.planet_ink.coffee_mud.Areas.StdThinInstance
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:
SubThinInstance

public class StdThinInstance
extends StdThinArea


Nested Class Summary
protected static class StdThinInstance.AllWaterFilters
           
protected static class StdThinInstance.EmptyFilters
           
protected static class StdThinInstance.OutOfAreaFilter
           
 
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  long childCheckDown
           
protected  long flags
           
protected  java.util.List<Area.AreaInstanceChild> instanceChildren
           
protected  int instanceCounter
           
protected  java.lang.ref.WeakReference<Area> parentArea
           
 
Fields inherited from class com.planet_ink.coffee_mud.Areas.StdArea
affects, amDestroyed, archPath, atmosphere, author, basePhyStats, behaviors, blurbFlags, budget, children, climask, climateObj, currency, derivedAtmo, derivedClimate, derivedTheme, description, devalueRate, empty, emptyStats, expirationDate, flag, ignoreMask, imageName, invResetRate, itemPricingAdjustments, lastPlayerTime, me, metroRoomIDSet, miscText, myClock, name, parents, phyStats, playerLevel, prejudiceFactors, properRoomIDSet, properRooms, scripts, STDAREACODES, subOps, theme, tickStatus, 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
StdThinInstance()
           
 
Method Summary
protected  java.lang.String convertToMyArea(java.lang.String roomID)
           
protected  Area createRedirectArea(java.util.List<MOB> mobs)
           
 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.
protected  boolean doesManageChildAreas()
           
protected  boolean doesManageMobLists()
           
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
 long flags()
          Return basic attributed flag about the area.
protected  void flushInstance(Area.AreaInstanceChild child)
           
 int[] getAreaIStats()
          Returns an integer array of statistics about this area based on a snapshot generated the first time it is called.
protected  Area getParentArea()
           
protected  java.util.Set<Physical> getProtectedSet(Area childA, java.util.List<java.lang.ref.WeakReference<MOB>> registeredMobList)
           
 Room getRoom(java.lang.String roomID)
          Returns a room of the given roomID, if it has already been added by calling addProperRoom.
protected  java.lang.String getStrippedRoomID(java.lang.String roomID)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
protected static boolean isInThisArea(Area childA, MOB mob)
           
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
protected  boolean qualifiesToBeParentArea(Area parentA)
           
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
 
Methods inherited from class com.planet_ink.coffee_mud.Areas.StdThinArea
addProperRoom, getCompleteMap, getMetroMap, getPercentRoomsCached, getProperMap, getProperRoom, isRoom, isRoom
 
Methods inherited from class com.planet_ink.coffee_mud.Areas.StdArea
addBehavior, addBlurbFlag, addChild, addEffect, addMetroRoom, addMetroRoomnumber, addNonUninvokableEffect, addParent, addProperRoomnumber, addScript, addSubOp, affectCharState, affectCharStats, affectPhyStats, amDestroyed, amISubOp, areaBlurbFlags, basePhyStats, behaviors, budget, buildAreaIMobStats, buildAreaIStats, buildAreaStats, canChild, canParent, cloneFix, compareTo, copyOf, delAllBehaviors, delAllEffects, delAllScripts, delBehavior, delBlurbFlag, delEffect, delMetroRoom, delMetroRoomnumber, delProperRoom, delProperRoomnumber, delScript, delSubOp, description, description, devalueRate, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fillInAreaRoom, fillInAreaRooms, finalAreaBudget, finalAreaDevalueRate, finalBudget, finalDevalueRate, finalIgnoreMask, finalIgnoreMask, finalInvResetRate, finalInvResetRate, finalItemPricingAdjustments, finalItemPricingAdjustments, finalPrejudiceFactors, finalPrejudiceFactors, getArchivePath, getAreaState, getAreaStats, getAtmosphere, getAtmosphereCode, getAuthorID, getBlurbFlag, getCachedRoomnumbers, getChild, getChildren, getChildrenIterator, getChildrenReverseIterator, getClimateObj, getClimateType, getClimateTypeCode, getCodeNum, getCurrency, getFilledCompleteMap, getFilledProperMap, getNewRoomID, getParent, getParents, getParentsIterator, getParentsRecurse, getParentsReverseIterator, getPlayerLevel, getProperRoomnumbers, getRandomMetroRoom, getRandomProperRoom, getSaveStatIndex, getStat, getStatCodes, getSubOpList, getTheme, getThemeCode, getTickStatus, getTimeObj, ignoreMask, image, initializeClass, inMyMetroArea, invResetRate, isChild, isChild, isGeneric, isParent, isParent, isProperlyEmpty, isSavable, isStat, itemPricingAdjustments, L, loadAreas, maxRange, metroSize, minRange, miscTextFormat, name, Name, name, newInstance, numAllBlurbFlags, numBehaviors, numberOfProperIDedRooms, numBlurbFlags, numEffects, numScripts, phyStats, prejudiceFactors, properSize, rawImage, recoverPhyStats, removeChild, removeParent, sameAs, scripts, setArchivePath, setAreaState, setAtmosphere, setAuthorID, setBasePhyStats, setBudget, setClimateObj, setClimateType, setCurrency, setDescription, setDevalueRate, setDisplayText, setExpirationDate, setIgnoreMask, setImage, setInvResetRate, setItemPricingAdjustments, setMiscText, setName, setPlayerLevel, setPrejudiceFactors, setProperRoomnumbers, setSavable, setStat, setSubOpList, setTheme, setTimeObj, subOps, text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

flags

protected long flags

instanceChildren

protected final java.util.List<Area.AreaInstanceChild> instanceChildren

instanceCounter

protected volatile int instanceCounter

childCheckDown

protected long childCheckDown

parentArea

protected java.lang.ref.WeakReference<Area> parentArea
Constructor Detail

StdThinInstance

public StdThinInstance()
Method Detail

ID

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

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

flags

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

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

getStrippedRoomID

protected java.lang.String getStrippedRoomID(java.lang.String roomID)

convertToMyArea

protected java.lang.String convertToMyArea(java.lang.String roomID)

qualifiesToBeParentArea

protected boolean qualifiesToBeParentArea(Area parentA)

getParentArea

protected Area getParentArea()

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
Overrides:
getRoom in class StdThinArea
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

isInThisArea

protected static boolean isInThisArea(Area childA,
                                      MOB mob)

getProtectedSet

protected java.util.Set<Physical> getProtectedSet(Area childA,
                                                  java.util.List<java.lang.ref.WeakReference<MOB>> registeredMobList)

flushInstance

protected void flushInstance(Area.AreaInstanceChild child)

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
Overrides:
destroy in class StdArea

doesManageChildAreas

protected boolean doesManageChildAreas()

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
Overrides:
tick in class StdArea
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

executeMsg

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

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdArea
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

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
Overrides:
getAreaIStats in class StdThinArea
Returns:
an array of integer statistics
See Also:
Area.Stats

doesManageMobLists

protected boolean doesManageMobLists()

createRedirectArea

protected Area createRedirectArea(java.util.List<MOB> mobs)

okMessage

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

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdArea
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()