|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.kernel.GUIDCarrier
de.adom.jade.world.Location
Describes a location of the world. This includes information about the location in known and unknown state, map data and more. Map creation can be deferred until the PC enters the location for the first time. This is especially useful for dungeons of which there are simply too many to create them all a once.
| Constructor Summary | |
|---|---|
Location(java.lang.String unknownName,
java.lang.String unknownDescription,
java.lang.String knownName,
java.lang.String knownDescription)
Creates a new location. |
|
Location(java.lang.String unknownName,
java.lang.String unknownDescription,
java.lang.String knownName,
java.lang.String knownDescription,
Map map)
Creates a new location. |
|
| Method Summary | |
|---|---|
void |
addConnection(Connection connection)
Adds a connection to this location. |
protected abstract Map |
createMap()
Creates a new map for this specific location. |
ActorQueue |
getActorQueue()
Returns the actor queue for this location. |
Complex |
getComplex()
Returns the complex to which this location belongs. |
long |
getComplexID()
Returns the complex ID of this loocation. |
Connection |
getConnectionAt(int x,
int y)
Returns a connection for the given coordinates. |
Connection |
getConnectionByID(long id)
Returns a connection by its ID. |
java.util.Iterator |
getConnectionPositions()
Returns a list of all connection positions for this location. |
java.util.Iterator |
getConnections()
Returns a list of all connections for this location. |
java.lang.String |
getDescription()
Returns the description of this location. |
int |
getLevel()
Returns the level number of this level. |
java.lang.String |
getLogicalName()
Returns the internal unique logical name of this location. |
Map |
getMap()
Returns the map of the location. |
java.lang.String |
getName()
Returns the name of the location. |
long |
getTickCounter()
Returns the tick counter when this location was last retrieved from the location manager. |
abstract boolean |
isDungeon()
Determines whether the current location is a dungeon. |
boolean |
isKnown()
Determines whether the location is already known. |
abstract boolean |
isSettlement()
Determines whether the current location is a settlement. |
abstract boolean |
isSurfaceWorld()
Determines whether the current location is the surface world area. |
abstract boolean |
isWilderness()
Determines whether the current location is a wilderness area. |
void |
setComplex(int index,
Complex theComplex)
Defines the complex to which this location belongs. |
void |
setKnown(boolean known)
Marks the location as known or unknown. |
void |
setMap(Map theMap)
Explicitly defines a map for this location. |
void |
updateTicks()
Updates the internal location timer by memorizing the current number of game ticks. |
| Methods inherited from class de.adom.jade.kernel.GUIDCarrier |
|---|
getGUID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Location(java.lang.String unknownName,
java.lang.String unknownDescription,
java.lang.String knownName,
java.lang.String knownDescription)
unknownName - the name of the location in its unknown stateunknownDescription - the description of the location in its unknown stateknownName - the name of the location in its known stateknownDescription - the description of the location in its known state
public Location(java.lang.String unknownName,
java.lang.String unknownDescription,
java.lang.String knownName,
java.lang.String knownDescription,
Map map)
complexID - the ID of this complexlevel - the depth level of this locationunknownName - the name of the location in its unknown stateunknownDescription - the description of the location in its unknown stateknownName - the name of the location in its known stateknownDescription - the description of the location in its known statemap - the map of the location| Method Detail |
|---|
public java.lang.String getDescription()
public java.lang.String getName()
public Map getMap()
public ActorQueue getActorQueue()
public boolean isKnown()
public void setKnown(boolean known)
known - a boolean value determining whether the location
is known or notpublic java.lang.String getLogicalName()
protected abstract Map createMap()
public void addConnection(Connection connection)
connection - the connection to add
public Connection getConnectionAt(int x,
int y)
x - the x coordinatey - the y coordinate
nullpublic Connection getConnectionByID(long id)
id - the connection ID
nullpublic long getComplexID()
public int getLevel()
public java.util.Iterator getConnections()
public java.util.Iterator getConnectionPositions()
public void setMap(Map theMap)
theMap - the map for this locationpublic abstract boolean isDungeon()
public abstract boolean isSettlement()
public abstract boolean isWilderness()
public abstract boolean isSurfaceWorld()
public void updateTicks()
public long getTickCounter()
public void setComplex(int index,
Complex theComplex)
index - the index of this location in the given complextheComplex - the complex to which this location belongspublic Complex getComplex()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||