Package mindustry
Class Vars
java.lang.Object
mindustry.Vars
- All Implemented Interfaces:
arc.assets.Loadable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Icons available to the user for customization in certain dialogs.static booleanwhether the game is running on an Android devicestatic final Stringmain application name, capitalizedstatic AsyncCorestatic AvoidanceProcessstatic final floatchance of an invasion per turn, 1 = 100%static BaseRegistrystatic arc.files.Fidata subdirectory used for bleeding edge build versionsstatic BeControlstatic final intIO buffer size.static final floatdefault range for buildingstatic final arc.struct.Seq<ServerGroup>cached server list - only used if defaultServers have not been fetchedstatic final Charsetglobal charset, since Android doesn't support the Charsets classstatic booleanWhether to check for memory use before taking screenshots.static booleanwhether to clear sector saves when landingstatic booleanwhether the graphical game client has loadedstatic EntityCollisionsstatic booleanWhether to prompt the user to confirm exiting.static ContentLoaderstatic Controlstatic ControlPathfinderstatic arc.files.Fidata subdirectory used for custom mapsstatic final intWall darkness radius.static arc.files.Fiapplication data directory, equivalent toSettings.getDataDirectory()static booleanWhether to draw avoidance fields.static final ContentType[]Default accessible content types used for player-selectable icons.static final intDefault rule environment.static final arc.struct.Seq<ServerGroup>list of built-in servers.static booleanif true, most autosaving is disabled.static booleanif true, UI is not drawnstatic final StringURL for discord invite.static booleanWhether to draw debug lines for collisions.static MapEditorstatic Mapempty map, indicates no current mapstatic Tileempty tile for payloadsstatic booleanWhether to draw shadows of blocks at map edges and static blocks.static booleanwhether any light rendering is enabledstatic booleanWhether the game failed to launch last time.static booleanWhether the server list has been fetched from Github.static final floatunits outside this bound will die instantlystatic FogControlstatic booleanIf true, the BE server list is always used.static final StringGithub API URL.static booleanwhether the game is running on a headless serverstatic final floaticon sizes for UIstatic final floaticon sizes for UIstatic final floaticon sizes for UIstatic final floaticon sizes for UIstatic BlockIndexerstatic final floathow many minutes have to pass before invasions in a *captured* sector startstatic booleanwhether the game is running on an iOS devicestatic final floatdisplayed item size when ingame.static final floatrange for moving itemsstatic Stringpath to the java executablestatic arc.files.Fifile used to store launch IDstatic booleanWhether the logger is loaded.static booleanWhether the logger is loaded.static booleanWhether the on-disk server file cache has been loaded.static booleanWhether to load locales.static Locale[]list of all locales that can be switched tostatic Logicstatic final floatrange for moving items for logic unitsstatic GlobalVarsstatic floatmacbook screen notch heightstatic ExecutorServicestatic final Stringmap file extensionstatic arc.files.Fidata subdirectory used for custom map previewsstatic Mapsstatic final intmaximum size of any block, do not change unless you know what you're doingstatic floatMaximum delta time.static floatMaximum delta time.static final intmaximum openGL errors loggedstatic final intMaximum extra padding around deployment schematics.static final intMaximum char length of mod subtitles in browser/viewer.static final intmax player name length in bytesstatic intMaximum schematic size.static final intmaximum TCP packet sizestatic final intmax chat message lengthstatic intmax GL texture sizestatic final floatmin armor fraction damage; e.g.static final floatmaximum distance between mine and core that supports automatic transferringstatic final intMin game version for java mods specifically - this is higher, as Java mods have more breaking changes.static final intMin game version for all mods.static booleanwhether the game is running on a mobile devicestatic arc.files.Fidata subdirectory used for modsstatic final StringLink to the wiki's modding guide.static final String[]URLs to the JSON files containing the list of mods.static Modsstatic final Stringmulticast group for discovery.static final intmulticast discovery port.static Netstatic NetClientstatic NetServerstatic Pathfinderstatic Platformstatic mindustry.gen.Playerstatic final arc.graphics.Color[]all choosable player colors in join/host dialogstatic final intdefault server portstatic Rendererstatic final StringURL of the github issue report template.static arc.files.Fidata subdirectory used for savesstatic final Stringsave file extensionstatic final StringAll schematic base64 starts with this string.static arc.files.Fidata subdirectory used for schematicsstatic final Stringschematic file extensionstatic Schematicsstatic arc.files.Fidata subdirectory used for screenshotsstatic arc.files.Filocal cache of server liststatic final String[]URLs to the JSON file containing all the BE servers.static final String[]URLs to the JSON file containing all the stable servers.static GameServicestatic booleanWhether to show sector info upon landing.static booleanIf true, a button to view sector submission threads is shown.static booleanIf true, mod code and scripts do not run.static WaveSpawnerstatic GameStatestatic booleanwhether steam is enabled for this gamestatic StringName of current Steam player.static booleanif true, game is set up in mobile mode, even on desktop.static final floatsize of one tile payload (^2)static final intsize of tiles in unitsstatic arc.files.Fitmp subdirectory for map conversionstatic FileTreestatic final floatduration of time between turns in ticksstatic UIstatic final floatscaling for unit circle collider radius, based on hitbox sizestatic Universestatic booleanfor map generator dialogstatic Wavesstatic World -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks if a launch failure occurred.static voidCleans up after a successful launch.static voidinit()voidstatic voidstatic voidstatic voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arc.assets.Loadable
getDependencies, getName, loadSync
-
Field Details
-
failedToLaunch
public static boolean failedToLaunchWhether the game failed to launch last time. -
loadLocales
public static boolean loadLocalesWhether to load locales. -
loadedLogger
public static boolean loadedLoggerWhether the logger is loaded. -
loadedFileLogger
public static boolean loadedFileLoggerWhether the logger is loaded. -
steamPlayerName
Name of current Steam player. -
minModGameVersion
public static final int minModGameVersionMin game version for all mods.- See Also:
-
minJavaModGameVersion
public static final int minJavaModGameVersionMin game version for java mods specifically - this is higher, as Java mods have more breaking changes.- See Also:
-
showSectorSubmissions
public static boolean showSectorSubmissionsIf true, a button to view sector submission threads is shown. -
forceBeServers
public static boolean forceBeServersIf true, the BE server list is always used. -
skipModCode
public static boolean skipModCodeIf true, mod code and scripts do not run. For internal testing only. This WILL break mods if enabled. -
defaultContentIcons
Default accessible content types used for player-selectable icons. -
defaultEnv
public static final int defaultEnvDefault rule environment.- See Also:
-
darkRadius
public static final int darkRadiusWall darkness radius.- See Also:
-
maxLoadoutSchematicPad
public static final int maxLoadoutSchematicPadMaximum extra padding around deployment schematics.- See Also:
-
schematicBaseStart
All schematic base64 starts with this string.- See Also:
-
bufferSize
public static final int bufferSizeIO buffer size.- See Also:
-
charset
global charset, since Android doesn't support the Charsets class -
appName
main application name, capitalized- See Also:
-
ghApi
Github API URL.- See Also:
-
discordURL
URL for discord invite.- See Also:
-
modGuideURL
Link to the wiki's modding guide.- See Also:
-
serverJsonBeURLs
URLs to the JSON file containing all the BE servers. Only queried in BE. -
serverJsonURLs
URLs to the JSON file containing all the stable servers. -
modJsonURLs
URLs to the JSON files containing the list of mods. -
reportIssueURL
URL of the github issue report template.- See Also:
-
defaultServers
list of built-in servers. -
cachedServers
cached server list - only used if defaultServers have not been fetched -
maxGlErrors
public static final int maxGlErrorsmaximum openGL errors logged- See Also:
-
maxBlockSize
public static final int maxBlockSizemaximum size of any block, do not change unless you know what you're doing- See Also:
-
mineTransferRange
public static final float mineTransferRangemaximum distance between mine and core that supports automatic transferring- See Also:
-
maxTextLength
public static final int maxTextLengthmax chat message length- See Also:
-
maxNameLength
public static final int maxNameLengthmax player name length in bytes- See Also:
-
itemSize
public static final float itemSizedisplayed item size when ingame.- See Also:
-
finalWorldBounds
public static final float finalWorldBoundsunits outside this bound will die instantly- See Also:
-
buildingRange
public static final float buildingRangedefault range for building- See Also:
-
unitCollisionRadiusScale
public static final float unitCollisionRadiusScalescaling for unit circle collider radius, based on hitbox size- See Also:
-
itemTransferRange
public static final float itemTransferRangerange for moving items- See Also:
-
logicItemTransferRange
public static final float logicItemTransferRangerange for moving items for logic units- See Also:
-
turnDuration
public static final float turnDurationduration of time between turns in ticks- See Also:
-
baseInvasionChance
public static final float baseInvasionChancechance of an invasion per turn, 1 = 100%- See Also:
-
invasionGracePeriod
public static final float invasionGracePeriodhow many minutes have to pass before invasions in a *captured* sector start- See Also:
-
minArmorDamage
public static final float minArmorDamagemin armor fraction damage; e.g. 0.05 = at least 5% damage- See Also:
-
tilesize
public static final int tilesizesize of tiles in units- See Also:
-
tilePayload
public static final float tilePayloadsize of one tile payload (^2)- See Also:
-
iconXLarge
public static final float iconXLargeicon sizes for UI- See Also:
-
iconLarge
public static final float iconLargeicon sizes for UI- See Also:
-
iconMed
public static final float iconMedicon sizes for UI- See Also:
-
iconSmall
public static final float iconSmallicon sizes for UI- See Also:
-
macNotchHeight
public static float macNotchHeightmacbook screen notch height -
updateEditorOnChange
public static boolean updateEditorOnChangefor map generator dialog -
playerColors
public static final arc.graphics.Color[] playerColorsall choosable player colors in join/host dialog -
accessibleIcons
Icons available to the user for customization in certain dialogs. -
maxTcpSize
public static final int maxTcpSizemaximum TCP packet size- See Also:
-
port
public static final int portdefault server port- See Also:
-
multicastPort
public static final int multicastPortmulticast discovery port.- See Also:
-
maxModSubtitleLength
public static final int maxModSubtitleLengthMaximum char length of mod subtitles in browser/viewer.- See Also:
-
multicastGroup
multicast group for discovery.- See Also:
-
maxDeltaClient
public static float maxDeltaClientMaximum delta time. If the actual delta time (*60) between frames is higher than this number, the game will start to slow down. -
maxDeltaServer
public static float maxDeltaServerMaximum delta time. If the actual delta time (*60) between frames is higher than this number, the game will start to slow down. -
clientLoaded
public static boolean clientLoadedwhether the graphical game client has loaded -
maxTextureSize
public static int maxTextureSizemax GL texture size -
maxSchematicSize
public static int maxSchematicSizeMaximum schematic size. -
showSectorLandInfo
public static boolean showSectorLandInfoWhether to show sector info upon landing. -
checkScreenshotMemory
public static boolean checkScreenshotMemoryWhether to check for memory use before taking screenshots. -
confirmExit
public static boolean confirmExitWhether to prompt the user to confirm exiting. -
disableUI
public static boolean disableUIif true, UI is not drawn -
disableSave
public static boolean disableSaveif true, most autosaving is disabled. internal use only! -
testMobile
public static boolean testMobileif true, game is set up in mobile mode, even on desktop. used for debugging -
mobile
public static boolean mobilewhether the game is running on a mobile device -
ios
public static boolean ioswhether the game is running on an iOS device -
android
public static boolean androidwhether the game is running on an Android device -
headless
public static boolean headlesswhether the game is running on a headless server -
steam
public static boolean steamwhether steam is enabled for this game -
clearSectors
public static boolean clearSectorswhether to clear sector saves when landing -
enableLight
public static boolean enableLightwhether any light rendering is enabled -
enableDarkness
public static boolean enableDarknessWhether to draw shadows of blocks at map edges and static blocks. Do not change unless you know exactly what you are doing. -
drawDebugHitboxes
public static boolean drawDebugHitboxesWhether to draw debug lines for collisions. -
debugDrawAvoidance
public static boolean debugDrawAvoidanceWhether to draw avoidance fields. -
loadedServerCache
public static boolean loadedServerCacheWhether the on-disk server file cache has been loaded. -
fetchedServers
public static boolean fetchedServersWhether the server list has been fetched from Github. -
dataDirectory
public static arc.files.Fi dataDirectoryapplication data directory, equivalent toSettings.getDataDirectory() -
screenshotDirectory
public static arc.files.Fi screenshotDirectorydata subdirectory used for screenshots -
customMapDirectory
public static arc.files.Fi customMapDirectorydata subdirectory used for custom maps -
mapPreviewDirectory
public static arc.files.Fi mapPreviewDirectorydata subdirectory used for custom map previews -
tmpDirectory
public static arc.files.Fi tmpDirectorytmp subdirectory for map conversion -
saveDirectory
public static arc.files.Fi saveDirectorydata subdirectory used for saves -
modDirectory
public static arc.files.Fi modDirectorydata subdirectory used for mods -
schematicDirectory
public static arc.files.Fi schematicDirectorydata subdirectory used for schematics -
bebuildDirectory
public static arc.files.Fi bebuildDirectorydata subdirectory used for bleeding edge build versions -
launchIDFile
public static arc.files.Fi launchIDFilefile used to store launch ID -
serverCacheFile
public static arc.files.Fi serverCacheFilelocal cache of server list -
emptyMap
empty map, indicates no current map -
emptyTile
empty tile for payloads -
mapExtension
map file extension- See Also:
-
saveExtension
save file extension- See Also:
-
schematicExtension
schematic file extension- See Also:
-
javaPath
path to the java executable -
locales
list of all locales that can be switched to -
mainExecutor
-
tree
-
net
-
-
state
-
collisions
-
waves
-
platform
-
mods
-
schematics
-
becontrol
-
asyncCore
-
bases
-
logicVars
-
editor
-
avoidance
-
service
-
universe
-
world
-
maps
-
spawner
-
indexer
-
pathfinder
-
controlPath
-
fogControl
-
control
-
logic
-
renderer
-
ui
-
netServer
-
netClient
-
player
@Nullable public static mindustry.gen.Player player
-
-
Constructor Details
-
Vars
public Vars()
-
-
Method Details
-
loadAsync
public void loadAsync()- Specified by:
loadAsyncin interfacearc.assets.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()
-