Package megamek.common.loaders
Class MapSettings
java.lang.Object
megamek.common.loaders.MapSettings
- All Implemented Interfaces:
Serializable
MapSettings.java
- Since:
- March 27, 2002, 1:07 PM
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidReplaces all "Surprise..." boards with a random one of the chosen boards (which are appended after the "Surprise" string in the board name.)booleanequalMapGenParameters(MapSettings other) Returns true if the MapSetting has the same MapGenerator settings and size as the parameter.intintintintintintintintintintintgetFxMod()intstatic MapSettingsCreates and returns a new default instance of MapSettings.static MapSettingsCreates and returns a new instance of MapSettings with default values loaded from the given input stream.static MapSettingsgetInstance(MapSettings other) Creates and returns a clone of the given MapSettings.intintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintstatic StringgetMediumName(int m) Deprecated, for removal: This API element is subject to removal in a future version.intintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintintgetRange()getTheme()intvoidRemoves selected boards that aren't listed in the available boardsvoidreplaceBoardWithRandom(String board) Replaces the specified type of board with random boardsvoidsave(OutputStream os) voidsetAlgorithmToUse(int alg) voidsetBoardBuildings(ArrayList<BuildingTemplate> buildings) Deprecated, for removal: This API element is subject to removal in a future version.voidsetBoardsAvailableVector(List<String> newBoards) voidsetBoardSize(int boardWidth, int boardHeight) voidsetBoardsSelectedVector(List<String> newBoards) voidsetCityParams(int cityBlocks, String cityType, int cityMinCF, int cityMaxCF, int cityMinFloors, int cityMaxFloors, int cityDensity, int townSize) voidsetCliffParam(int prob) set the Parameters for the Map GeneratorvoidsetCraterParam(int prob, int minCrat, int maxCrat, int minRad, int maxRad) set the Parameters for the Map GeneratorvoidsetElevationParams(int hill, int newRange, int prob) set the Parameters for the Map GeneratorvoidsetFoliageParams(int minSpots, int maxSpots, int minSize, int maxSize, int prob) set the Parameters for the Map GeneratorvoidsetForestParams(int minSpots, int maxSpots, int minSize, int maxSize, int probHeavy, int probUltra) set the forest parameters for the Map GeneratorvoidsetFortifiedParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidsetIceParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidsetInvertNegativeTerrain(int invert) set the Parameters for the Map GeneratorvoidsetJungleParams(int minSpots, int maxSpots, int minSize, int maxSize, int probHeavy, int probUltra) set the jungle parameters for the Map GeneratorvoidsetMapSize(int newWidth, int newHeight) voidsetMaxPlantedFieldSize(int maxPlantedFieldSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxPlantedFieldSpots(int maxPlantedFieldSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxSandSize(int maxSandSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxSandSpots(int maxSandSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxSnowSize(int maxSnowSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxSnowSpots(int maxSnowSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxTundraSize(int maxTundraSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMaxTundraSpots(int maxTundraSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMedium(int m) voidsetMinPlantedFieldSize(int minPlantedFieldSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinPlantedFieldSpots(int minPlantedFieldSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinSandSize(int minSandSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinSandSpots(int minSandSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinSnowSize(int minSnowSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinSnowSpots(int minSnowSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinTundraSize(int minTundraSize) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMinTundraSpots(int minTundraSpots) Deprecated, for removal: This API element is subject to removal in a future version.voidsetMountainParams(int mountainPeaks, int mountainWidthMin, int mountainWidthMax, int mountainHeightMin, int mountainHeightMax, int mountainStyle) voidsetNullBoards(String board) Fills in all nulls in the boards selected list with the specified boardvoidsetPavementParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidsetPlantedFieldParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidsetRiverParam(int prob) set the Parameters for the Map GeneratorvoidsetRoadParam(int prob) set the Parameters for the Map GeneratorvoidsetRoughParams(int minSpots, int maxSpots, int minSize, int maxSize, int probUltra) set rough terrain parameters for the Map GeneratorvoidsetRubbleParams(int minSpots, int maxSpots, int minSize, int maxSize, int probUltra) set the Parameters for the Map GeneratorvoidsetSandParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidsetSnowParams(int minSpots, int maxSpots, int minSize, int maxSize) set the snow parameters for the Map GeneratorvoidsetSpecialFX(int modifier, int fire, int freeze, int flood, int drought) set Map generator parametersvoidsetSwampParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map GeneratorvoidvoidsetTundraParams(int minSpots, int maxSpots, int minSize, int maxSize) set the tundra parameters for the Map GeneratorvoidsetWaterParams(int minSpots, int maxSpots, int minSize, int maxSize, int prob) set the Parameters for the Map GeneratorvoidDeprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
BOARD_RANDOM
- See Also:
-
BOARD_SURPRISE
- See Also:
-
BOARD_GENERATED
- See Also:
-
MOUNTAIN_PLAIN
public static final int MOUNTAIN_PLAIN- See Also:
-
MOUNTAIN_VOLCANO_EXTINCT
public static final int MOUNTAIN_VOLCANO_EXTINCT- See Also:
-
MOUNTAIN_VOLCANO_DORMANT
public static final int MOUNTAIN_VOLCANO_DORMANT- See Also:
-
MOUNTAIN_VOLCANO_ACTIVE
public static final int MOUNTAIN_VOLCANO_ACTIVE- See Also:
-
MOUNTAIN_SNOW_CAPPED
public static final int MOUNTAIN_SNOW_CAPPED- See Also:
-
MOUNTAIN_LAKE
public static final int MOUNTAIN_LAKE- See Also:
-
MEDIUM_GROUND
public static final int MEDIUM_GROUND- See Also:
-
MEDIUM_ATMOSPHERE
public static final int MEDIUM_ATMOSPHERE- See Also:
-
MEDIUM_SPACE
public static final int MEDIUM_SPACE- See Also:
-
-
Method Details
-
getInstance
Creates and returns a new default instance of MapSettings.- Returns:
- a MapSettings with default settings values
-
getInstance
Creates and returns a clone of the given MapSettings.- Parameters:
other- the MapSettings to clone- Returns:
- a MapSettings with the cloned settings values
-
getInstance
Creates and returns a new instance of MapSettings with default values loaded from the given input stream.- Parameters:
is- the input stream that contains an XML representation of the map settings- Returns:
- a MapSettings with the values from XML
-
getBoardWidth
public int getBoardWidth() -
getBoardHeight
public int getBoardHeight() -
setBoardSize
public void setBoardSize(int boardWidth, int boardHeight) -
getTheme
-
setTheme
-
getMapWidth
public int getMapWidth() -
getMapHeight
public int getMapHeight() -
getBoardSize
-
setMapSize
public void setMapSize(int newWidth, int newHeight) -
getBoardsSelectedVector
-
setBoardsSelectedVector
-
setNullBoards
Fills in all nulls in the boards selected list with the specified board -
getBoardBuildings
-
setBoardBuildings
@Deprecated(since="0.51.0", forRemoval=true) public void setBoardBuildings(ArrayList<BuildingTemplate> buildings) Deprecated, for removal: This API element is subject to removal in a future version. -
chooseSurpriseBoards
public void chooseSurpriseBoards()Replaces all "Surprise..." boards with a random one of the chosen boards (which are appended after the "Surprise" string in the board name.) -
replaceBoardWithRandom
Replaces the specified type of board with random boards -
getBoardsAvailableVector
-
setBoardsAvailableVector
-
validateMapGenParameters
Deprecated, for removal: This API element is subject to removal in a future version.Checks, if the MapGenerator parameters are all valid. If not they are changed to valid values. -
equalMapGenParameters
Returns true if the MapSetting has the same MapGenerator settings and size as the parameter.- Parameters:
other- The MapSetting to which compare.- Returns:
- True if settings are the same.
-
getInvertNegativeTerrain
public int getInvertNegativeTerrain() -
getHilliness
public int getHilliness() -
getCliffs
public int getCliffs() -
getRange
public int getRange() -
getProbInvert
public int getProbInvert() -
getMinWaterSpots
public int getMinWaterSpots() -
getMaxWaterSpots
public int getMaxWaterSpots() -
getMinWaterSize
public int getMinWaterSize() -
getMaxWaterSize
public int getMaxWaterSize() -
getProbDeep
public int getProbDeep() -
getMinForestSpots
public int getMinForestSpots() -
getMaxForestSpots
public int getMaxForestSpots() -
getMinForestSize
public int getMinForestSize() -
getMaxForestSize
public int getMaxForestSize() -
getProbHeavy
public int getProbHeavy() -
getProbUltra
public int getProbUltra() -
getMinJungleSpots
public int getMinJungleSpots() -
getMaxJungleSpots
public int getMaxJungleSpots() -
getMinJungleSize
public int getMinJungleSize() -
getMaxJungleSize
public int getMaxJungleSize() -
getProbHeavyJungle
public int getProbHeavyJungle() -
getProbUltraJungle
public int getProbUltraJungle() -
getMinFoliageSpots
public int getMinFoliageSpots() -
getMaxFoliageSpots
public int getMaxFoliageSpots() -
getMinFoliageSize
public int getMinFoliageSize() -
getMaxFoliageSize
public int getMaxFoliageSize() -
getProbFoliageHeavy
public int getProbFoliageHeavy() -
getMinRoughSpots
public int getMinRoughSpots() -
getMaxRoughSpots
public int getMaxRoughSpots() -
getMinRoughSize
public int getMinRoughSize() -
getMaxRoughSize
public int getMaxRoughSize() -
getProbUltraRough
public int getProbUltraRough() -
getMinSandSpots
public int getMinSandSpots() -
setMinSandSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxSandSpots
public int getMaxSandSpots() -
setMaxSandSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinSandSize
public int getMinSandSize() -
setMinSandSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxSandSize
public int getMaxSandSize() -
setMaxSandSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinSnowSpots
public int getMinSnowSpots() -
setMinSnowSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxSnowSpots
public int getMaxSnowSpots() -
setMaxSnowSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinSnowSize
public int getMinSnowSize() -
setMinSnowSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxSnowSize
public int getMaxSnowSize() -
setMaxSnowSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinTundraSpots
public int getMinTundraSpots() -
setMinTundraSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxTundraSpots
public int getMaxTundraSpots() -
setMaxTundraSpots
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinTundraSize
public int getMinTundraSize() -
setMinTundraSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxTundraSize
public int getMaxTundraSize() -
setMaxTundraSize
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinPlantedFieldSpots
public int getMinPlantedFieldSpots() -
setMinPlantedFieldSpots
@Deprecated(since="0.51.0", forRemoval=true) public void setMinPlantedFieldSpots(int minPlantedFieldSpots) Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxPlantedFieldSpots
public int getMaxPlantedFieldSpots() -
setMaxPlantedFieldSpots
@Deprecated(since="0.51.0", forRemoval=true) public void setMaxPlantedFieldSpots(int maxPlantedFieldSpots) Deprecated, for removal: This API element is subject to removal in a future version. -
getMinPlantedFieldSize
public int getMinPlantedFieldSize() -
setMinPlantedFieldSize
@Deprecated(since="0.51.0", forRemoval=true) public void setMinPlantedFieldSize(int minPlantedFieldSize) Deprecated, for removal: This API element is subject to removal in a future version. -
getMaxPlantedFieldSize
public int getMaxPlantedFieldSize() -
setMaxPlantedFieldSize
@Deprecated(since="0.51.0", forRemoval=true) public void setMaxPlantedFieldSize(int maxPlantedFieldSize) Deprecated, for removal: This API element is subject to removal in a future version. -
getMinSwampSpots
public int getMinSwampSpots() -
getMaxSwampSpots
public int getMaxSwampSpots() -
getMinSwampSize
public int getMinSwampSize() -
getMaxSwampSize
public int getMaxSwampSize() -
getMinPavementSpots
public int getMinPavementSpots() -
getMaxPavementSpots
public int getMaxPavementSpots() -
getMinPavementSize
public int getMinPavementSize() -
getMaxPavementSize
public int getMaxPavementSize() -
getMinRubbleSpots
public int getMinRubbleSpots() -
getMaxRubbleSpots
public int getMaxRubbleSpots() -
getMinRubbleSize
public int getMinRubbleSize() -
getMaxRubbleSize
public int getMaxRubbleSize() -
getProbUltraRubble
public int getProbUltraRubble() -
getMinFortifiedSpots
public int getMinFortifiedSpots() -
getMaxFortifiedSpots
public int getMaxFortifiedSpots() -
getMinFortifiedSize
public int getMinFortifiedSize() -
getMaxFortifiedSize
public int getMaxFortifiedSize() -
getMinIceSpots
public int getMinIceSpots() -
getMaxIceSpots
public int getMaxIceSpots() -
getMinIceSize
public int getMinIceSize() -
getMaxIceSize
public int getMaxIceSize() -
getProbRoad
public int getProbRoad() -
getProbRiver
public int getProbRiver() -
getProbCrater
public int getProbCrater() -
getMinRadius
public int getMinRadius() -
getMaxRadius
public int getMaxRadius() -
getMinCraters
public int getMinCraters() -
getMaxCraters
public int getMaxCraters() -
getAlgorithmToUse
public int getAlgorithmToUse() -
getProbFlood
public int getProbFlood() -
getProbForestFire
public int getProbForestFire() -
getProbFreeze
public int getProbFreeze() -
getProbDrought
public int getProbDrought() -
getFxMod
public int getFxMod() -
getCityBlocks
public int getCityBlocks() -
getCityType
-
getCityMinCF
public int getCityMinCF() -
getCityMaxCF
public int getCityMaxCF() -
getCityMinFloors
public int getCityMinFloors() -
getCityMaxFloors
public int getCityMaxFloors() -
getCityDensity
public int getCityDensity() -
getTownSize
public int getTownSize() -
getMountainHeightMin
public int getMountainHeightMin() -
getMountainHeightMax
public int getMountainHeightMax() -
getMountainPeaks
public int getMountainPeaks() -
getMountainStyle
public int getMountainStyle() -
getMountainWidthMin
public int getMountainWidthMin() -
getMountainWidthMax
public int getMountainWidthMax() -
setElevationParams
public void setElevationParams(int hill, int newRange, int prob) set the Parameters for the Map Generator -
setWaterParams
public void setWaterParams(int minSpots, int maxSpots, int minSize, int maxSize, int prob) set the Parameters for the Map Generator -
setForestParams
public void setForestParams(int minSpots, int maxSpots, int minSize, int maxSize, int probHeavy, int probUltra) set the forest parameters for the Map Generator -
setJungleParams
public void setJungleParams(int minSpots, int maxSpots, int minSize, int maxSize, int probHeavy, int probUltra) set the jungle parameters for the Map Generator -
setFoliageParams
public void setFoliageParams(int minSpots, int maxSpots, int minSize, int maxSize, int prob) set the Parameters for the Map Generator -
setRoughParams
public void setRoughParams(int minSpots, int maxSpots, int minSize, int maxSize, int probUltra) set rough terrain parameters for the Map Generator -
setSandParams
public void setSandParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setSnowParams
public void setSnowParams(int minSpots, int maxSpots, int minSize, int maxSize) set the snow parameters for the Map Generator -
setTundraParams
public void setTundraParams(int minSpots, int maxSpots, int minSize, int maxSize) set the tundra parameters for the Map Generator -
setPlantedFieldParams
public void setPlantedFieldParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setSwampParams
public void setSwampParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setPavementParams
public void setPavementParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setRubbleParams
public void setRubbleParams(int minSpots, int maxSpots, int minSize, int maxSize, int probUltra) set the Parameters for the Map Generator -
setFortifiedParams
public void setFortifiedParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setIceParams
public void setIceParams(int minSpots, int maxSpots, int minSize, int maxSize) set the Parameters for the Map Generator -
setRiverParam
public void setRiverParam(int prob) set the Parameters for the Map Generator -
setRoadParam
public void setRoadParam(int prob) set the Parameters for the Map Generator -
setCliffParam
public void setCliffParam(int prob) set the Parameters for the Map Generator -
setCraterParam
public void setCraterParam(int prob, int minCrat, int maxCrat, int minRad, int maxRad) set the Parameters for the Map Generator -
setInvertNegativeTerrain
public void setInvertNegativeTerrain(int invert) set the Parameters for the Map Generator -
setSpecialFX
public void setSpecialFX(int modifier, int fire, int freeze, int flood, int drought) set Map generator parameters -
setAlgorithmToUse
public void setAlgorithmToUse(int alg) -
setCityParams
public void setCityParams(int cityBlocks, String cityType, int cityMinCF, int cityMaxCF, int cityMinFloors, int cityMaxFloors, int cityDensity, int townSize) -
setMountainParams
public void setMountainParams(int mountainPeaks, int mountainWidthMin, int mountainWidthMax, int mountainHeightMin, int mountainHeightMax, int mountainStyle) -
setMedium
public void setMedium(int m) -
getMedium
public int getMedium() -
getMediumName
Deprecated, for removal: This API element is subject to removal in a future version. -
save
-