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.PlaySoundStatement,LStatements.PrintCharStatement,LStatements.PrintFlushStatement,LStatements.PrintStatement,LStatements.RadarStatement,LStatements.ReadStatement,LStatements.SelectStatement,LStatements.SensorStatement,LStatements.SetBlockStatement,LStatements.SetFlagStatement,LStatements.SetMarkerStatement,LStatements.SetPropStatement,LStatements.SetRateStatement,LStatements.SetRuleStatement,LStatements.SetStatement,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) category()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>protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>Puts the text and field in one table, taking up one cell.booleanhidden()name()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.protected voidrow(arc.scene.ui.layout.Table table) protected StringvoidsaveUI()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) typeName()voidwrite(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
-
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
-
field
-
fields
-
fieldst
protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField> fieldst(arc.scene.ui.layout.Table table, String desc, String value, arc.func.Cons<String> setter) Puts the text and field in one table, taking up one cell. -
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 -
fields
-
row
protected void row(arc.scene.ui.layout.Table table) -
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) -
afterRead
public void afterRead() -
write
-
setupUI
public void setupUI() -
saveUI
public void saveUI() -
typeName
-
name
-