Package mindustry.logic
Class GlobalVars
java.lang.Object
mindustry.logic.GlobalVars
Stores global logic variables for logic processors.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn entry that describes a variable for documentation purposes. - 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final ContentType[]static final arc.math.RandGlobal random state.static final arc.struct.Seq<String>static final ContentType[] - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionarc.struct.Seq<GlobalVars.VarEntry>voidinit()lookupContent(ContentType type, int id) intlookupLogicId(UnlockableContent content) Adds a constant value by name.Adds a constant value by name.voidputEntryOnly(String name) voidSets a global variable by name.voidupdate()Updates global time and other state variables.waitVar() 
- 
Field Details
- 
ctrlProcessor
public static final int ctrlProcessor- See Also:
 
 - 
ctrlPlayer
public static final int ctrlPlayer- See Also:
 
 - 
ctrlCommand
public static final int ctrlCommand- See Also:
 
 - 
lookableContent
 - 
writableLookableContent
 - 
rand
public static final arc.math.Rand randGlobal random state. - 
soundNames
 
 - 
 - 
Constructor Details
- 
GlobalVars
public GlobalVars() 
 - 
 - 
Method Details
- 
init
public void init() - 
update
public void update()Updates global time and other state variables. - 
waitVar
 - 
getEntries
 - 
lookupContent
- Returns:
 - a piece of content based on its logic ID. This is not equivalent to content ID. In the case of teams, the return value may not be Content.
 
 - 
lookupLogicId
- Returns:
 - the integer logic ID of content, or -1 if invalid.
 
 - 
get
- Returns:
 - a constant variable if there is a constant with this name, otherwise null. Attempt to get privileged variable from non-privileged logic executor returns null constant.
 
 - 
get
- Returns:
 - a constant variable by name Attempt to get privileged variable from non-privileged logic executor returns null constant.
 
 - 
set
Sets a global variable by name. - 
put
Adds a constant value by name. - 
put
Adds a constant value by name. - 
put
 - 
putEntry
 - 
putEntry
 - 
putEntryOnly
 
 -