Class MapArchObject
- java.lang.Object
-
- net.sf.gridarta.model.maparchobject.AbstractMapArchObject<MapArchObject>
-
- net.sf.gridarta.var.crossfire.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 voidaddLore(@NotNull java.lang.String text)Appends text to the map lore.@NotNull MapArchObjectcreateClone()Creates a copy of this object.booleanequals(@Nullable java.lang.Object obj)@NotNull java.lang.StringgetBackgroundMusic()Returns the background music to play.intgetFirstLoad()Returns the timestamp the Crossfire server has loaded this map.intgetHumidity()Returns the humidity.@NotNull java.lang.StringgetLore()Returns the map lore.intgetPressure()Returns the pressure.@NotNull java.lang.StringgetRegion()Returns the region the map is in.@NotNull java.lang.StringgetResetGroup()Returns the reset group.doublegetShopGreed()Returns the greed of the shop.@NotNull java.lang.StringgetShopItems()Returns the item spec for the shop.intgetShopMax()Returns the maximum price the shop will trade for.intgetShopMin()Returns the minimum price the shop will trade for.@NotNull java.lang.StringgetShopRace()Returns the preferred race of the shop.intgetSky()Returns the sky settings.intgetTemperature()Returns the temperature.intgetWindDirection()Returns the wind direction.intgetWindSpeed()Returns the wind speed.inthashCode()booleanisNoSmooth()Returns whether this map is no smooth.booleanisTemplate()Returns whether this map is a template map.booleanisUnique()Get whether this map is unique.voidsetBackgroundMusic(@NotNull java.lang.String backgroundMusic)Sets the background music to play.voidsetDifficulty(int difficulty)Sets the map's difficulty.voidsetFirstLoad(int firstLoad)Sets the timestamp the Crossfire server has loaded this map.voidsetHumidity(int humidity)Sets the humidity.voidsetLore(@NotNull java.lang.String text)Sets the map lore.voidsetNoSmooth(boolean noSmooth)Sets whether this map is no smooth.voidsetPressure(int pressure)Sets the pressure.voidsetRegion(@NotNull java.lang.String region)Sets the region the map is in.voidsetResetGroup(@NotNull java.lang.String resetGroup)Sets the reset group.voidsetShopGreed(double shopGreed)Sets the greed of the shop.voidsetShopItems(@NotNull java.lang.String shopItems)Sets the item spec for the shop.voidsetShopMax(int shopMax)Sets the maximum price the shop will trade for.voidsetShopMin(int shopMin)Sets the minimum price the shop will trade for.voidsetShopRace(@NotNull java.lang.String shopRace)Sets the preferred race of the shop.voidsetSky(int sky)Sets the sky settings.voidsetState(@NotNull MapArchObject mapArchObject)Resets the state of this object to the state of the given map arch object.voidsetTemperature(int temperature)Sets the temperature.voidsetTemplate(boolean template)Sets whether this map is a template map.voidsetUnique(boolean unique)Set whether this map is unique.voidsetWindDirection(int windDirection)sets the wind direction.voidsetWindSpeed(int windSpeed)Sets the wind speed.-
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
-
isUnique
public boolean isUnique()
Get whether this map is unique.- Returns:
- whether this map is unique
-
setUnique
public void setUnique(boolean unique)
Set whether this map is unique.- Parameters:
unique- whether this map should be unique
-
isTemplate
public boolean isTemplate()
Returns whether this map is a template map.- Returns:
- whether this map is a template map
-
setTemplate
public void setTemplate(boolean template)
Sets whether this map is a template map.- Parameters:
template- whether this map is a template map
-
isNoSmooth
public boolean isNoSmooth()
Returns whether this map is no smooth.- Returns:
- whether this map is no smooth
-
setNoSmooth
public void setNoSmooth(boolean noSmooth)
Sets whether this map is no smooth.- Parameters:
noSmooth- whether this map is no smooth
-
getRegion
@NotNull public @NotNull java.lang.String getRegion()
Returns the region the map is in.- Returns:
- the region the map is in
-
setRegion
public void setRegion(@NotNull @NotNull java.lang.String region)Sets the region the map is in.- Parameters:
region- the region the map is in
-
getBackgroundMusic
@NotNull public @NotNull java.lang.String getBackgroundMusic()
Returns the background music to play.- Returns:
- the background music to play
-
setBackgroundMusic
public void setBackgroundMusic(@NotNull @NotNull java.lang.String backgroundMusic)Sets the background music to play.- Parameters:
backgroundMusic- the background music to play
-
getShopItems
@NotNull public @NotNull java.lang.String getShopItems()
Returns the item spec for the shop.- Returns:
- the item spec for the shop
-
setShopItems
public void setShopItems(@NotNull @NotNull java.lang.String shopItems)Sets the item spec for the shop.- Parameters:
shopItems- the item spec for the shop
-
getShopRace
@NotNull public @NotNull java.lang.String getShopRace()
Returns the preferred race of the shop.- Returns:
- the preferred race of the shop
-
setShopRace
public void setShopRace(@NotNull @NotNull java.lang.String shopRace)Sets the preferred race of the shop.- Parameters:
shopRace- the preferred race of te shop
-
getShopMin
public int getShopMin()
Returns the minimum price the shop will trade for.- Returns:
- the minimum price the shop will trade for
-
setShopMin
public void setShopMin(int shopMin)
Sets the minimum price the shop will trade for.- Parameters:
shopMin- the minimum price the shop will trade for
-
getShopMax
public int getShopMax()
Returns the maximum price the shop will trade for.- Returns:
- the maximum price the shop will trade for
-
setShopMax
public void setShopMax(int shopMax)
Sets the maximum price the shop will trade for.- Parameters:
shopMax- the maximum price the shop will trade for
-
getShopGreed
public double getShopGreed()
Returns the greed of the shop.- Returns:
- the greed of the shop
-
setShopGreed
public void setShopGreed(double shopGreed)
Sets the greed of the shop.- Parameters:
shopGreed- the greed of the shop
-
getTemperature
public int getTemperature()
Returns the temperature.- Returns:
- the temperature
-
setTemperature
public void setTemperature(int temperature)
Sets the temperature.- Parameters:
temperature- the temperature
-
getPressure
public int getPressure()
Returns the pressure.- Returns:
- the pressure
-
setPressure
public void setPressure(int pressure)
Sets the pressure.- Parameters:
pressure- the pressure
-
getHumidity
public int getHumidity()
Returns the humidity.- Returns:
- the humidity
-
setHumidity
public void setHumidity(int humidity)
Sets the humidity.- Parameters:
humidity- the humidity
-
getWindSpeed
public int getWindSpeed()
Returns the wind speed.- Returns:
- the wind speed
-
setWindSpeed
public void setWindSpeed(int windSpeed)
Sets the wind speed.- Parameters:
windSpeed- the wind speed
-
getWindDirection
public int getWindDirection()
Returns the wind direction.- Returns:
- the wind direction
-
setWindDirection
public void setWindDirection(int windDirection)
sets the wind direction.- Parameters:
windDirection- the wind direction
-
getSky
public int getSky()
Returns the sky settings.- Returns:
- the sky settings
-
setSky
public void setSky(int sky)
Sets the sky settings.- Parameters:
sky- the sky settings
-
addLore
public void addLore(@NotNull @NotNull java.lang.String text)Appends text to the map lore.- Parameters:
text- the text to append
-
setLore
public void setLore(@NotNull @NotNull java.lang.String text)Sets the map lore.- Parameters:
text- the map lore
-
getLore
@NotNull public @NotNull java.lang.String getLore()
Returns the map lore.- Returns:
- the map lore
-
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
-
getFirstLoad
public int getFirstLoad()
Returns the timestamp the Crossfire server has loaded this map.- Returns:
- the timestamp
-
setFirstLoad
public void setFirstLoad(int firstLoad)
Sets the timestamp the Crossfire server has loaded this map.- Parameters:
firstLoad- the timestamp
-
getResetGroup
@NotNull public @NotNull java.lang.String getResetGroup()
Returns the reset group.- Returns:
- the reset group
-
setResetGroup
public void setResetGroup(@NotNull @NotNull java.lang.String resetGroup)Sets the reset group.- Parameters:
resetGroup- the reset group
-
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
-
-