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.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.WaitStatement, LStatements.WeatherSenseStatement, LStatements.WeatherSetStatement, LStatements.WriteStatement

public abstract class LStatement extends Object
A statement is an intermediate representation of an instruction, to be used mostly in UI. Contains all relevant variable information.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    abstract void
    build(arc.scene.ui.layout.Table table)
     
    build(LAssembler builder)
     
     
    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
     
    protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>
    field(arc.scene.ui.layout.Table table, String value, arc.func.Cons<String> setter)
     
    protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>
    fields(arc.scene.ui.layout.Table table, String value, arc.func.Cons<String> setter)
     
    protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField>
    fields(arc.scene.ui.layout.Table table, String desc, String value, arc.func.Cons<String> setter)
     
    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.
    boolean
     
     
    boolean
    If true, this statement is considered useless with privileged processors and is not allowed in them.
    protected void
    param(arc.scene.ui.layout.Cell<arc.scene.ui.Label> label)
     
    boolean
    Privileged instructions are only allowed in world processors.
    protected void
    row(arc.scene.ui.layout.Table table)
     
    protected String
     
    void
     
    void
     
    protected <T> void
    showSelect(arc.scene.ui.Button b, T[] values, T current, arc.func.Cons<T> getter)
     
    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)
     
    protected void
    showSelectTable(arc.scene.ui.Button b, arc.func.Cons2<arc.scene.ui.layout.Table,Runnable> hideCons)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LStatement

      public LStatement()
  • Method Details

    • build

      public abstract void build(arc.scene.ui.layout.Table table)
    • build

      public abstract LExecutor.LInstruction build(LAssembler builder)
    • category

      public LCategory category()
    • copy

      public LStatement copy()
    • hidden

      public boolean hidden()
    • 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

      protected String sanitize(String value)
    • field

      protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField> field(arc.scene.ui.layout.Table table, String value, arc.func.Cons<String> setter)
    • fields

      protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField> fields(arc.scene.ui.layout.Table table, String desc, String value, arc.func.Cons<String> setter)
    • 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

      protected arc.scene.ui.layout.Cell<arc.scene.ui.TextField> fields(arc.scene.ui.layout.Table table, String value, arc.func.Cons<String> setter)
    • 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)
    • showSelectTable

      protected void showSelectTable(arc.scene.ui.Button b, arc.func.Cons2<arc.scene.ui.layout.Table,Runnable> hideCons)
    • afterRead

      public void afterRead()
    • write

      public void write(StringBuilder builder)
    • setupUI

      public void setupUI()
    • saveUI

      public void saveUI()
    • name

      public String name()