Package mindustry.logic
Class LStatement
java.lang.Object
mindustry.logic.LStatement
- Direct Known Subclasses:
LStatements.ApplyStatusStatement,LStatements.ClientDataStatement,LStatements.CommentStatement,LStatements.ControlStatement,LStatements.CutsceneStatement,LStatements.DrawFlushStatement,LStatements.DrawStatement,LStatements.EffectStatement,LStatements.EndStatement,LStatements.ExplosionStatement,LStatements.FetchStatement,LStatements.FlushMessageStatement,LStatements.FormatStatement,LStatements.GetBlockStatement,LStatements.GetFlagStatement,LStatements.GetLinkStatement,LStatements.InvalidStatement,LStatements.JumpStatement,LStatements.LocalePrintStatement,LStatements.LookupStatement,LStatements.MakeMarkerStatement,LStatements.OperationStatement,LStatements.PackColorStatement,LStatements.PlayMusicStatement,LStatements.PlaySoundStatement,LStatements.PrintCharStatement,LStatements.PrintFlushStatement,LStatements.PrintStatement,LStatements.QueryStatement,LStatements.RadarStatement,LStatements.ReadStatement,LStatements.SelectStatement,LStatements.SensorStatement,LStatements.SetBlockStatement,LStatements.SetFlagStatement,LStatements.SetMarkerStatement,LStatements.SetPropStatement,LStatements.SetRateStatement,LStatements.SetRuleStatement,LStatements.SetStatement,LStatements.SpawnBulletStatement,LStatements.SpawnUnitStatement,LStatements.SpawnWaveStatement,LStatements.StopStatement,LStatements.SyncStatement,LStatements.UnitBindStatement,LStatements.UnitControlStatement,LStatements.UnitLocateStatement,LStatements.UnpackColorStatement,LStatements.WaitStatement,LStatements.WeatherSenseStatement,LStatements.WeatherSetStatement,LStatements.WriteStatement
A statement is an intermediate representation of an instruction, to be used mostly in UI.
Contains all relevant variable information.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract voidbuild(arc.scene.ui.layout.Table table) abstract LExecutor.LInstructionbuild(LAssembler builder) protected static Stringstatic Stringcategory()protected arc.scene.ui.layout.Cell<arc.scene.ui.Button>Adds color edit buttoncopy()protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>protected voidfieldAlignSelect(arc.scene.ui.layout.Table t, arc.func.Prov<String> get, arc.func.Cons<String> set, boolean hor, boolean ver) protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>fields(arc.scene.ui.layout.Table table, String desc, boolean nameAfterField, String value, arc.func.Cons<String> setter) protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>booleanhidden()protected static booleanname()booleanIf true, this statement is considered useless with privileged processors and is not allowed in them.protected voidparam(arc.scene.ui.layout.Cell<arc.scene.ui.Label> label) booleanPrivileged instructions are only allowed in world processors.static StringSanitizes variable input strings from text fields into values that will not break logic parsing.voidsaveUI()protected static StringselectTranslate(String text) voidsetupUI()static voidshowAlignSelect(arc.scene.ui.Button b, int current, arc.func.Intc setter, boolean hor, boolean ver) protected <T> voidshowSelect(arc.scene.ui.Button b, T[] values, T current, arc.func.Cons<T> getter) protected <T> voidshowSelect(arc.scene.ui.Button b, T[] values, T current, arc.func.Cons<T> getter, int cols, arc.func.Cons<arc.scene.ui.layout.Cell> sizer) protected static voidshowSelectTable(arc.scene.ui.Button b, arc.func.Cons2<arc.scene.ui.layout.Table, Runnable> hideCons) protected static voidshowSelectTable(arc.scene.ui.Button b, arc.func.Cons2<arc.scene.ui.layout.Table, Runnable> hideCons, Runnable hideCallback) typeName()booleanvoidwrite(StringBuilder builder)
-
Field Details
-
nameToAlign
-
alignToName
-
elem
-
-
Constructor Details
-
LStatement
public LStatement()
-
-
Method Details
-
build
public abstract void build(arc.scene.ui.layout.Table table) -
build
-
category
-
copy
-
useWrapping
public boolean useWrapping() -
privileged
public boolean privileged()Privileged instructions are only allowed in world processors. -
nonPrivileged
public boolean nonPrivileged()If true, this statement is considered useless with privileged processors and is not allowed in them. -
param
protected void param(arc.scene.ui.layout.Cell<arc.scene.ui.Label> label) -
sanitize
Sanitizes variable input strings from text fields into values that will not break logic parsing. -
logicLocalization
protected static boolean logicLocalization() -
bundle
-
bundle
-
selectTranslate
-
field
-
fields
-
fields
-
fields
-
col
protected arc.scene.ui.layout.Cell<arc.scene.ui.Button> col(arc.scene.ui.layout.Table table, String value, arc.func.Cons<arc.graphics.Color> setter) Adds color edit button -
showSelect
protected <T> void showSelect(arc.scene.ui.Button b, T[] values, T current, arc.func.Cons<T> getter, int cols, arc.func.Cons<arc.scene.ui.layout.Cell> sizer) -
showSelect
protected <T> void showSelect(arc.scene.ui.Button b, T[] values, T current, arc.func.Cons<T> getter) -
fieldAlignSelect
-
showAlignSelect
public static void showAlignSelect(arc.scene.ui.Button b, int current, arc.func.Intc setter, boolean hor, boolean ver) -
showSelectTable
protected static void showSelectTable(arc.scene.ui.Button b, arc.func.Cons2<arc.scene.ui.layout.Table, Runnable> hideCons) -
showSelectTable
-
afterRead
public void afterRead() -
write
-
setupUI
public void setupUI() -
saveUI
public void saveUI() -
typeName
-
statementKey
-
localizedName
-
name
-