com.planet_ink.coffee_mud.Locales
Class StdThinGrid

java.lang.Object
  extended by com.planet_ink.coffee_mud.Locales.StdRoom
      extended by com.planet_ink.coffee_mud.Locales.StdThinGrid
All Implemented Interfaces:
GridZones, Affectable, Behavable, CMModifiable, CMObject, Environmental, MsgListener, StatsAffecting, Tickable, GridLocale, Room, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
DesertThinGrid, EndlessThinOcean, EndlessThinSky, GreatThinLake, HillsThinGrid, JungleThinGrid, MountainsThinGrid, MountainSurfaceThinGrid, PlainsThinGrid, RoadThinGrid, StoneThinGrid, SwampThinGrid, UnderWaterThinGrid, WoodRoomThinGrid, WoodsThinGrid

public class StdThinGrid
extends StdRoom
implements GridLocale


Field Summary
protected  java.util.Vector descriptions
           
protected  java.util.Vector displayTexts
           
protected  java.util.Vector gridexits
           
protected  Exit ox
           
protected  DVector rooms
           
protected static boolean tickStarted
           
protected  int xsize
           
protected  int yLength
           
protected  int ysize
           
 
Fields inherited from class com.planet_ink.coffee_mud.Locales.StdRoom
affects, amDestroyed, baseEnvStats, behaviors, contents, description, displayText, doors, envStats, exits, expirationDate, gridParent, imageName, inhabitants, mobility, myArea, myID, myResource, name, resourceFound, scripts, skyedYet, tickStatus, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room
CONDITION_COLD, CONDITION_HOT, CONDITION_NORMAL, CONDITION_WET, DOMAIN_INDOORS_AIR, DOMAIN_INDOORS_CAVE, DOMAIN_INDOORS_MAGIC, DOMAIN_INDOORS_METAL, DOMAIN_INDOORS_STONE, DOMAIN_INDOORS_UNDERWATER, DOMAIN_INDOORS_WATERSURFACE, DOMAIN_INDOORS_WOOD, DOMAIN_OUTDOORS_AIR, DOMAIN_OUTDOORS_CITY, DOMAIN_OUTDOORS_DESERT, DOMAIN_OUTDOORS_HILLS, DOMAIN_OUTDOORS_JUNGLE, DOMAIN_OUTDOORS_MOUNTAINS, DOMAIN_OUTDOORS_PLAINS, DOMAIN_OUTDOORS_ROCKS, DOMAIN_OUTDOORS_SPACEPORT, DOMAIN_OUTDOORS_SWAMP, DOMAIN_OUTDOORS_UNDERWATER, DOMAIN_OUTDOORS_WATERSURFACE, DOMAIN_OUTDOORS_WOODS, indoorDomainDescs, INDOORS, outdoorDomainDescs, variationCodes
 
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_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
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_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
Constructor Summary
StdThinGrid()
           
 
Method Summary
 void addOuterExit(WorldMap.CrossExit x)
           
protected  Room alternativeLink(Room room, Room defaultRoom, int dir)
           
 void buildGrid()
           
 void clearGrid(Room bringBackHere)
           
protected  void cloneFix(Room E)
           
 void delOuterExit(WorldMap.CrossExit x)
           
 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.
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
protected  void fillExitsOfGridRoom(Room R, int x, int y)
           
 java.util.Vector getAllRooms()
           
 Room getAltRoomFrom(Room loc, int direction)
           
 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
 java.lang.String getGridChildLocaleID()
           
 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
protected  Room getGridRoomIfExists(int x, int y)
           
protected  Room getMakeGridRoom(int x, int y)
           
protected  Room getMakeSingleGridRoom(int x, int y)
           
 Room getRandomGridChild()
          Returns a random Room object that is a child of this one.
 int[] getRoomXY(java.lang.String roomID)
          Returns the XY coordinates of the Room with the given roomID in int[]{x,y} format.
protected  void halfLink(Room room, Room loc, int dirCode, Exit o)
           
 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.
protected  void linkRoom(Room room, Room loc, int dirCode, Exit o, Exit ao)
           
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
 java.util.Vector outerExits()
           
 Room prepareGridLocale(Room fromRoom, Room toRoom, int direction)
           
 Room prepareRoomInDir(Room fromRoom, int direction)
           
 void setDescription(java.lang.String newDescription)
          Sets the basic description of this object, as shown when the item is directly LOOKed at.
 void setDisplayText(java.lang.String newDisplayText)
          Sets the raw string used to show what this object looks like in the room.
 void setXGridSize(int x)
          Sets the total width of this grid.
 void setYGridSize(int y)
          Sets the total height of this grid.
 void tryFillInExtraneousExternal(WorldMap.CrossExit EX, Exit ox, Room linkFrom)
           
 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.Locales.StdRoom
addBehavior, addEffect, addInhabitant, addItem, addItemRefuse, addNonUninvokableEffect, addScript, affectCharState, affectCharStats, affectEnvStats, amDestroyed, baseEnvStats, baseThirst, bringItemHere, bringMobHere, clearSky, compareTo, copyOf, delBehavior, delEffect, delInhabitant, delItem, delScript, description, displayText, domainConditions, domainType, envStats, expirationDate, fetchAnyItem, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchFromMOBRoomFavorsItems, fetchFromMOBRoomItemExit, fetchFromRoomFavorItems, fetchFromRoomFavorMOBs, fetchInhabitant, fetchInhabitant, fetchItem, fetchItem, fetchPCInhabitant, fetchScript, finalize, getArea, getCodeNum, getContextName, getExitInDir, getGridParent, getMobility, getPairedExit, getRawExit, getReverseExit, getRoomInDir, getSaveStatIndex, getStat, getStatCodes, getTickStatus, giveASky, herbTwistChart, image, initializeClass, isContent, isGeneric, isHere, isInhabitant, isSameRoom, isStat, maxRange, minRange, miscTextFormat, myResource, name, Name, newInstance, numBehaviors, numEffects, numInhabitants, numItems, numPCInhabitants, numScripts, parseVaries, parseVariesCodes, pointsPerMove, rawDoors, rawImage, reallyReallySend, reallySend, recoverEnvStats, recoverRoomStats, resetVectors, resourceChoices, roomDescription, roomID, roomTitle, sameAs, savable, send, sendOthers, setArea, setBaseEnvStats, setExpirationDate, setGridParent, setImage, setMiscText, setName, setRawExit, setResource, setRoomID, setStat, show, show, show, show, show, showHappens, showHappens, showOthers, showOthers, showSource, showSource, startItemRejuv, text, thirstPerRound, tick, toggleMobility
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room
addInhabitant, addItem, addItemRefuse, bringItemHere, bringMobHere, clearSky, delInhabitant, delItem, domainConditions, domainType, fetchAnyItem, fetchFromMOBRoomFavorsItems, fetchFromMOBRoomItemExit, fetchFromRoomFavorItems, fetchFromRoomFavorMOBs, fetchInhabitant, fetchInhabitant, fetchItem, fetchItem, fetchPCInhabitant, getArea, getContextName, getExitInDir, getGridParent, getMobility, getPairedExit, getRawExit, getReverseExit, getRoomInDir, giveASky, isContent, isHere, isInhabitant, isSameRoom, myResource, numInhabitants, numItems, numPCInhabitants, pointsPerMove, rawDoors, recoverRoomStats, resetVectors, resourceChoices, roomDescription, roomID, roomTitle, send, sendOthers, setArea, setGridParent, setRawExit, setResource, setRoomID, show, show, show, show, show, showHappens, showHappens, showOthers, showOthers, showSource, showSource, startItemRejuv, thirstPerRound, toggleMobility
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
addEffect, addNonUninvokableEffect, amDestroyed, baseEnvStats, delEffect, description, displayText, envStats, expirationDate, fetchEffect, fetchEffect, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, numEffects, rawImage, recoverEnvStats, sameAs, savable, setBaseEnvStats, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectEnvStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMModifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, baseEnvStats, delEffect, envStats, fetchEffect, fetchEffect, numEffects, recoverEnvStats, setBaseEnvStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
addEffect, addNonUninvokableEffect, amDestroyed, baseEnvStats, delEffect, description, displayText, envStats, expirationDate, fetchEffect, fetchEffect, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, numEffects, rawImage, recoverEnvStats, sameAs, savable, setBaseEnvStats, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectEnvStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMModifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

descriptions

protected java.util.Vector descriptions

displayTexts

protected java.util.Vector displayTexts

gridexits

protected java.util.Vector gridexits

xsize

protected int xsize

ysize

protected int ysize

yLength

protected int yLength

ox

protected Exit ox

rooms

protected final DVector rooms

tickStarted

protected static boolean tickStarted
Constructor Detail

StdThinGrid

public StdThinGrid()
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, MiscTech. The name is typically identical to the class name.

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

cloneFix

protected void cloneFix(Room E)
Overrides:
cloneFix in class StdRoom

getGridChildLocaleID

public java.lang.String getGridChildLocaleID()
Specified by:
getGridChildLocaleID in interface GridLocale

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

destroy

public void destroy()
Description copied from interface: Environmental
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 Environmental
Overrides:
destroy in class StdRoom

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
Overrides:
setDescription in class StdRoom
Parameters:
newDescription - the basic detail description of this object

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
Overrides:
setDisplayText in class StdRoom
Parameters:
newDisplayText - the string describing how this object looks in the room

prepareRoomInDir

public Room prepareRoomInDir(Room fromRoom,
                             int direction)
Specified by:
prepareRoomInDir in interface Room
Overrides:
prepareRoomInDir in class StdRoom

getGridRoomIfExists

protected Room getGridRoomIfExists(int x,
                                   int y)

prepareGridLocale

public Room prepareGridLocale(Room fromRoom,
                              Room toRoom,
                              int direction)
Specified by:
prepareGridLocale in interface GridLocale

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

getMakeSingleGridRoom

protected Room getMakeSingleGridRoom(int x,
                                     int y)

getRoomXY

public int[] getRoomXY(java.lang.String roomID)
Description copied from interface: GridZones
Returns the XY coordinates of the Room with the given roomID in int[]{x,y} format.

Specified by:
getRoomXY in interface GridZones
Parameters:
roomID - the roomID of the room to get coordinates for
Returns:
coordinates in int[]{x,y} format.

fillExitsOfGridRoom

protected void fillExitsOfGridRoom(Room R,
                                   int x,
                                   int y)

tryFillInExtraneousExternal

public void tryFillInExtraneousExternal(WorldMap.CrossExit EX,
                                        Exit ox,
                                        Room linkFrom)

getMakeGridRoom

protected Room getMakeGridRoom(int x,
                               int y)

outerExits

public java.util.Vector outerExits()
Specified by:
outerExits in interface GridLocale

delOuterExit

public void delOuterExit(WorldMap.CrossExit x)
Specified by:
delOuterExit in interface GridLocale

addOuterExit

public void addOuterExit(WorldMap.CrossExit x)
Specified by:
addOuterExit in interface GridLocale

getAltRoomFrom

public Room getAltRoomFrom(Room loc,
                           int direction)

getAllRooms

public java.util.Vector getAllRooms()
Specified by:
getAllRooms in interface GridLocale

alternativeLink

protected Room alternativeLink(Room room,
                               Room defaultRoom,
                               int dir)

halfLink

protected void halfLink(Room room,
                        Room loc,
                        int dirCode,
                        Exit o)

linkRoom

protected void linkRoom(Room room,
                        Room loc,
                        int dirCode,
                        Exit o,
                        Exit ao)

buildGrid

public void buildGrid()
Specified by:
buildGrid in interface GridLocale

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

clearGrid

public void clearGrid(Room bringBackHere)