Modifier and Type | Interface | Description |
---|---|---|
static interface |
WorldMap.LocatedPair |
Helper class for world searches, as it returns both the thing Found,
as well as the room in which it was found.
|
Modifier and Type | Field | Description |
---|---|---|
static long |
ROOM_EXPIRATION_MILLIS |
The number of milliseconds before a thin room expires.
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
void |
addArea(Area newOne) |
Adds the given area to the world map list.
|
void |
addGlobalHandler(MsgListener E,
int category) |
Add a listener to the Global Alternative message passing system.
|
Area |
areaLocation(CMObject E) |
Returns the Area in which the given object exists in, or is
attached to.
|
java.util.Enumeration<Area> |
areas() |
Returns an enumeration of all world map areas.
|
java.util.Enumeration<Area> |
areasPlusShips() |
Returns an enumeration of all map areas, including all areas inside
ships, caravans, etc.
|
java.lang.String |
createNewExit(Room from,
Room room,
int direction) |
Attempts to create a pair of Open exits from the from room to the
room room.
|
java.util.Enumeration<Deity> |
deities() |
Returns an enumeration of all the Deity-derived registered objects
in the game.
|
MOB |
deity() |
Returns the first available deity, creating one from
scratch if necessary.
|
void |
delArea(Area oneToDel) |
Deletes the given area from the world map list.
|
void |
delGlobalHandler(MsgListener E,
int category) |
Remove a listener from the Global Alternative message passing system.
|
void |
destroyAreaObject(Area theOne) |
Empties all the rooms in the given area, destroys all the
content, and destroys the area itself, removing it from
the world map.
|
void |
destroyRoomObject(Room deadRoom) |
Removes the given room from the map, clears it, and deletes
any incoming exits.
|
void |
emptyAreaAndDestroyRooms(Area A) |
This method removes any area effects, and then empties and
destroys every room in the area.
|
void |
emptyRoom(Room room,
Room toRoom,
boolean clearPlayers) |
Empties the given room of mobs and items, optionally moving stuff to
another room.
|
Area |
findArea(java.lang.String calledThis) |
Given a partial area name, this will return area from the map that
either matches the string, or partially matches it.
|
Area |
findAreaStartsWith(java.lang.String calledThis) |
Given an area name prefix, this will return the area from the map that
either matches the string, or whose name starts with it.
|
Room |
findConnectingRoom(Room room) |
Returns a room that is connected to, and preferably links
back, to the given room.
|
Area |
findRoomIDArea(java.lang.String roomID) |
Given a room ID, this will return the area to which the room it
matches belongs.
|
Boardable |
findShip(java.lang.String s,
boolean exactOnly) |
Searches the list of existing registered boardables, such as sailing ships,
space ships, castles, and caravans.
|
java.lang.String |
getApproximateExtendedRoomID(Room room) |
All proper rooms, rooms savable to the database, have
a unique room ID.
|
Area |
getArea(java.lang.String calledThis) |
Given an area name, this will return the area from the map whose
name matches this one.
|
Room |
getCachedRoom(java.lang.String roomID) |
Given a room ID, this will return the room on the map that matches, it.
|
java.util.Map<java.lang.String,TimeClock> |
getClockCache() |
Returns the world-wide clock/timezone cache.
|
Area |
getDefaultParentArea() |
If the coffeemud.ini file defines a default parent area to which all
newly created areas should be automatically added, this will return
that area.
|
Deity |
getDeity(java.lang.String calledThis) |
Returns the world deity of the given name, if it exists.
|
java.lang.String |
getDescriptiveExtendedRoomID(Room room) |
Similar to the approximate version, this will return a reference
to the nearest room, along with which direction its in relative
to the given room.
|
int |
getExitDir(Room from,
Exit to) |
Given a room and an exit, this will return which
direction code is being used.
|
java.lang.String |
getExtendedRoomID(Room R) |
If the given room has a proper room id, this
will return it.
|
java.lang.String |
getExtendedTwinRoomIDs(Room R1,
Room R2) |
Returns the extended room IDs of both the given rooms,
in a deterministic ordering, with an underscore between
them -- nothing else.
|
MOB |
getFactoryMOB(Room R) |
If a mob is needed as a msg host/source, and it doesn't matter the
name or level, then this is the method for you.
|
MOB |
getFactoryMOBInAnyRoom() |
If a mob is needed as a msg host/source, and it doesn't matter the
name, level, room, or anything, then this is the method for you.
|
Area |
getFirstArea() |
Returns the first area in the world map.
|
CMFile.CMVFSDir |
getMapRoot(CMFile.CMVFSDir root) |
Generates a fake VFS file tree for the database game world map.
|
Area |
getModelArea(Area A) |
Normally just returns the given area.
|
Area |
getRandomArea() |
Returns a random area from the world map.
|
Room |
getRandomRoom() |
Returns a random room from a random area on the map.
|
Room |
getRoom(Room room) |
Because rooms can expire, but their references remain, this
method exists to check for a destroyed condition and, if the
room is destroyed, this will check for a replacement, and
de-cache it if possible.
|
Room |
getRoom(java.lang.String roomID) |
Given a room ID, this will return the room on the map that
matches this room id.
|
Room |
getRoom(java.util.Enumeration<Room> roomSet,
java.lang.String roomID) |
Enumerates through the given room set, returning the
room with the given room ID.
|
Room |
getRoomAllHosts(java.lang.String roomID) |
Given a room ID, this will return the room on the map that matches, it.
|
int |
getRoomDir(Room from,
Room to) |
Given a room and a target room, this will return which
direction code is being used.
|
Room |
getSafeRoomToMovePropertyTo(Room room,
PrivateProperty I) |
Returns the parent room of the given private property, if it is a boardable,
or the given room if not.
|
Boardable |
getShip(java.lang.String calledThis) |
Checks the list of existing registered boardables, such as sailing ships,
space ships, castles, and caravans.
|
Area |
getStartArea(Environmental E) |
Attempts to return the start/orig area for the given mob or item
or room or whatever.
|
Room |
getStartRoom(Environmental E) |
Attempts to return the start/orig room for the given mob or item
or room or whatever.
|
Area |
getTargetArea(Room from,
Exit to) |
Given a room and an exit, this will return which area
it will lead to.
|
Room |
getTargetRoom(Room from,
Exit to) |
Given a room and an exit, this will return which room
it will lead to.
|
boolean |
hasASky(Room room) |
Returns whether the given room might have a sky, due to
being outdoors but not being underwater.
|
boolean |
isClearableRoom(Room room) |
Sends any mobs or players in the given room to their start room,
and returns whether any players, private property, or player
corpses remain.
|
java.util.Enumeration<Area> |
mundaneAreas() |
Returns an enumeration of all areas which are not
also space objects, meaning they are mundane and
normal game areas.
|
int |
numAreas() |
Returns the number of areas on the map list, not including ships or
other item-internal-areas.
|
int |
numRooms() |
Returns the sum of all the proper rooms in every area in all the world.
|
int |
numShips() |
Returns the number of registered boardables, such as sailing ships,
space ships, castles, and caravans.
|
void |
obliterateMapArea(Area theOne) |
Empties all the rooms in the given area, destroys all the
content, and destroys the area itself, removing it from
the world map.
|
void |
obliterateMapRoom(Room deadRoom) |
Removes the given room from the map, clears it, and deletes
any incoming exits.
|
void |
registerWorldObjectDestroyed(Area area,
Room room,
CMObject o) |
When a map object is permanently destroyed, this method is called
to give the world map manager a chance to remove tracking for it.
|
void |
registerWorldObjectLoaded(Area area,
Room room,
CMObject o) |
When a map object is permanently added to the map, such as during map
load, this method is called to give the world map manager a chance
to keep track of it.
|
void |
renamedArea(Area theA) |
Whenever the given area is renamed, this method
should be called, which will cause the areas to be
re-sorted, and the area finder cache clear.
|
void |
renameRooms(Area A,
java.lang.String oldName,
java.util.List<Room> allMyDamnRooms) |
This will take an area that was recently renamed, and an optional list of
all its existing rooms, and rename the rooms to reflect the new name,
updating the database along the way.
|
void |
resetArea(Area area) |
Resets the given area by resetting all the cached rooms in it.
|
void |
resetRoom(Room room) |
Resets the contents of the given room to stock, without clearing grid
rooms.
|
void |
resetRoom(Room room,
boolean rebuildGrids) |
Resets the contents of the given room to stock, clearing any grids
if necessary.
|
java.util.Enumeration<java.lang.String> |
roomIDs() |
Returns an enumeration of all proper room ids in
every area in the world.
|
Room |
roomLocation(Environmental E) |
Returns the Room in which the given object exists in, or is
attached to.
|
java.util.Enumeration<Room> |
rooms() |
Returns an enumeration of every CACHED proper room in every area, including
'filled' proper rooms, which also includes ships and similar areas.
|
java.util.Enumeration<Room> |
roomsFilled() |
Returns an enumeration of every CACHED room in every area, including
'filled' rooms, which includes skys and underwater rooms, which
also includes ships and similar areas.
|
java.util.Enumeration<WorldMap.LocatedPair> |
scriptHosts(Area area) |
Returns an enumeration of all objects scripted upon creation
in the world, or in the given area (non-metro).
|
boolean |
sendGlobalMessage(MOB host,
int category,
CMMsg msg) |
Send a message to all relevant listeners in the Global
Alternative message passing system.
|
java.util.Enumeration<Boardable> |
ships() |
Returns an enumeration of all registered boardables, such as sailing ships,
space ships, castles, and caravans.
|
java.util.Enumeration<Room> |
shipsRoomEnumerator(Area inA) |
Returns an enumerator of all rooms contained in a registered
boardable, such as a sailing ship, space ship, castle, or
caravan, which is also in the given Area.
|
java.util.Enumeration<Area> |
topAreas() |
Returns an enumeration of all areas which do NOT have
any parent areas, thus being the 'top' areas.
|
java.util.Enumeration<Item> |
worldEveryItems() |
Returns a JIT enumeration of every CACHED item in every room
on the map, well as every mob in every room on the map,
as it presently exists at the time the Next method is
called.
|
java.util.Enumeration<MOB> |
worldMobs() |
Returns a JIT enumeration of every CACHED mob in every room
on the map, as it presently exists at the time the Next
method is called.
|
java.util.Enumeration<Item> |
worldRoomItems() |
Returns a JIT enumeration of every CACHED item in every room
on the map, as it presently exists at the time the Next
method is called.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
static final long ROOM_EXPIRATION_MILLIS
int numAreas()
getArea(String)
,
addArea(Area)
,
delArea(Area)
void addArea(Area newOne)
newOne
- the new area to add to the listgetArea(String)
,
delArea(Area)
,
numAreas()
void delArea(Area oneToDel)
oneToDel
- the area to removegetArea(String)
,
addArea(Area)
,
numAreas()
Area getArea(java.lang.String calledThis)
calledThis
- the area nameArea findAreaStartsWith(java.lang.String calledThis)
calledThis
- the area name, or area name prefixfindArea(String)
,
findAreaStartsWith(String)
,
getArea(String)
Area findArea(java.lang.String calledThis)
calledThis
- the area name, or partial area namefindArea(String)
,
findAreaStartsWith(String)
,
getArea(String)
Area getDefaultParentArea()
Area findRoomIDArea(java.lang.String roomID)
roomID
- the room id to get the area forjava.util.Enumeration<Area> areas()
mundaneAreas()
,
topAreas()
,
areasPlusShips()
java.util.Enumeration<Area> mundaneAreas()
areas()
,
topAreas()
,
areasPlusShips()
java.util.Enumeration<Area> topAreas()
areas()
,
mundaneAreas()
,
areasPlusShips()
java.util.Enumeration<Area> areasPlusShips()
areas()
,
mundaneAreas()
,
topAreas()
Area getModelArea(Area A)
A
- the area to return the model ofArea getFirstArea()
getRandomArea()
Area getRandomArea()
getFirstArea()
void obliterateMapArea(Area theOne)
theOne
- the area to obliteratedestroyAreaObject(Area)
void destroyAreaObject(Area theOne)
theOne
- the area to destroyobliterateMapArea(Area)
void renamedArea(Area theA)
theA
- the area that was renamedrenameRooms(Area, String, List)
int numRooms()
java.util.Enumeration<java.lang.String> roomIDs()
java.lang.String getExtendedRoomID(Room R)
R
- the room to return a room id forgetExtendedRoomID(Room)
,
getExtendedTwinRoomIDs(Room, Room)
,
getDescriptiveExtendedRoomID(Room)
,
getApproximateExtendedRoomID(Room)
java.lang.String getDescriptiveExtendedRoomID(Room room)
room
- the room to find a descriptive reference togetExtendedRoomID(Room)
,
getExtendedTwinRoomIDs(Room, Room)
,
getApproximateExtendedRoomID(Room)
java.lang.String getExtendedTwinRoomIDs(Room R1, Room R2)
R1
- the first roomR2
- the second roomgetExtendedRoomID(Room)
,
getDescriptiveExtendedRoomID(Room)
,
getApproximateExtendedRoomID(Room)
java.lang.String getApproximateExtendedRoomID(Room room)
room
- the room to find the nearest id for.getExtendedRoomID(Room)
,
getExtendedTwinRoomIDs(Room, Room)
,
getDescriptiveExtendedRoomID(Room)
Room getRoom(Room room)
room
- the room that may or may not be expiredgetRoom(String)
,
getRoom(Enumeration, String)
,
getCachedRoom(String)
,
getRoomAllHosts(String)
Room getRoom(java.lang.String roomID)
roomID
- the room id to get the room forgetRoom(Room)
,
getRoom(Enumeration, String)
,
getCachedRoom(String)
,
getRoomAllHosts(String)
Room getRoom(java.util.Enumeration<Room> roomSet, java.lang.String roomID)
roomSet
- an enumeration of rooms to checkroomID
- the room ID of the room to getgetRoom(Room)
,
getRoom(String)
,
getCachedRoom(String)
,
getRoomAllHosts(String)
Room getCachedRoom(java.lang.String roomID)
roomID
- the room ID to getgetRoom(Room)
,
getRoom(String)
,
getRoom(Enumeration, String)
,
getCachedRoom(String)
,
getRoomAllHosts(String)
Room getRoomAllHosts(java.lang.String roomID)
roomID
- the room ID to getgetRoom(Room)
,
getRoom(String)
,
getRoom(Enumeration, String)
,
getCachedRoom(String)
java.util.Enumeration<Room> rooms()
roomsFilled()
java.util.Enumeration<Room> roomsFilled()
rooms()
java.util.Enumeration<MOB> worldMobs()
worldEveryItems()
,
worldRoomItems()
java.util.Enumeration<Item> worldRoomItems()
worldEveryItems()
,
worldMobs()
java.util.Enumeration<Item> worldEveryItems()
worldEveryItems()
,
worldMobs()
Room getRandomRoom()
void renameRooms(Area A, java.lang.String oldName, java.util.List<Room> allMyDamnRooms)
A
- the area that WAS renamedoldName
- the previous name of the given areaallMyDamnRooms
- null, or the list of existing rooms.renamedArea(Area)
void obliterateMapRoom(Room deadRoom)
deadRoom
- the room to remove from the mapdestroyRoomObject(Room)
,
obliterateMapArea(Area)
void destroyRoomObject(Room deadRoom)
deadRoom
- the room to remove from the mapobliterateMapRoom(Room)
,
destroyAreaObject(Area)
Room findConnectingRoom(Room room)
room
- the room to look at exits fromint getRoomDir(Room from, Room to)
from
- the initial roomto
- the room being targetDirections
,
getTargetArea(Room, Exit)
,
getTargetRoom(Room, Exit)
,
getExitDir(Room, Exit)
int getExitDir(Room from, Exit to)
from
- the initial roomto
- the exit being usedDirections
,
getTargetArea(Room, Exit)
,
getTargetRoom(Room, Exit)
,
getRoomDir(Room, Room)
Area getTargetArea(Room from, Exit to)
from
- the initial roomto
- the exit being usedgetTargetRoom(Room, Exit)
,
getRoomDir(Room, Room)
,
getExitDir(Room, Exit)
Room getTargetRoom(Room from, Exit to)
from
- the initial roomto
- the exit being usedgetTargetArea(Room, Exit)
,
getRoomDir(Room, Room)
,
getExitDir(Room, Exit)
void resetArea(Area area)
area
- the area to reset.void resetRoom(Room room)
room
- the room whose content to resetvoid resetRoom(Room room, boolean rebuildGrids)
room
- the room whose content to resetrebuildGrids
- true to also clear and rebuild grids, or false otherwiseRoom getStartRoom(Environmental E)
E
- the object to get a start room forArea getStartArea(Environmental E)
E
- the object to get a start area forRoom roomLocation(Environmental E)
E
- the game object whose room location you are curious aboutvoid emptyRoom(Room room, Room toRoom, boolean clearPlayers)
room
- the room to cleartoRoom
- null, or the room to move all mobs/items toclearPlayers
- true to move players anyway, false otherwisevoid emptyAreaAndDestroyRooms(Area A)
A
- the area to emptyboolean hasASky(Room room)
room
- the room to checkboolean isClearableRoom(Room room)
room
- the room to clear/check.java.lang.String createNewExit(Room from, Room room, int direction)
from
- the from roomroom
- the to roomdirection
- the direction from the from to the room roomArea areaLocation(CMObject E)
E
- the game object whose area location you are curious aboutCMFile.CMVFSDir getMapRoot(CMFile.CMVFSDir root)
root
- the root directory to add the map directory tovoid registerWorldObjectLoaded(Area area, Room room, CMObject o)
area
- the area that the object was loaded intoroom
- the room that the object was loaded intoo
- the object to register as loadedregisterWorldObjectDestroyed(Area, Room, CMObject)
void registerWorldObjectDestroyed(Area area, Room room, CMObject o)
area
- the area that the object was originally loaded intoroom
- the room that the object was originally loaded intoo
- the object to de-registerregisterWorldObjectLoaded(Area, Room, CMObject)
Boardable getShip(java.lang.String calledThis)
calledThis
- the name of the boardablefindShip(String, boolean)
,
ships()
,
shipsRoomEnumerator(Area)
,
numShips()
Boardable findShip(java.lang.String s, boolean exactOnly)
s
- the name searchexactOnly
- true for exact matches only, false for substring matchesgetShip(String)
,
ships()
,
shipsRoomEnumerator(Area)
,
numShips()
java.util.Enumeration<Boardable> ships()
getShip(String)
,
findShip(String, boolean)
,
shipsRoomEnumerator(Area)
,
numShips()
java.util.Enumeration<Room> shipsRoomEnumerator(Area inA)
inA
- the area containing a ship, possiblygetShip(String)
,
findShip(String, boolean)
,
ships()
,
numShips()
int numShips()
getShip(String)
,
findShip(String, boolean)
,
ships()
,
shipsRoomEnumerator(Area)
,
numShips()
Room getSafeRoomToMovePropertyTo(Room room, PrivateProperty I)
room
- the room that needs moving FROMI
- null, or private property that needs movingjava.util.Enumeration<WorldMap.LocatedPair> scriptHosts(Area area)
area
- null, or the area to limit returns toWorldMap.LocatedPair.room()
MOB deity()
Deity
,
deities()
,
getDeity(String)
Deity getDeity(java.lang.String calledThis)
java.util.Enumeration<Deity> deities()
Deity
,
deity()
,
getDeity(String)
java.util.Map<java.lang.String,TimeClock> getClockCache()
MOB getFactoryMOBInAnyRoom()
getFactoryMOB(Room)
MOB getFactoryMOB(Room R)
R
- the room to put the temporary mob ingetFactoryMOBInAnyRoom()
void addGlobalHandler(MsgListener E, int category)
E
- the message listener for the global messagecategory
- the CMMsg TYP code (CMMsg
delGlobalHandler(MsgListener, int)
,
sendGlobalMessage(MOB, int, CMMsg)
void delGlobalHandler(MsgListener E, int category)
E
- the message listener for the global messagecategory
- the CMMsg TYP code (CMMsg
addGlobalHandler(MsgListener, int)
,
sendGlobalMessage(MOB, int, CMMsg)
boolean sendGlobalMessage(MOB host, int category, CMMsg msg)
host
- the host/sender of the messagecategory
- the CMMsg TYP code (CMMsg
msg
- the actual message to sendaddGlobalHandler(MsgListener, int)
,
delGlobalHandler(MsgListener, int)