Class 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!
    • Constructor Detail

      • MapArchObject

        public MapArchObject()
        Creates a new instance.
    • Method Detail

      • 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
      • 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
      • createClone

        @NotNull
        public @NotNull MapArchObject createClone()
        Description copied from interface: MapArchObject
        Creates a copy of this object.
        Returns:
        the newly created clone of this object