com.planet_ink.coffee_mud.Areas.interfaces
Interface GridZones

All Superinterfaces:
java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, Modifiable, MsgListener, StatsAffecting, Tickable
All Known Subinterfaces:
GridLocale
All Known Implementing Classes:
CaveGrid, CaveMaze, DesertGrid, DesertMaze, DesertThinGrid, EndlessOcean, EndlessSky, EndlessThinOcean, EndlessThinSky, GreatLake, GreatThinLake, HillsGrid, HillsThinGrid, IndoorUnderWaterColumnGrid, IndoorUnderWaterGrid, IndoorUnderWaterThinGrid, JungleGrid, JungleThinGrid, MetalRoomMaze, MountainsGrid, MountainsMaze, MountainsThinGrid, MountainSurfaceGrid, MountainSurfaceThinGrid, OceanGrid, OceanThinGrid, PlainsGrid, PlainsThinGrid, RoadGrid, RoadThinGrid, SewerMaze, StdGrid, StdGridArea, StdMaze, StdThinGrid, StdThinGridArea, StoneGrid, StoneMaze, StoneThinGrid, SwampGrid, SwampThinGrid, UnderSaltWaterColumnGrid, UnderSaltWaterGrid, UnderSaltWaterMaze, UnderSaltWaterThinGrid, UnderWaterColumnGrid, UnderWaterGrid, UnderWaterMaze, UnderWaterThinGrid, WetCaveGrid, WetCaveMaze, Whirlpool, WoodRoomGrid, WoodRoomMaze, WoodRoomThinGrid, WoodsGrid, WoodsMaze, WoodsThinGrid

public interface GridZones
extends Environmental

GridZones is a cross-object interface that applies both to Areas, and Locales. It represents an area (or room) organized like a Grid.


Nested Class Summary
static class GridZones.XYVector
          A class for holding x/y coordinates.
 
Field Summary
 
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
 
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
 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.
 boolean isMyGridChild(Room loc)
          Returns whether the given Room is a child of this particular Grid instance.
 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 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, ID, initializeClass, newInstance
 
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
 

Method Detail

isMyGridChild

boolean isMyGridChild(Room loc)
Returns whether the given Room is a child of this particular Grid instance.

Parameters:
loc - a Room object
Returns:
whether the room is a child
See Also:
Room

getGridChildCode

java.lang.String getGridChildCode(Room loc)
Returns the fully-qualified Room ID of this room

Parameters:
loc - a Room object
Returns:
a fully qualified room ID
See Also:
Room, getGridChild(String)

getGridChild

Room getGridChild(java.lang.String childCode)
Returns the fully-qualified Room ID of this room

Parameters:
childCode - a fully-qualified Room ID for this Room
Returns:
a Room object
See Also:
Room, getGridChildCode(Room)

getRandomGridChild

Room getRandomGridChild()
Returns a random Room object that is a child of this one.

Returns:
a Room object
See Also:
Room

getGridChildX

int getGridChildX(Room loc)
Returns the X coordinate of the given Room object

Parameters:
loc - the Room object
Returns:
the x coordinate of the room
See Also:
Room

getGridChildY

int getGridChildY(Room loc)
Returns the Y coordinate of the given Room object

Parameters:
loc - the Room object
Returns:
the y coordinate of the room
See Also:
Room

getRoomXY

GridZones.XYVector getRoomXY(java.lang.String roomID)
Returns the XY coordinates of the Room with the given roomID in XYVector format.

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

getRoomXY

GridZones.XYVector getRoomXY(Room room)
Returns the XY coordinates of the Room, if a child of this gridzone, in XYVector format.

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

xGridSize

int xGridSize()
Returns the total width of this grid.

Returns:
the width

yGridSize

int yGridSize()
Returns the total height of this grid

Returns:
the height

setXGridSize

void setXGridSize(int x)
Sets the total width of this grid.

Parameters:
x - the width

setYGridSize

void setYGridSize(int y)
Sets the total height of this grid.

Parameters:
y - the height

getGridChild

Room getGridChild(int x,
                  int y)
Returns the Room object at the given coordinates.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the Room object at those coordinates
See Also:
Room

getGridChild

Room getGridChild(GridZones.XYVector xy)
Returns the Room object at the given coordinates.

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