com.planet_ink.coffee_mud.Areas
Class StdGridArea

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

public class StdGridArea
extends StdArea
implements Area, GridZones


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
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.GridZones
GridZones.XYVector
 
Field Summary
protected  int xSize
           
protected  int yLength
           
protected  int ySize
           
static java.lang.String ZEROES
           
 
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
StdGridArea()
           
 
Method Summary
 Room getGridChild(GridZones.XYVector xy)
          Returns the Room object at the given coordinates.
 Room getGridChild(int x, int y)
          Returns the Room object at the given coordinates.
 Room getGridChild(java.lang.String childCode)
          Returns the fully-qualified Room ID of this room
 java.lang.String getGridChildCode(Room loc)
          Returns the fully-qualified Room ID of this room
 int getGridChildX(Room loc)
          Returns the X coordinate of the given Room object
 int getGridChildY(Room loc)
          Returns the Y coordinate of the given Room object
 java.lang.String getNewRoomID(Room startRoom, int direction)
          Generates a new RoomID for a new Room in this area.
 Room getRandomGridChild()
          Returns a random Room object that is a child of this one.
 GridZones.XYVector getRoomXY(Room room)
          Returns the XY coordinates of the Room, if a child of this gridzone, in XYVector format.
 GridZones.XYVector getRoomXY(java.lang.String roomID)
          Returns the XY coordinates of the Room with the given roomID in XYVector format.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 boolean isMyGridChild(Room loc)
          Returns whether the given Room is a child of this particular Grid instance.
 CMObject newInstance()
          Returns a new instance of this class.
protected  GridZones.XYVector posFromRoomID(Room loc)
           
protected  java.lang.String roomIDFromPos(int x, int y)
           
 void setXGridSize(int x)
          Sets the total width of this grid.
 void setYGridSize(int y)
          Sets the total height of this grid.
 int xGridSize()
          Returns the total width of this grid.
 int yGridSize()
          Returns the total height of this grid
 
Methods inherited from class com.planet_ink.coffee_mud.Areas.StdArea
addBehavior, addBlurbFlag, addChild, addEffect, addMetroRoom, addMetroRoomnumber, addNonUninvokableEffect, addParent, addProperRoom, 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, destroy, devalueRate, displayText, displayText, eachBehavior, eachEffect, eachScript, effects, executeMsg, expirationDate, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchScript, fillInAreaRoom, fillInAreaRooms, finalAreaBudget, finalAreaDevalueRate, finalBudget, finalDevalueRate, finalIgnoreMask, finalIgnoreMask, finalInvResetRate, finalInvResetRate, finalItemPricingAdjustments, finalItemPricingAdjustments, finalPrejudiceFactors, finalPrejudiceFactors, flags, getArchivePath, getAreaIStats, getAreaState, getAreaStats, getAtmosphere, getAtmosphereCode, getAuthorID, getBlurbFlag, getCachedRoomnumbers, getChild, getChildren, getChildrenIterator, getChildrenReverseIterator, getClimateObj, getClimateType, getClimateTypeCode, getCodeNum, getCompleteMap, getCurrency, getFilledCompleteMap, getFilledProperMap, getMetroMap, getParent, getParents, getParentsIterator, getParentsRecurse, getParentsReverseIterator, getPercentRoomsCached, getPlayerLevel, getProperMap, getProperRoomnumbers, getRandomMetroRoom, getRandomProperRoom, getRoom, getSaveStatIndex, getStat, getStatCodes, getSubOpList, getTheme, getThemeCode, getTickStatus, getTimeObj, ignoreMask, image, initializeClass, inMyMetroArea, invResetRate, isChild, isChild, isGeneric, isParent, isParent, isProperlyEmpty, isRoom, isSavable, isStat, itemPricingAdjustments, L, loadAreas, maxRange, metroSize, minRange, miscTextFormat, name, Name, name, numAllBlurbFlags, numBehaviors, numberOfProperIDedRooms, numBlurbFlags, numEffects, numScripts, okMessage, 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, tick
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.Area
addBlurbFlag, addChild, addMetroRoom, addMetroRoomnumber, addParent, addProperRoom, addProperRoomnumber, addSubOp, amISubOp, areaBlurbFlags, canChild, canParent, delBlurbFlag, delMetroRoom, delMetroRoomnumber, delProperRoom, delProperRoomnumber, delSubOp, fillInAreaRoom, fillInAreaRooms, flags, getArchivePath, getAreaIStats, getAreaState, getAreaStats, getAuthorID, getBlurbFlag, getCachedRoomnumbers, getChild, getChildren, getClimateObj, getCompleteMap, getCurrency, getFilledCompleteMap, getFilledProperMap, getMetroMap, getParent, getParents, getParentsRecurse, getPlayerLevel, getProperMap, getProperRoomnumbers, getRandomMetroRoom, getRandomProperRoom, getRoom, getSubOpList, getTheme, getThemeCode, getTimeObj, inMyMetroArea, isChild, isChild, isParent, isParent, isProperlyEmpty, isRoom, metroSize, numAllBlurbFlags, numberOfProperIDedRooms, numBlurbFlags, properSize, removeChild, removeParent, setArchivePath, setAreaState, setAuthorID, setClimateObj, setCurrency, setPlayerLevel, setProperRoomnumbers, setSubOpList, setTheme, setTimeObj, subOps
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Economics
budget, devalueRate, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, ignoreMask, invResetRate, itemPricingAdjustments, prejudiceFactors, setBudget, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Places
getAtmosphere, getAtmosphereCode, getClimateType, getClimateTypeCode, setAtmosphere, setClimateType
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Physical
description, displayText, name
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent
amDestroyed, destroy, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
 

Field Detail

ZEROES

public static final java.lang.String ZEROES
See Also:
Constant Field Values

xSize

protected int xSize

ySize

protected int ySize

yLength

protected int yLength
Constructor Detail

StdGridArea

public StdGridArea()
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 StdArea
Returns:
the name of this class

newInstance

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

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

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

roomIDFromPos

protected java.lang.String roomIDFromPos(int x,
                                         int y)

getGridChild

public Room getGridChild(int x,
                         int y)
Description copied from interface: GridZones
Returns the Room object at the given coordinates.

Specified by:
getGridChild in interface GridZones
Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the Room object at those coordinates
See Also:
Room

getRoomXY

public GridZones.XYVector getRoomXY(java.lang.String roomID)
Description copied from interface: GridZones
Returns the XY coordinates of the Room with the given roomID in XYVector format.

Specified by:
getRoomXY in interface GridZones
Parameters:
roomID - the roomID of the room to get coordinates for
Returns:
coordinates in XYVector format.
See Also:
GridZones.XYVector

getRoomXY

public GridZones.XYVector getRoomXY(Room room)
Description copied from interface: GridZones
Returns the XY coordinates of the Room, if a child of this gridzone, in XYVector format.

Specified by:
getRoomXY in interface GridZones
Parameters:
room - the room to get coordinates for
Returns:
coordinates in XYVector format.
See Also:
GridZones.XYVector

posFromRoomID

protected GridZones.XYVector posFromRoomID(Room loc)

getGridChildX

public int getGridChildX(Room loc)
Description copied from interface: GridZones
Returns the X coordinate of the given Room object

Specified by:
getGridChildX in interface GridZones
Parameters:
loc - the Room object
Returns:
the x coordinate of the room
See Also:
Room

getGridChildY

public int getGridChildY(Room loc)
Description copied from interface: GridZones
Returns the Y coordinate of the given Room object

Specified by:
getGridChildY in interface GridZones
Parameters:
loc - the Room object
Returns:
the y coordinate of the room
See Also:
Room

getGridChildCode

public java.lang.String getGridChildCode(Room loc)
Description copied from interface: GridZones
Returns the fully-qualified Room ID of this room

Specified by:
getGridChildCode in interface GridZones
Parameters:
loc - a Room object
Returns:
a fully qualified room ID
See Also:
Room, GridZones.getGridChild(String)

getRandomGridChild

public Room getRandomGridChild()
Description copied from interface: GridZones
Returns a random Room object that is a child of this one.

Specified by:
getRandomGridChild in interface GridZones
Returns:
a Room object
See Also:
Room

getGridChild

public Room getGridChild(java.lang.String childCode)
Description copied from interface: GridZones
Returns the fully-qualified Room ID of this room

Specified by:
getGridChild in interface GridZones
Parameters:
childCode - a fully-qualified Room ID for this Room
Returns:
a Room object
See Also:
Room, GridZones.getGridChildCode(Room)

isMyGridChild

public boolean isMyGridChild(Room loc)
Description copied from interface: GridZones
Returns whether the given Room is a child of this particular Grid instance.

Specified by:
isMyGridChild in interface GridZones
Parameters:
loc - a Room object
Returns:
whether the room is a child
See Also:
Room

xGridSize

public int xGridSize()
Description copied from interface: GridZones
Returns the total width of this grid.

Specified by:
xGridSize in interface GridZones
Returns:
the width

yGridSize

public int yGridSize()
Description copied from interface: GridZones
Returns the total height of this grid

Specified by:
yGridSize in interface GridZones
Returns:
the height

setXGridSize

public void setXGridSize(int x)
Description copied from interface: GridZones
Sets the total width of this grid.

Specified by:
setXGridSize in interface GridZones
Parameters:
x - the width

setYGridSize

public void setYGridSize(int y)
Description copied from interface: GridZones
Sets the total height of this grid.

Specified by:
setYGridSize in interface GridZones
Parameters:
y - the height

getGridChild

public Room getGridChild(GridZones.XYVector xy)
Description copied from interface: GridZones
Returns the Room object at the given coordinates.

Specified by:
getGridChild in interface GridZones
Parameters:
xy - the x and y coordinate
Returns:
the Room object at those coordinates
See Also:
Room, GridZones.XYVector