Package mindustry

Class Vars

java.lang.Object
mindustry.Vars
All Implemented Interfaces:
Loadable

public class Vars extends Object implements Loadable
  • Field Details

    • failedToLaunch

      public static boolean failedToLaunch
      Whether the game failed to launch last time.
    • loadLocales

      public static boolean loadLocales
      Whether to load locales.
    • loadedLogger

      public static boolean loadedLogger
      Whether the logger is loaded.
    • loadedFileLogger

      public static boolean loadedFileLogger
      Whether the logger is loaded.
    • experimental

      public static boolean experimental
      Whether to enable various experimental features (e.g. spawn positions for spawn groups) TODO change
    • steamPlayerName

      public static String steamPlayerName
      Name of current Steam player.
    • defaultContentIcons

      public static final ContentType[] defaultContentIcons
      Default accessible content types used for player-selectable icons.
    • defaultEnv

      public static final int defaultEnv
      Default rule environment.
      See Also:
    • darkRadius

      public static final int darkRadius
      Wall darkness radius.
      See Also:
    • maxLoadoutSchematicPad

      public static final int maxLoadoutSchematicPad
      Maximum extra padding around deployment schematics.
      See Also:
    • schematicBaseStart

      public static final String schematicBaseStart
      All schematic base64 starts with this string.
      See Also:
    • bufferSize

      public static final int bufferSize
      IO buffer size.
      See Also:
    • charset

      public static final Charset charset
      global charset, since Android doesn't support the Charsets class
    • appName

      public static final String appName
      main application name, capitalized
      See Also:
    • ghApi

      public static final String ghApi
      Github API URL.
      See Also:
    • discordURL

      public static final String discordURL
      URL for discord invite.
      See Also:
    • modGuideURL

      public static final String modGuideURL
      URL the links to the wiki's modding guide.
      See Also:
    • serverJsonBeURL

      public static final String serverJsonBeURL
      URL to the JSON file containing all the BE servers. Only queried in BE.
      See Also:
    • serverJsonURL

      public static final String serverJsonURL
      URL to the JSON file containing all the stable servers.
      See Also:
    • reportIssueURL

      public static final String reportIssueURL
      URL of the github issue report template.
      See Also:
    • defaultServers

      public static final Seq<ServerGroup> defaultServers
      list of built-in servers.
    • maxBlockSize

      public static final int maxBlockSize
      maximum size of any block, do not change unless you know what you're doing
      See Also:
    • mineTransferRange

      public static final float mineTransferRange
      maximum distance between mine and core that supports automatic transferring
      See Also:
    • maxTextLength

      public static final int maxTextLength
      max chat message length
      See Also:
    • maxNameLength

      public static final int maxNameLength
      max player name length in bytes
      See Also:
    • itemSize

      public static final float itemSize
      displayed item size when ingame.
      See Also:
    • finalWorldBounds

      public static final float finalWorldBounds
      units outside this bound will die instantly
      See Also:
    • buildingRange

      public static final float buildingRange
      default range for building
      See Also:
    • itemTransferRange

      public static final float itemTransferRange
      range for moving items
      See Also:
    • logicItemTransferRange

      public static final float logicItemTransferRange
      range for moving items for logic units
      See Also:
    • turnDuration

      public static final float turnDuration
      duration of time between turns in ticks
      See Also:
    • baseInvasionChance

      public static final float baseInvasionChance
      chance of an invasion per turn, 1 = 100%
      See Also:
    • invasionGracePeriod

      public static final float invasionGracePeriod
      how many minutes have to pass before invasions in a *captured* sector start
      See Also:
    • minArmorDamage

      public static final float minArmorDamage
      min armor fraction damage; e.g. 0.05 = at least 5% damage
      See Also:
    • coreLandDuration

      public static final float coreLandDuration
      land/launch animation duration
      See Also:
    • tilesize

      public static final int tilesize
      size of tiles in units
      See Also:
    • tilePayload

      public static final float tilePayload
      size of one tile payload (^2)
      See Also:
    • iconXLarge

      public static final float iconXLarge
      icon sizes for UI
      See Also:
    • iconLarge

      public static final float iconLarge
      icon sizes for UI
      See Also:
    • iconMed

      public static final float iconMed
      icon sizes for UI
      See Also:
    • iconSmall

      public static final float iconSmall
      icon sizes for UI
      See Also:
    • macNotchHeight

      public static float macNotchHeight
      macbook screen notch height
    • updateEditorOnChange

      public static boolean updateEditorOnChange
      for map generator dialog
    • playerColors

      public static final Color[] playerColors
      all choosable player colors in join/host dialog
    • maxTcpSize

      public static final int maxTcpSize
      maximum TCP packet size
      See Also:
    • port

      public static final int port
      default server port
      See Also:
    • multicastPort

      public static final int multicastPort
      multicast discovery port.
      See Also:
    • maxModSubtitleLength

      public static final int maxModSubtitleLength
      Maximum char length of mod subtitles in browser/viewer.
      See Also:
    • multicastGroup

      public static final String multicastGroup
      multicast group for discovery.
      See Also:
    • clientLoaded

      public static boolean clientLoaded
      whether the graphical game client has loaded
    • maxTextureSize

      public static int maxTextureSize
      max GL texture size
    • maxSchematicSize

      public static int maxSchematicSize
      Maximum schematic size.
    • showSectorLandInfo

      public static boolean showSectorLandInfo
      Whether to show sector info upon landing.
    • checkScreenshotMemory

      public static boolean checkScreenshotMemory
      Whether to check for memory use before taking screenshots.
    • confirmExit

      public static boolean confirmExit
      Whether to prompt the user to confirm exiting.
    • disableUI

      public static boolean disableUI
      if true, UI is not drawn
    • testMobile

      public static boolean testMobile
      if true, game is set up in mobile mode, even on desktop. used for debugging
    • mobile

      public static boolean mobile
      whether the game is running on a mobile device
    • ios

      public static boolean ios
      whether the game is running on an iOS device
    • android

      public static boolean android
      whether the game is running on an Android device
    • headless

      public static boolean headless
      whether the game is running on a headless server
    • steam

      public static boolean steam
      whether steam is enabled for this game
    • clearSectors

      public static boolean clearSectors
      whether to clear sector saves when landing
    • enableLight

      public static boolean enableLight
      whether any light rendering is enabled
    • enableDarkness

      public static boolean enableDarkness
      Whether to draw shadows of blocks at map edges and static blocks. Do not change unless you know exactly what you are doing.
    • dataDirectory

      public static Fi dataDirectory
      application data directory, equivalent to Settings.getDataDirectory()
    • screenshotDirectory

      public static Fi screenshotDirectory
      data subdirectory used for screenshots
    • customMapDirectory

      public static Fi customMapDirectory
      data subdirectory used for custom maps
    • mapPreviewDirectory

      public static Fi mapPreviewDirectory
      data subdirectory used for custom map previews
    • tmpDirectory

      public static Fi tmpDirectory
      tmp subdirectory for map conversion
    • saveDirectory

      public static Fi saveDirectory
      data subdirectory used for saves
    • modDirectory

      public static Fi modDirectory
      data subdirectory used for mods
    • schematicDirectory

      public static Fi schematicDirectory
      data subdirectory used for schematics
    • bebuildDirectory

      public static Fi bebuildDirectory
      data subdirectory used for bleeding edge build versions
    • launchIDFile

      public static Fi launchIDFile
      file used to store launch ID
    • emptyMap

      public static Map emptyMap
      empty map, indicates no current map
    • emptyTile

      public static Tile emptyTile
      empty tile for payloads
    • mapExtension

      public static final String mapExtension
      map file extension
      See Also:
    • saveExtension

      public static final String saveExtension
      save file extension
      See Also:
    • schematicExtension

      public static final String schematicExtension
      schematic file extension
      See Also:
    • javaPath

      public static String javaPath
      path to the java executable
    • locales

      public static Locale[] locales
      list of all locales that can be switched to
    • mainExecutor

      public static ExecutorService mainExecutor
    • tree

      public static FileTree tree
    • net

      public static Net net
    • content

      public static ContentLoader content
    • state

      public static GameState state
    • collisions

      public static EntityCollisions collisions
    • waves

      public static Waves waves
    • platform

      public static Platform platform
    • mods

      public static Mods mods
    • schematics

      public static Schematics schematics
    • becontrol

      public static BeControl becontrol
    • asyncCore

      public static AsyncCore asyncCore
    • bases

      public static BaseRegistry bases
    • logicVars

      public static GlobalVars logicVars
    • editor

      public static MapEditor editor
    • service

      public static GameService service
    • universe

      public static Universe universe
    • world

      public static World world
    • maps

      public static Maps maps
    • spawner

      public static WaveSpawner spawner
    • indexer

      public static BlockIndexer indexer
    • pathfinder

      public static Pathfinder pathfinder
    • controlPath

      public static ControlPathfinder controlPath
    • fogControl

      public static FogControl fogControl
    • control

      public static Control control
    • logic

      public static Logic logic
    • renderer

      public static Renderer renderer
    • ui

      public static UI ui
    • netServer

      public static NetServer netServer
    • netClient

      public static NetClient netClient
    • player

      public static mindustry.gen.Player player
  • Constructor Details

    • Vars

      public Vars()
  • Method Details

    • loadAsync

      public void loadAsync()
      Specified by:
      loadAsync in interface Loadable
    • init

      public static void init()
    • checkLaunch

      public static void checkLaunch()
      Checks if a launch failure occurred. If this is the case, failedToLaunch is set to true.
    • finishLaunch

      public static void finishLaunch()
      Cleans up after a successful launch.
    • loadLogger

      public static void loadLogger()
    • loadFileLogger

      public static void loadFileLogger()
    • loadSettings

      public static void loadSettings()