|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.Locales.StdRoom
com.planet_ink.coffee_mud.Locales.StdThinGrid
public class StdThinGrid
Nested Class Summary | |
---|---|
protected static class |
StdThinGrid.ThinGridEntry
|
protected static class |
StdThinGrid.ThinGridEntryConverter
|
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.GridLocale |
---|
GridLocale.CrossExit |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room |
---|
Room.VariationCode |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor |
---|
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.GridZones |
---|
GridZones.XYVector |
Field Summary | |
---|---|
protected java.lang.String[] |
descriptions
|
protected java.lang.String[] |
displayTexts
|
protected SVector<GridLocale.CrossExit> |
gridexits
|
protected Exit |
ox
|
protected SVector<StdThinGrid.ThinGridEntry> |
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 |
---|
affectPhyStats, affects, amDestroyed, atmosphere, basePhyStats, behaviors, cachedImageName, climask, combatTurnMobIndex, contents, description, displayText, doors, exits, expirationDate, gridParent, inhabitants, lastResourceTime, me, mobility, myArea, myID, myResource, name, phyStats, rawImageName, roomRecoverMarker, scripts, skyedYet, STDCODES, tickStatus, xtraValues |
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 |
Constructor Summary | |
---|---|
StdThinGrid()
|
Method Summary | |
---|---|
void |
addOuterExit(GridLocale.CrossExit x)
Normally the grid-child rooms can only exit to each other, or to the same places as the gridlocale host. |
protected Room |
alternativeLink(Room room,
Room defaultRoom,
int dir)
|
void |
buildGrid()
Called whenever structural changes are made to either the grid room, or one of the adjacent connecting rooms, this method will "rebuild" the grids internal structure as necessary. |
void |
clearGrid(Room bringBackHere)
Empties the grid-children rooms of all contents, mob and item, and then destroys the internal grid-children rooms themselves. |
protected void |
cloneFix(Room E)
|
void |
delOuterExit(GridLocale.CrossExit x)
Normally the grid-child rooms can only exit to each other, or to the same places as the gridlocale host. |
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.List<Room> |
getAllRooms()
Returns a read-only list of grid-child rooms. |
java.util.List<Room> |
getAllRoomsFilled()
Returns a read-only list of grid-child rooms, and any skys or seas attached to them. |
Room |
getAltRoomFrom(Room loc,
int direction)
|
java.util.Iterator<Room> |
getExistingRooms()
Returns a read-only iterator over the existing grid-child rooms. |
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 |
java.lang.String |
getGridChildLocaleID()
Gets the Room ID() for the type of Java room class used to populate the grid. |
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. |
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 |
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. |
protected int |
getStdGridCodeNum(java.lang.String code)
|
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.Iterator<GridLocale.CrossExit> |
outerExits()
Normally the grid-child rooms can only exit to each other, or to the same places as the gridlocale host. |
Room |
prepareGridLocale(Room fromRoom,
Room toRoom,
int direction)
Returns the room found in the given direction from the from-room, where the stand-in room is the to-room. |
Room |
prepareRoomInDir(Room fromRoom,
int direction)
This method is called by an adjoining room to resolve this room to its final object. |
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 |
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 |
setXGridSize(int x)
Sets the total width of this grid. |
void |
setYGridSize(int y)
Sets the total height of this grid. |
void |
tryFillInExtraneousExternal(GridLocale.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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor |
---|
addItem, moveItemTo, moveItemTo |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemCollection |
---|
addItem, delAllItems, delItem, eachItem, findItem, findItem, findItems, findItems, getItem, getRandomItem, isContent, items, numItems |
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, minRange, miscTextFormat, Name, rawImage, sameAs, 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, affectPhyStats |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
---|
amDestroyed, isSavable, setSavable |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, initializeClass, newInstance |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
---|
getSaveStatIndex, isStat |
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 |
---|
protected java.lang.String[] descriptions
protected java.lang.String[] displayTexts
protected SVector<GridLocale.CrossExit> gridexits
protected int xsize
protected int ysize
protected int yLength
protected Exit ox
protected final SVector<StdThinGrid.ThinGridEntry> rooms
protected static boolean tickStarted
Constructor Detail |
---|
public StdThinGrid()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdRoom
protected void cloneFix(Room E)
cloneFix
in class StdRoom
public java.lang.String getGridChildLocaleID()
GridLocale
getGridChildLocaleID
in interface GridLocale
public int xGridSize()
GridZones
xGridSize
in interface GridZones
public int yGridSize()
GridZones
yGridSize
in interface GridZones
public void setXGridSize(int x)
GridZones
setXGridSize
in interface GridZones
x
- the widthpublic void setYGridSize(int y)
GridZones
setYGridSize
in interface GridZones
y
- the heightpublic void destroy()
Contingent
destroy
in interface Contingent
destroy
in class StdRoom
public void setDescription(java.lang.String newDescription)
Environmental
setDescription
in interface Environmental
setDescription
in class StdRoom
newDescription
- the basic detail description of this objectpublic void setDisplayText(java.lang.String newDisplayText)
Environmental
setDisplayText
in interface Environmental
setDisplayText
in class StdRoom
newDisplayText
- the string describing how this object looks in the roompublic Room prepareRoomInDir(Room fromRoom, int direction)
Room
prepareRoomInDir
in interface Room
prepareRoomInDir
in class StdRoom
fromRoom
- the room being traveled fromdirection
- the direction from the fromRoom being travelled in
protected Room getGridRoomIfExists(int x, int y)
public Room prepareGridLocale(Room fromRoom, Room toRoom, int direction)
GridLocale
prepareGridLocale
in interface GridLocale
fromRoom
- the room moving from, also the grid childtoRoom
- the room ostensibly being moved intodirection
- the direction from the from room moving
public Room getGridChild(int x, int y)
GridZones
getGridChild
in interface GridZones
x
- the x coordinatey
- the y coordinate
Room
public Room getGridChild(GridZones.XYVector xy)
GridZones
getGridChild
in interface GridZones
xy
- the x and y coordinate
Room
,
GridZones.XYVector
protected Room getMakeSingleGridRoom(int x, int y)
public GridZones.XYVector getRoomXY(Room room)
GridZones
getRoomXY
in interface GridZones
room
- the room to get coordinates for
GridZones.XYVector
public GridZones.XYVector getRoomXY(java.lang.String roomID)
GridZones
getRoomXY
in interface GridZones
roomID
- the roomID of the room to get coordinates for
GridZones.XYVector
protected void fillExitsOfGridRoom(Room R, int x, int y)
public void tryFillInExtraneousExternal(GridLocale.CrossExit EX, Exit ox, Room linkFrom)
protected Room getMakeGridRoom(int x, int y)
public java.util.Iterator<GridLocale.CrossExit> outerExits()
GridLocale
outerExits
in interface GridLocale
GridLocale.CrossExit
,
GridLocale.addOuterExit(GridLocale.CrossExit)
,
GridLocale.delOuterExit(GridLocale.CrossExit)
public void delOuterExit(GridLocale.CrossExit x)
GridLocale
delOuterExit
in interface GridLocale
x
- the existing cross ("outer") exit to deleteGridLocale.CrossExit
,
GridLocale.outerExits()
,
GridLocale.addOuterExit(GridLocale.CrossExit)
public void addOuterExit(GridLocale.CrossExit x)
GridLocale
addOuterExit
in interface GridLocale
x
- the new cross ("outer") exitGridLocale.CrossExit
,
GridLocale.outerExits()
,
GridLocale.delOuterExit(GridLocale.CrossExit)
public Room getAltRoomFrom(Room loc, int direction)
public java.util.List<Room> getAllRooms()
GridLocale
getAllRooms
in interface GridLocale
public java.util.List<Room> getAllRoomsFilled()
GridLocale
getAllRoomsFilled
in interface GridLocale
public java.util.Iterator<Room> getExistingRooms()
GridLocale
getExistingRooms
in interface GridLocale
protected Room alternativeLink(Room room, Room defaultRoom, int dir)
protected void halfLink(Room room, Room loc, int dirCode, Exit o)
protected void linkRoom(Room room, Room loc, int dirCode, Exit o, Exit ao)
public void buildGrid()
GridLocale
buildGrid
in interface GridLocale
public boolean isMyGridChild(Room loc)
GridZones
isMyGridChild
in interface GridZones
loc
- a Room object
Room
public void clearGrid(Room bringBackHere)
GridLocale
clearGrid
in interface GridLocale
bringBackHere
- a room to teleport *ALL* mobs and items topublic java.lang.String getGridChildCode(Room loc)
GridZones
getGridChildCode
in interface GridZones
loc
- a Room object
Room
,
GridZones.getGridChild(String)
public int getGridChildX(Room loc)
GridZones
getGridChildX
in interface GridZones
loc
- the Room object
Room
public Room getRandomGridChild()
GridZones
getRandomGridChild
in interface GridZones
Room
public int getGridChildY(Room loc)
GridZones
getGridChildY
in interface GridZones
loc
- the Room object
Room
public Room getGridChild(java.lang.String childCode)
GridZones
getGridChild
in interface GridZones
childCode
- a fully-qualified Room ID for this Room
Room
,
GridZones.getGridChildCode(Room)
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdRoom
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdRoom
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executed
CMMsg
,
CMMsg.source()
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
getStat
in class StdRoom
code
- the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
setStat
in class StdRoom
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
protected int getStdGridCodeNum(java.lang.String code)
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
getStatCodes
in class StdRoom
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |