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

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 Details

    • nameToAlign

      public static final arc.struct.ObjectMap<String,Integer> nameToAlign
    • alignToName

      public static final arc.struct.IntMap<String> alignToName
    • elem

      @Nullable public transient LCanvas.StatementElem elem
  • 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()
    • useWrapping

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

      public static String sanitize(String value)
      Sanitizes variable input strings from text fields into values that will not break logic parsing.
    • logicLocalization

      protected static boolean logicLocalization()
    • bundle

      public static String bundle(String key)
    • bundle

      protected static String bundle(Enum<?> value)
    • selectTranslate

      protected static String selectTranslate(String text)
    • 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)
    • 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)
    • fields

      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)
    • 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

      protected void fieldAlignSelect(arc.scene.ui.layout.Table t, arc.func.Prov<String> get, arc.func.Cons<String> set, boolean hor, boolean ver)
    • 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

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

      public void afterRead()
    • write

      public void write(StringBuilder builder)
    • setupUI

      public void setupUI()
    • saveUI

      public void saveUI()
    • typeName

      public String typeName()
    • statementKey

      public String statementKey()
    • localizedName

      public String localizedName()
    • name

      public String name()