com.planet_ink.coffee_mud.Locales.interfaces
Interface GridLocale
- All Superinterfaces:
- Affectable, Behavable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, GridZones, ItemCollection, ItemPossessor, Modifiable, MsgListener, Physical, PhysicalAgent, Places, Room, StatsAffecting, Tickable
- 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, StdMaze, StdThinGrid, StoneGrid, StoneMaze, StoneThinGrid, SwampGrid, SwampThinGrid, UnderSaltWaterColumnGrid, UnderSaltWaterGrid, UnderSaltWaterMaze, UnderSaltWaterThinGrid, UnderWaterColumnGrid, UnderWaterGrid, UnderWaterMaze, UnderWaterThinGrid, WetCaveGrid, WetCaveMaze, Whirlpool, WoodRoomGrid, WoodRoomMaze, WoodRoomThinGrid, WoodsGrid, WoodsMaze, WoodsThinGrid
public interface GridLocale
- extends Room, GridZones
Interface for a Room that virtually contains other rooms, which are
called grid-child rooms. This is for producing substantially identical
rooms in grid formations, or mazes, or other groupings where unique
control of exits and content is not desired.
Grids have the following general features: They are rectangular with a
defineable width and length. All rooms in the grid are of the same
locale type. Grid children can only have exits to each other, or to
the GridLocale's exiting rooms, unless "outer exits" are defined.
Nested Class Summary |
static class |
GridLocale.CrossExit
class definition for an exit that goes from inside a grid locale child to a place
outside the parent gridlocale room |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room |
Room.VariationCode |
Fields inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room |
DOMAIN_INDOOR_MAP, DOMAIN_INDOORS_AIR, DOMAIN_INDOORS_CAVE, DOMAIN_INDOORS_DESCS, DOMAIN_INDOORS_MAGIC, DOMAIN_INDOORS_METAL, DOMAIN_INDOORS_STONE, DOMAIN_INDOORS_UNDERWATER, DOMAIN_INDOORS_WATERSURFACE, DOMAIN_INDOORS_WOOD, DOMAIN_OUTDOOR_DESCS, DOMAIN_OUTDOOR_MAP, 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_SEAPORT, DOMAIN_OUTDOORS_SPACEPORT, DOMAIN_OUTDOORS_SWAMP, DOMAIN_OUTDOORS_UNDERWATER, DOMAIN_OUTDOORS_WATERSURFACE, DOMAIN_OUTDOORS_WOODS, FILTER_ROOMONLY, INDOORS |
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 |
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. |
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. |
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. |
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. |
java.util.Iterator<Room> |
getExistingRooms()
Returns a read-only iterator over the existing grid-child rooms. |
java.lang.String |
getGridChildLocaleID()
Gets the Room ID() for the type of Java room class used to
populate the grid. |
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. |
Methods inherited from interface com.planet_ink.coffee_mud.Locales.interfaces.Room |
addInhabitant, bringMobHere, clearSky, delAllInhabitants, delInhabitant, domainType, eachInhabitant, fetchExit, fetchFromMOBRoomFavorsItems, fetchFromMOBRoomFavorsMOBs, fetchFromMOBRoomItemExit, fetchFromRoomFavorExits, fetchFromRoomFavorItems, fetchFromRoomFavorMOBs, fetchInhabitant, fetchInhabitant, fetchInhabitantExact, fetchInhabitants, fetchRandomInhabitant, getArea, getCombatTurnMobIndex, getContextName, getExitInDir, getGridParent, getMobility, getPairedExit, getRawExit, getReverseExit, getRoomInDir, getSky, giveASky, inhabitants, isHere, isInhabitant, maxRange, myResource, numInhabitants, numPCInhabitants, pointsPerMove, prepareRoomInDir, rawDoors, recoverRoomStats, resourceChoices, roomID, send, sendOthers, setArea, setCombatTurnMobIndex, 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.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.Environmental |
description, displayText, expirationDate, image, isGeneric, L, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text |
Methods inherited from interface java.lang.Comparable |
compareTo |
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 |
Methods inherited from interface com.planet_ink.coffee_mud.Areas.interfaces.GridZones |
getGridChild, getGridChild, getGridChild, getGridChildCode, getGridChildX, getGridChildY, getRandomGridChild, getRoomXY, getRoomXY, isMyGridChild, setXGridSize, setYGridSize, xGridSize, yGridSize |
getGridChildLocaleID
java.lang.String getGridChildLocaleID()
- Gets the Room ID() for the type of Java room class used to
populate the grid. For example: StdRoom.
- Returns:
- the Room ID() for the type of Java room class
prepareGridLocale
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.
Grids are not required to actually fill themselves in at boot
time, nor are they required to remain filled in. Therefore,
rooms can be constructed in real time.
This method is called whenever a player wants to move into another
room from a room that is part of a grid to some other room.
- Parameters:
fromRoom
- the room moving from, also the grid childtoRoom
- the room ostensibly being moved intodirection
- the direction from the from room moving
- Returns:
- the new to-room, the actual room to move into
buildGrid
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.
clearGrid
void clearGrid(Room bringBackHere)
- Empties the grid-children rooms of all contents, mob and item,
and then destroys the internal grid-children rooms themselves.
This puts the grid back into a default state.
- Parameters:
bringBackHere
- a room to teleport *ALL* mobs and items to
getAllRooms
java.util.List<Room> getAllRooms()
- Returns a read-only list of grid-child rooms. You are guaranteed
at least one room, even from grids that create them as-needed.
- Returns:
- a read-only list of grid-child rooms.
getAllRoomsFilled
java.util.List<Room> getAllRoomsFilled()
- Returns a read-only list of grid-child rooms, and any skys or seas
attached to them.
- Returns:
- a read-only list of all rooms around here.
getExistingRooms
java.util.Iterator<Room> getExistingRooms()
- Returns a read-only iterator over the existing grid-child rooms.
This iterator may be empty if the grid creates children as-needed.
- Returns:
- a read-only iterator over the existing grid-child rooms.
outerExits
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. Outer Exits are a way around
this by pre-defining exits from grid children to elsewhere on the
map, including into other gridlocales.
- Returns:
- an iterator of cross ("outer") exits.
- See Also:
GridLocale.CrossExit
,
addOuterExit(GridLocale.CrossExit)
,
delOuterExit(GridLocale.CrossExit)
addOuterExit
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. Outer Exits are a way around
this by pre-defining exits from grid children to elsewhere on the
map, including into other gridlocales.
This method will add a new one.
- Parameters:
x
- the new cross ("outer") exit- See Also:
GridLocale.CrossExit
,
outerExits()
,
delOuterExit(GridLocale.CrossExit)
delOuterExit
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. Outer Exits are a way around
this by pre-defining exits from grid children to elsewhere on the
map, including into other gridlocales.
This method will remove an existing one
- Parameters:
x
- the existing cross ("outer") exit to delete- See Also:
GridLocale.CrossExit
,
outerExits()
,
addOuterExit(GridLocale.CrossExit)