Package mindustry.maps
Class Map
java.lang.Object
mindustry.maps.Map
- All Implemented Interfaces:
Comparable<Map>
,Publishable
-
Field Summary
Modifier and TypeFieldDescriptionint
Build that this map was created in.final boolean
Whether this is a custom map.final Fi
Base file of this map.int
Map width/height, shorts.Associated mod.int
Number of enemy spawns on this map.final StringMap
Metadata.All teams present on this map.Preview texture.final int
Format version.int
Map width/height, shorts.boolean
Whether this map is managed, e.g. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSteamID
(String id) adds a steam ID to this item once it's published.applyRules
(Gamemode mode) Returns the result of applying this map's rules to the specified gamemode.author()
int
filters()
Returns the generation filters that this map uses on load.int
boolean
name()
boolean
called before this item is published.void
removes the item ID; called when the item isn't found.rules()
This creates a new instance of Rules.void
setHighScore
(int score) steamTag()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mindustry.type.Publishable
hasSteamID
-
Field Details
-
custom
public final boolean customWhether this is a custom map. -
tags
Metadata. Author description, display name, etc. -
file
Base file of this map. File can be named anything at all. -
version
public final int versionFormat version. -
workshop
public boolean workshopWhether this map is managed, e.g. downloaded from the Steam workshop. -
width
public int widthMap width/height, shorts. -
height
public int heightMap width/height, shorts. -
texture
Preview texture. -
build
public int buildBuild that this map was created in. -1 = unknown or custom build. -
teams
All teams present on this map. -
spawns
public int spawnsNumber of enemy spawns on this map. -
mod
Associated mod. If null, no mod is associated.
-
-
Constructor Details
-
Map
-
Map
-
Map
-
Map
-
-
Method Details
-
getHightScore
public int getHightScore() -
safeTexture
-
previewFile
-
cacheFile
-
setHighScore
public void setHighScore(int score) -
applyRules
Returns the result of applying this map's rules to the specified gamemode. -
rules
This creates a new instance of Rules. -
rules
-
filters
Returns the generation filters that this map uses on load. -
name
-
author
-
description
-
plainName
-
plainAuthor
-
plainDescription
-
tag
-
hasTag
-
getSteamID
- Specified by:
getSteamID
in interfacePublishable
- Returns:
- workshop item ID, or null if this isn't on the workshop.
-
addSteamID
Description copied from interface:Publishable
adds a steam ID to this item once it's published. should save the item to make sure this change is persisted.- Specified by:
addSteamID
in interfacePublishable
-
removeSteamID
public void removeSteamID()Description copied from interface:Publishable
removes the item ID; called when the item isn't found.- Specified by:
removeSteamID
in interfacePublishable
-
steamTitle
- Specified by:
steamTitle
in interfacePublishable
- Returns:
- default title of the listing.
-
steamDescription
- Specified by:
steamDescription
in interfacePublishable
- Returns:
- standard steam listing description, may be null. this is editable by users after release.
-
steamTag
- Specified by:
steamTag
in interfacePublishable
- Returns:
- the tag that this content has. e.g. 'schematic' or 'map'.
-
createSteamFolder
- Specified by:
createSteamFolder
in interfacePublishable
- Returns:
- a folder with everything needed for this piece of content in it; does not need to be a copy.
-
createSteamPreview
- Specified by:
createSteamPreview
in interfacePublishable
- Returns:
- a preview file PNG.
-
extraTags
- Specified by:
extraTags
in interfacePublishable
- Returns:
- any extra tags to add to this item.
-
prePublish
public boolean prePublish()Description copied from interface:Publishable
called before this item is published.- Specified by:
prePublish
in interfacePublishable
- Returns:
- true to signify that everything is cool and good, or false to significy that the user has done something wrong. if false is returned, make sure to show a dialog explaining the error.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Map>
-
toString
-