Class MapArchObject
- java.lang.Object
-
- net.sf.gridarta.model.maparchobject.AbstractMapArchObject<MapArchObject>
-
- net.sf.gridarta.var.atrinik.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.@NotNull java.lang.StringgetRegion()Returns the region attribute.intgetTilesetId()Returns the tileset id attribute.intgetTilesetX()Returns the tileset x attribute.intgetTilesetY()Returns the tileset y attribute.@NotNull java.lang.StringgetWeather()Returns the weather attribute.inthashCode()booleanisFixedLogin()Returns the fixed login attribute.booleanisFixedResetTime()Returns the fixed reset time attribute.booleanisHeightDiff()Returns the height diff attribute.booleanisNoHarm()Returns the no harm attribute.booleanisNoMagic()Returns the no magic attribute.booleanisNoSave()Returns the no save attribute.booleanisNoSummon()Returns the no summon attribute.booleanisPlayerNoSave()Returns the player no save attribute.booleanisPvp()Returns the pvp attribute.booleanisUnique()Returns the unique 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.voidsetFixedResetTime(boolean fixedResetTime)Sets the fixed reset time attribute.voidsetHeightDiff(boolean heightDiff)Sets the height diff attribute.voidsetNoHarm(boolean noHarm)Sets the no harm attribute.voidsetNoMagic(boolean noMagic)Sets the no magic attribute.voidsetNoSave(boolean noSave)Sets the no save attribute.voidsetNoSummon(boolean noSummon)Sets the no summon attribute.voidsetPlayerNoSave(boolean playerNoSave)Sets the player no save attribute.voidsetPvp(boolean pvp)Sets the pvp attribute.voidsetRegion(@NotNull java.lang.String region)Sets the region 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 attribute.voidsetTilesetX(int tilesetX)Sets the tileset x attribute.voidsetTilesetY(int tilesetY)Sets the tileset y attribute.voidsetUnique(boolean unique)Sets the unique save attribute.voidsetWeather(@NotNull java.lang.String weather)Sets the weather 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
-
isHeightDiff
public boolean isHeightDiff()
Returns the height diff attribute.- Returns:
- the height diff attribute
-
setHeightDiff
public void setHeightDiff(boolean heightDiff)
Sets the height diff attribute.- Parameters:
heightDiff- the height diff 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
-
isUnique
public boolean isUnique()
Returns the unique attribute.- Returns:
- the unique attribute
-
setUnique
public void setUnique(boolean unique)
Sets the unique save attribute.- Parameters:
unique- the unique attribute
-
isFixedResetTime
public boolean isFixedResetTime()
Returns the fixed reset time attribute.- Returns:
- the fixed reset time attribute
-
setFixedResetTime
public void setFixedResetTime(boolean fixedResetTime)
Sets the fixed reset time attribute.- Parameters:
fixedResetTime- the fixed reset time attribute
-
isPlayerNoSave
public boolean isPlayerNoSave()
Returns the player no save attribute.- Returns:
- the player no save attribute
-
setPlayerNoSave
public void setPlayerNoSave(boolean playerNoSave)
Sets the player no save attribute.- Parameters:
playerNoSave- the player no save 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 attribute.- Returns:
- the tileset id attribute
-
setTilesetId
public void setTilesetId(int tilesetId)
Sets the tileset id attribute.- Parameters:
tilesetId- the tileset id attribute
-
getTilesetX
public int getTilesetX()
Returns the tileset x attribute.- Returns:
- the tileset x attribute
-
setTilesetX
public void setTilesetX(int tilesetX)
Sets the tileset x attribute.- Parameters:
tilesetX- the tileset x attribute
-
getTilesetY
public int getTilesetY()
Returns the tileset y attribute.- Returns:
- the tileset y attribute
-
setTilesetY
public void setTilesetY(int tilesetY)
Sets the tileset y attribute.- Parameters:
tilesetY- the tileset y attribute
-
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
-
getRegion
@NotNull public @NotNull java.lang.String getRegion()
Returns the region attribute.- Returns:
- the region attribute
-
setRegion
public void setRegion(@NotNull @NotNull java.lang.String region)Sets the region attribute.- Parameters:
region- the region attribute
-
getWeather
@NotNull public @NotNull java.lang.String getWeather()
Returns the weather attribute.- Returns:
- the weather attribute
-
setWeather
public void setWeather(@NotNull @NotNull java.lang.String weather)Sets the weather attribute.- Parameters:
weather- the weather attribute
-
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
-
-