Package mindustry.maps
Class Map
java.lang.Object
mindustry.maps.Map
- All Implemented Interfaces:
Comparable<Map>,Publishable
-
Field Summary
FieldsModifier and TypeFieldDescriptionintBuild that this map was created in.final booleanWhether this is a custom map.final arc.files.FiBase file of this map.intMap width/height, shorts.Associated mod.intNumber of enemy spawns on this map.final arc.struct.StringMapMetadata.arc.struct.IntSetAll teams present on this map.arc.graphics.TexturePreview texture.final intFormat version.intMap width/height, shorts.booleanWhether this map is managed, e.g. -
Constructor Summary
ConstructorsConstructorDescriptionMap(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom) Map(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom, int version) Map(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom, int version, int build) Map(arc.struct.StringMap tags) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSteamID(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()arc.files.Fiintarc.files.Fiarc.files.Fiarc.struct.Seq<String>arc.struct.Seq<GenerateFilter>filters()Returns the generation filters that this map uses on load.intbooleanname()booleancalled before this item is published.arc.files.Fivoidremoves the item ID; called when the item isn't found.rules()This creates a new instance of Rules.arc.graphics.TexturevoidsetHighScore(int score) steamTag()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface mindustry.type.Publishable
hasSteamID
-
Field Details
-
custom
public final boolean customWhether this is a custom map. -
tags
public final arc.struct.StringMap tagsMetadata. Author description, display name, etc. -
file
public final arc.files.Fi fileBase 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
public arc.graphics.Texture texturePreview texture. -
build
public int buildBuild that this map was created in. -1 = unknown or custom build. -
teams
public arc.struct.IntSet teamsAll 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
public Map(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom, int version, int build) -
Map
public Map(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom, int version) -
Map
public Map(arc.files.Fi file, int width, int height, arc.struct.StringMap tags, boolean custom) -
Map
public Map(arc.struct.StringMap tags)
-
-
Method Details
-
getHightScore
public int getHightScore() -
safeTexture
public arc.graphics.Texture safeTexture() -
previewFile
public arc.files.Fi previewFile() -
cacheFile
public arc.files.Fi 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:
getSteamIDin interfacePublishable- Returns:
- workshop item ID, or null if this isn't on the workshop.
-
addSteamID
Description copied from interface:Publishableadds a steam ID to this item once it's published. should save the item to make sure this change is persisted.- Specified by:
addSteamIDin interfacePublishable
-
removeSteamID
public void removeSteamID()Description copied from interface:Publishableremoves the item ID; called when the item isn't found.- Specified by:
removeSteamIDin interfacePublishable
-
steamTitle
- Specified by:
steamTitlein interfacePublishable- Returns:
- default title of the listing.
-
steamDescription
- Specified by:
steamDescriptionin interfacePublishable- Returns:
- standard steam listing description, may be null. this is editable by users after release.
-
steamTag
- Specified by:
steamTagin interfacePublishable- Returns:
- the tag that this content has. e.g. 'schematic' or 'map'.
-
createSteamFolder
- Specified by:
createSteamFolderin interfacePublishable- Returns:
- a folder with everything needed for this piece of content in it; does not need to be a copy.
-
createSteamPreview
- Specified by:
createSteamPreviewin interfacePublishable- Returns:
- a preview file PNG.
-
extraTags
- Specified by:
extraTagsin interfacePublishable- Returns:
- any extra tags to add to this item.
-
prePublish
public boolean prePublish()Description copied from interface:Publishablecalled before this item is published.- Specified by:
prePublishin 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:
compareToin interfaceComparable<Map>
-
toString
-