Class MapArchObject
- java.lang.Object
-
- net.sf.gridarta.model.maparchobject.AbstractMapArchObject<MapArchObject>
-
- net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject
-
- All Implemented Interfaces:
java.io.Serializable,MapArchObject<MapArchObject>
public class MapArchObject extends AbstractMapArchObject<MapArchObject>
MapArchObject contains the specific meta data about a map that is stored in the map-arch, at the very beginning of the map file. The map meta data is information like mapSize, difficulty level, darkness etc.).- See Also:
- Serialized Form
- Todo:
- This class should be changed so map attributes are reflected in a more generic way like arch attributes.
- Note:
- Though this class is named MapArchObject, it is not a subclass of GameObject; the name is for technical reasons, not for semantic / inheritance!
-
-
Field Summary
-
Fields inherited from class net.sf.gridarta.model.maparchobject.AbstractMapArchObject
MAP_NAME_UNNAMED
-
-
Constructor Summary
Constructors Constructor Description MapArchObject()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull MapArchObjectcreateClone()Creates a copy of this object.booleanequals(@Nullable java.lang.Object obj)@NotNull java.lang.StringgetBackgroundMusic()Returns the name of the background music.intgetTilesetId()Returns the tileset id.intgetTilesetX()Returns the tileset x coordinate.intgetTilesetY()Returns the tileset y coordinate.inthashCode()booleanisFixedLogin()Returns the fixed login attribute.booleanisNoHarm()Returns the no harm attribute.booleanisNoMagic()Returns the no magic attribute.booleanisNoPriest()Returns the no priest attribute.booleanisNoSave()Returns the no save attribute.booleanisNoSummon()Returns the no summon attribute.booleanisPermDeath()Returns the permanent death attribute.booleanisPvp()Returns the pvp attribute.booleanisUltimateDeath()Returns the ultimate death attribute.booleanisUltraDeath()Returns the ultra death attribute.voidsetBackgroundMusic(@NotNull java.lang.String backgroundMusic)Sets the name of the background music.voidsetDifficulty(int difficulty)Sets the map's difficulty.voidsetFixedLogin(boolean fixedLogin)Sets the fixed login attribute.voidsetNoHarm(boolean noHarm)Sets the no harm attribute.voidsetNoMagic(boolean noMagic)Sets the no magic attribute.voidsetNoPriest(boolean noPriest)Sets the no priest attribute.voidsetNoSave(boolean noSave)Sets the no save attribute.voidsetNoSummon(boolean noSummon)Sets the no summon attribute.voidsetPermDeath(boolean permDeath)Sets the permanent death attribute.voidsetPvp(boolean pvp)Sets the pvp attribute.voidsetState(@NotNull MapArchObject mapArchObject)Resets the state of this object to the state of the given map arch object.voidsetTilesetId(int tilesetId)Sets the tileset id.voidsetTilesetX(int tilesetX)Sets the tileset x coordinate.voidsetTilesetY(int tilesetY)Sets the tileset y coordinate.voidsetUltimateDeath(boolean ultimateDeath)Sets the ultimate death attribute.voidsetUltraDeath(boolean ultraDeath)Sets the ultra death attribute.-
Methods inherited from class net.sf.gridarta.model.maparchobject.AbstractMapArchObject
addMapArchObjectListener, addText, beginTransaction, calculateTilePath, calculateTilePaths, endTransaction, endTransaction, getDarkness, getDifficulty, getEnter, getEnterX, getEnterY, getMapName, getMapSize, getResetTimeout, getSwapTime, getText, getTilePath, getTilePaths, isFixedReset, isOutdoor, isPointValid, isTilePathAuto, removeMapArchObjectListener, setDarkness, setEnterX, setEnterY, setFixedReset, setMapName, setMapSize, setModified, setOutdoor, setResetTimeout, setSwapTime, setText, setTilePath, updateModifiedAttribute
-
-
-
-
Method Detail
-
setState
public void setState(@NotNull @NotNull MapArchObject mapArchObject)Description copied from interface:MapArchObjectResets the state of this object to the state of the given map arch object.- Specified by:
setStatein interfaceMapArchObject<MapArchObject>- Overrides:
setStatein classAbstractMapArchObject<MapArchObject>- Parameters:
mapArchObject- the map arch object to copy the state from
-
isNoSave
public boolean isNoSave()
Returns the no save attribute.- Returns:
- the no save attribute
-
setNoSave
public void setNoSave(boolean noSave)
Sets the no save attribute.- Parameters:
noSave- the no save attribute
-
isNoMagic
public boolean isNoMagic()
Returns the no magic attribute.- Returns:
- the no magic attribute
-
setNoMagic
public void setNoMagic(boolean noMagic)
Sets the no magic attribute.- Parameters:
noMagic- the no magic attribute
-
isNoPriest
public boolean isNoPriest()
Returns the no priest attribute.- Returns:
- the no priest attribute
-
setNoPriest
public void setNoPriest(boolean noPriest)
Sets the no priest attribute.- Parameters:
noPriest- the no priest attribute
-
isNoSummon
public boolean isNoSummon()
Returns the no summon attribute.- Returns:
- the no summon attribute
-
setNoSummon
public void setNoSummon(boolean noSummon)
Sets the no summon attribute.- Parameters:
noSummon- the no summon attribute
-
isNoHarm
public boolean isNoHarm()
Returns the no harm attribute.- Returns:
- the no harm attribute
-
setNoHarm
public void setNoHarm(boolean noHarm)
Sets the no harm attribute.- Parameters:
noHarm- the no harm attribute
-
isFixedLogin
public boolean isFixedLogin()
Returns the fixed login attribute.- Returns:
- the fixed login attribute
-
setFixedLogin
public void setFixedLogin(boolean fixedLogin)
Sets the fixed login attribute.- Parameters:
fixedLogin- the fixed login attribute
-
isPermDeath
public boolean isPermDeath()
Returns the permanent death attribute.- Returns:
- the permanent death attribute
-
setPermDeath
public void setPermDeath(boolean permDeath)
Sets the permanent death attribute.- Parameters:
permDeath- the permanent death attribute
-
isUltraDeath
public boolean isUltraDeath()
Returns the ultra death attribute.- Returns:
- the ultra death attribute
-
setUltraDeath
public void setUltraDeath(boolean ultraDeath)
Sets the ultra death attribute.- Parameters:
ultraDeath- the ultra death attribute
-
isUltimateDeath
public boolean isUltimateDeath()
Returns the ultimate death attribute.- Returns:
- the ultimate death attribute
-
setUltimateDeath
public void setUltimateDeath(boolean ultimateDeath)
Sets the ultimate death attribute.- Parameters:
ultimateDeath- the ultimate death attribute
-
isPvp
public boolean isPvp()
Returns the pvp attribute.- Returns:
- the pvp attribute
-
setPvp
public void setPvp(boolean pvp)
Sets the pvp attribute.- Parameters:
pvp- the pvp attribute
-
getTilesetId
public int getTilesetId()
Returns the tileset id.- Returns:
- the tileset id
-
setTilesetId
public void setTilesetId(int tilesetId)
Sets the tileset id.- Parameters:
tilesetId- the tileset id
-
getTilesetX
public int getTilesetX()
Returns the tileset x coordinate.- Returns:
- the tileset x coordinate
-
setTilesetX
public void setTilesetX(int tilesetX)
Sets the tileset x coordinate.- Parameters:
tilesetX- the tileset x coordinate
-
getTilesetY
public int getTilesetY()
Returns the tileset y coordinate.- Returns:
- the tileset y coordinate
-
setTilesetY
public void setTilesetY(int tilesetY)
Sets the tileset y coordinate.- Parameters:
tilesetY- the tileset y coordinate
-
getBackgroundMusic
@NotNull public @NotNull java.lang.String getBackgroundMusic()
Returns the name of the background music.- Returns:
- the name or an empty string if unset
-
setBackgroundMusic
public void setBackgroundMusic(@NotNull @NotNull java.lang.String backgroundMusic)Sets the name of the background music.- Parameters:
backgroundMusic- the name or an empty string to unset
-
setDifficulty
public void setDifficulty(int difficulty)
Description copied from interface:MapArchObjectSets the map's difficulty.- Specified by:
setDifficultyin interfaceMapArchObject<MapArchObject>- Overrides:
setDifficultyin classAbstractMapArchObject<MapArchObject>- Parameters:
difficulty- the new difficulty for this map
-
equals
public boolean equals(@Nullable @Nullable java.lang.Object obj)- Overrides:
equalsin classAbstractMapArchObject<MapArchObject>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractMapArchObject<MapArchObject>
-
createClone
@NotNull public @NotNull MapArchObject createClone()
Description copied from interface:MapArchObjectCreates a copy of this object.- Returns:
- the newly created clone of this object
-
-