Gridarta Editor
net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A > Class Template Referenceabstract

Base implementation of MapArchObject that covers similarities between Crossfire maps and Daimonin maps. More...

+ Inheritance diagram for net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >:
+ Collaboration diagram for net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >:

Public Member Functions

void addMapArchObjectListener (@NotNull final MapArchObjectListener listener)
 Registers an event listener. More...
 
void addText (@NotNull final String text)
 Appends 'text' to the map text. More...
 
void beginTransaction ()
 Starts a new transaction. More...
 
String calculateTilePath (@NotNull final Direction direction, @Nullable final MapFile mapFile)
 Calculate a single tile path in a particular direction. More...
 
void calculateTilePaths (@Nullable final MapFile mapFile, @NotNull final File mapsDirectory)
 Calculates tiled paths for the map automatically. More...
 
void endTransaction ()
 Ends a transaction. More...
 
void endTransaction (final boolean fireEvent)
 Ends a transaction. More...
 
boolean equals (@Nullable final Object obj)
 
int getDarkness ()
 Returns the light / darkness of this map. More...
 
int getDifficulty ()
 Returns the map's difficulty. More...
 
Point getEnter ()
 Returns the enter coordinates. More...
 
int getEnterX ()
 Returns the enter x coordinate. More...
 
int getEnterY ()
 Returns the enter y coordinate. More...
 
String getMapName ()
 Returns the map name. More...
 
Size2D getMapSize ()
 Returns the map size. More...
 
int getResetTimeout ()
 Returns the reset timeout (in seconds). More...
 
int getSwapTime ()
 Returns the swap time (in ticks). More...
 
String getText ()
 Returns the message text. More...
 
String getTilePath (@NotNull final Direction direction)
 Returns a tile path. More...
 
int getTilePaths ()
 Returns the number of tile paths. More...
 
int hashCode ()
 
boolean isFixedReset ()
 Returns whether this map uses a fixed reset. More...
 
boolean isOutdoor ()
 Returns whether the map is an "outdoor" map. More...
 
boolean isPointValid (@Nullable final Point pos)
 Checks whether the given coordinate is within map bounds. More...
 
boolean isTilePathAuto (@NotNull final Direction direction, @Nullable final MapFile mapFile)
 Determines whether a tiled map in the specified direction is automatic tiled path or not. More...
 
void removeMapArchObjectListener (@NotNull final MapArchObjectListener listener)
 Unregisters an event listener. More...
 
void setDarkness (final int darkness)
 Sets the light / darkness of this map. More...
 
void setDifficulty (final int difficulty)
 Sets the map's difficulty. More...
 
void setEnterX (final int enterX)
 Sets the enter x coordinate. More...
 
void setEnterY (final int enterY)
 Sets the enter y coordinate. More...
 
void setFixedReset (final boolean fixedReset)
 Sets whether this map uses a fixed reset. More...
 
void setMapName (@NotNull final String name)
 Sets the map name. More...
 
void setMapSize (@NotNull final Size2D mapSize)
 Sets the map size. More...
 
void setOutdoor (final boolean outdoor)
 Sets whether the map is an "outdoor" map. More...
 
void setResetTimeout (final int resetTimeout)
 Sets the reset timeout (in seconds). More...
 
void setState (@NotNull final A mapArchObject)
 Resets the state of this object to the state of the given map arch object. More...
 
void setSwapTime (final int swapTime)
 Sets the swap time (in ticks). More...
 
void setText (final String text)
 Sets the map text. More...
 
void setTilePath (@NotNull final Direction direction, @NotNull final String tilePath)
 Sets a tile path. More...
 
void updateModifiedAttribute (@NotNull final String userName)
 Updates the "Modified:" attribute in the message text. More...
 
- Public Member Functions inherited from net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >
createClone ()
 Creates a copy of this object. More...
 

Static Public Attributes

static final String MAP_NAME_UNNAMED = "<unnamed>"
 The name of an unnamed map. More...
 

Protected Member Functions

 AbstractMapArchObject ()
 Creates a new instance. More...
 
 AbstractMapArchObject (@NotNull final AbstractMapArchObject< A > mapArchObject)
 Creates a new instance as a copy of another map arch object. More...
 
abstract A getThis ()
 Returns this map arch object cast to its real type. More...
 
void setModified ()
 Marks this map arch object as changed. More...
 

Private Member Functions

void commitTransaction ()
 Performs ending a transaction. More...
 
void fireMetaChangedEvent ()
 Fires a MapMetaChangedEvent. More...
 

Private Attributes

boolean attributeHasChanged
 Set if any attribute has changed inside the current transaction. More...
 
int darkness
 The light / darkness of map (overall). More...
 
int difficulty
 The map difficulty. More...
 
int enterX
 The x coordinate for entering the map. More...
 
int enterY
 The y coordinate for entering the map. More...
 
boolean fixedReset
 If nonzero, the map reset time will not be updated when someone enters / exits the map. More...
 
final EventListenerList2< MapArchObjectListenerlistenerList = new EventListenerList2<>(MapArchObjectListener.class)
 The registered event listeners. More...
 
String mapName
 The name of this map. More...
 
Size2D mapSize
 The size of the map reflected by this map arch object. More...
 
final StringBuilder msgText = new StringBuilder()
 The map text. More...
 
boolean outdoor
 If set, this is an outdoor map. More...
 
int resetTimeout
 The number of ticks that need to elapse before this map will be reset. More...
 
int swapTime
 The number of ticks that must elapse after tha map has not been used before it gets swapped out. More...
 
final String [] tilePaths
 The map tile paths used for map tiling. More...
 
int transactionDepth
 The transaction depth. More...
 
transient Thread transactionThread
 The thread that performs the current transaction. More...
 

Static Private Attributes

static final Pattern MAP_FILE_NAME_PATTERN = Pattern.compile("((?:(?!_(?:[\\d-]+))[\\w_])+)_([\\d-]+)_([\\d-]+)(?:_([\\d-]+))?")
 The pattern used to determine the base map name and its x/y/z coordinates from a filename. More...
 
static final String MODIFIED_ATTRIBUTE = "Modified:"
 The prefix for the map attribute that is updated with the last modification timestamp. More...
 
static final Pattern MODIFIED_ATTRIBUTE_PATTERN = Pattern.compile("^" + MODIFIED_ATTRIBUTE + " *(.*)$", Pattern.MULTILINE)
 The pattern to find the MODIFIED_ATTRIBUTE in the message text. More...
 
static final long serialVersionUID = 1L
 The serial version UID. More...
 

Detailed Description

Base implementation of MapArchObject that covers similarities between Crossfire maps and Daimonin maps.

Author
Christian Hujer
Andreas Kirschbaum
Warning
NEVER use this class in a Collection! hashCode() and equals(Object) work on non-final fields and thus will break any operation inside Collections!

Definition at line 45 of file AbstractMapArchObject.java.

Constructor & Destructor Documentation

◆ AbstractMapArchObject() [1/2]

Creates a new instance.

Definition at line 175 of file AbstractMapArchObject.java.

◆ AbstractMapArchObject() [2/2]

Creates a new instance as a copy of another map arch object.

Parameters
mapArchObjectthe other map arch object

Definition at line 186 of file AbstractMapArchObject.java.

Member Function Documentation

◆ addMapArchObjectListener()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.addMapArchObjectListener ( @NotNull final MapArchObjectListener  listener)

Registers an event listener.

Parameters
listenerthe listener to register

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 477 of file AbstractMapArchObject.java.

◆ addText()

◆ beginTransaction()

Starts a new transaction.

Transactions may be nested. Transactions serve the purpose of firing events to the views when more changes are known to come before the view is really required to update. Each invocation of this function requires its own invocation of endTransaction().

Beginning a nested transaction is a cheap operation.

See also
endTransaction()
endTransaction(boolean)

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 495 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), and net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties().

+ Here is the caller graph for this function:

◆ calculateTilePath()

String net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.calculateTilePath ( @NotNull final Direction  direction,
@Nullable final MapFile  mapFile 
)

Calculate a single tile path in a particular direction.

Parameters
directionthe direction
mapFilemap file
Returns
Calculated tile path, empty string on failure.

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 386 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.calculateTilePaths(), and net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.isTilePathAuto().

+ Here is the caller graph for this function:

◆ calculateTilePaths()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.calculateTilePaths ( @Nullable final MapFile  mapFile,
@NotNull final File  mapsDirectory 
)

Calculates tiled paths for the map automatically.

Parameters
mapFilemap file
mapsDirectorymaps directory

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 410 of file AbstractMapArchObject.java.

◆ commitTransaction()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.commitTransaction ( )
private

Performs ending a transaction.

Resets all transaction states and fires an event.

Definition at line 534 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.endTransaction().

+ Here is the caller graph for this function:

◆ endTransaction() [1/2]

Ends a transaction.

Invoking this method will reduce the transaction depth by only 1.

Ending a nested operation is a cheap operation. Ending a transaction without changes also is a cheap operation.

If the last transaction is ended, the changes are committed.

Same as endTransaction(false).

See also
beginTransaction()
endTransaction(boolean)

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 510 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.endTransaction(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), and net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties().

+ Here is the caller graph for this function:

◆ endTransaction() [2/2]

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.endTransaction ( final boolean  fireEvent)

Ends a transaction.

Invoking this method will reduce the transaction depth by only 1.

Ending a nested operation is a cheap operation. Ending a transaction without changes also is a cheap operation.

If the last transaction is ended, the changes are committed.

An example where setting

fireEvent

to

true

is useful even though the outermost transaction is not ended is when during painting the UI should be updated though painting is not finished.

Parameters
fireEvent

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 515 of file AbstractMapArchObject.java.

◆ equals()

boolean net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.equals ( @Nullable final Object  obj)

Definition at line 460 of file AbstractMapArchObject.java.

◆ fireMetaChangedEvent()

◆ getDarkness()

◆ getDifficulty()

◆ getEnter()

Returns the enter coordinates.

Returns
the enter coordinates

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 269 of file AbstractMapArchObject.java.

◆ getEnterX()

◆ getEnterY()

◆ getMapName()

◆ getMapSize()

◆ getResetTimeout()

◆ getSwapTime()

◆ getText()

◆ getThis()

abstract A net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.getThis ( )
abstractprotected

Returns this map arch object cast to its real type.

Returns
this map arch object

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.isPointValid().

+ Here is the caller graph for this function:

◆ getTilePath()

String net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.getTilePath ( @NotNull final Direction  direction)

Returns a tile path.

Parameters
directionthe tile path direction
Returns
the tile path

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 370 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.isTilePathAuto().

+ Here is the caller graph for this function:

◆ getTilePaths()

Returns the number of tile paths.

Returns
the number of tile paths

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 364 of file AbstractMapArchObject.java.

◆ hashCode()

Definition at line 472 of file AbstractMapArchObject.java.

◆ isFixedReset()

◆ isOutdoor()

◆ isPointValid()

boolean net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.isPointValid ( @Nullable final Point  pos)

Checks whether the given coordinate is within map bounds.

Parameters
posthe coordinates to check
Returns
true
if the given coordinates are on the map, otherwise
false
(also returns
false
if
pos == null
)

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 597 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.var.crossfire.gui.map.renderer.SmoothingRenderer.paintSmooth().

+ Here is the caller graph for this function:

◆ isTilePathAuto()

boolean net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.isTilePathAuto ( @NotNull final Direction  direction,
@Nullable final MapFile  mapFile 
)

Determines whether a tiled map in the specified direction is automatic tiled path or not.

Parameters
directiondirection of the tiled map
mapFilemap file
Returns
Whether the tile is automatic.

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 436 of file AbstractMapArchObject.java.

◆ removeMapArchObjectListener()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.removeMapArchObjectListener ( @NotNull final MapArchObjectListener  listener)

Unregisters an event listener.

Parameters
listenerthe listener to unregister

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 482 of file AbstractMapArchObject.java.

◆ setDarkness()

◆ setDifficulty()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.setDifficulty ( final int  difficulty)

Sets the map's difficulty.

Parameters
difficultythe new difficulty for this map

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 324 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setState().

+ Here is the caller graph for this function:

◆ setEnterX()

◆ setEnterY()

◆ setFixedReset()

◆ setMapName()

◆ setMapSize()

◆ setModified()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.setModified ( )
protected

Marks this map arch object as changed.

The map arch object then notifies the registered listeners of the change at the end of the transaction.

Definition at line 490 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.addLore(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.addText(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setBackgroundMusic(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setBackgroundMusic(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setBackgroundMusic(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setDarkness(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setDifficulty(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setEnterX(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setEnterY(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setFirstLoad(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setFixedLogin(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setFixedLogin(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setFixedReset(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setFixedResetTime(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setHeightDiff(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setHumidity(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setLore(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setMapName(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setMapSize(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setNoHarm(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setNoHarm(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setNoMagic(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setNoMagic(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setNoPriest(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setNoSave(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setNoSave(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setNoSmooth(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setNoSummon(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setNoSummon(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setOutdoor(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setPermDeath(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setPlayerNoSave(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setPressure(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setPvp(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setPvp(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setRegion(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setRegion(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setResetTimeout(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setShopGreed(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setShopItems(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setShopMax(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setShopMin(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setShopRace(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setSky(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setSwapTime(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setTemperature(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setTemplate(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setText(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setTilePath(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setTilesetId(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setTilesetId(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setTilesetX(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setTilesetX(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setTilesetY(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setTilesetY(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setUltimateDeath(), net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.setUltraDeath(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setUnique(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setUnique(), net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject.setWeather(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setWindDirection(), net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject.setWindSpeed(), and net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.updateModifiedAttribute().

◆ setOutdoor()

◆ setResetTimeout()

◆ setState()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.setState ( @NotNull final A  mapArchObject)

Resets the state of this object to the state of the given map arch object.

Parameters
mapArchObjectthe map arch object to copy the state from

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 441 of file AbstractMapArchObject.java.

◆ setSwapTime()

◆ setText()

◆ setTilePath()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.setTilePath ( @NotNull final Direction  direction,
@NotNull final String  tilePath 
)

Sets a tile path.

Parameters
directionthe tile path direction
tilePaththe new tile path

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 375 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.calculateTilePaths(), and net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setState().

+ Here is the caller graph for this function:

◆ updateModifiedAttribute()

void net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.updateModifiedAttribute ( @NotNull final String  userName)

Updates the "Modified:" attribute in the message text.

Parameters
userNamethe user name to include

Implements net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.

Definition at line 580 of file AbstractMapArchObject.java.

Member Data Documentation

◆ attributeHasChanged

boolean net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.attributeHasChanged
private

Set if any attribute has changed inside the current transaction.

Definition at line 170 of file AbstractMapArchObject.java.

◆ darkness

◆ difficulty

◆ enterX

◆ enterY

◆ fixedReset

◆ listenerList

final EventListenerList2<MapArchObjectListener> net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.listenerList = new EventListenerList2<>(MapArchObjectListener.class)
private

The registered event listeners.

Definition at line 150 of file AbstractMapArchObject.java.

◆ MAP_FILE_NAME_PATTERN

final Pattern net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.MAP_FILE_NAME_PATTERN = Pattern.compile("((?:(?!_(?:[\\d-]+))[\\w_])+)_([\\d-]+)_([\\d-]+)(?:_([\\d-]+))?")
staticprivate

The pattern used to determine the base map name and its x/y/z coordinates from a filename.

Definition at line 76 of file AbstractMapArchObject.java.

◆ MAP_NAME_UNNAMED

◆ mapName

◆ mapSize

◆ MODIFIED_ATTRIBUTE

final String net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.MODIFIED_ATTRIBUTE = "Modified:"
staticprivate

The prefix for the map attribute that is updated with the last modification timestamp.

Definition at line 63 of file AbstractMapArchObject.java.

◆ MODIFIED_ATTRIBUTE_PATTERN

final Pattern net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.MODIFIED_ATTRIBUTE_PATTERN = Pattern.compile("^" + MODIFIED_ATTRIBUTE + " *(.*)$", Pattern.MULTILINE)
staticprivate

The pattern to find the MODIFIED_ATTRIBUTE in the message text.

Definition at line 69 of file AbstractMapArchObject.java.

◆ msgText

◆ outdoor

◆ resetTimeout

◆ serialVersionUID

final long net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 50 of file AbstractMapArchObject.java.

◆ swapTime

◆ tilePaths

final String [] net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.tilePaths
private

The map tile paths used for map tiling.

0 = north, 1 = east, 2 = south, 3 = west. 4 = northeast, 5 = southeast, 6 = southwest, 7 = northwest, 8 = up, 9 = down

Definition at line 144 of file AbstractMapArchObject.java.

Referenced by net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.equals(), and net.sf.gridarta.model.maparchobject.AbstractMapArchObject< MapArchObject >.setState().

◆ transactionDepth

int net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.transactionDepth
private

The transaction depth.

A value of 0 means there's no transaction going on. A value > 0 means there's a transaction going on and denotes the nesting level.

Invariant
transactionDepth >= 0

Definition at line 158 of file AbstractMapArchObject.java.

◆ transactionThread

transient Thread net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.transactionThread
private

The thread that performs the current transaction.

Invariant
transactionDepth > 0 || transactionThread == null

Definition at line 165 of file AbstractMapArchObject.java.


The documentation for this class was generated from the following file: