This commit is contained in:
Anuken
2020-08-10 16:10:18 -04:00
parent c4e8fef8d0
commit c560de9c53
18 changed files with 13 additions and 3 deletions
+2
View File
@@ -18,6 +18,8 @@ public enum LAccess{
heat,
efficiency,
rotation,
x,
y,
//values with parameters are considered controllable
enabled("to"), //"to" is standard for single parameter access
+2
View File
@@ -16,6 +16,7 @@ import arc.util.*;
import arc.util.ArcAnnotate.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.logic.LStatements.*;
import mindustry.ui.*;
import mindustry.ui.dialogs.*;
@@ -45,6 +46,7 @@ public class LCanvas extends Table{
int i = 0;
for(Prov<LStatement> prov : LogicIO.allStatements){
LStatement example = prov.get();
if(example instanceof InvalidStatement) continue;
t.button(example.name(), Styles.cleart, () -> {
add(prov.get());
dialog.hide();
+2 -3
View File
@@ -266,7 +266,7 @@ public class LStatements{
table.left();
table.add(" set ");
table.add("set ");
table.button(b -> {
b.label(() -> type.name());
@@ -274,8 +274,7 @@ public class LStatements{
type = t;
rebuild(table);
}, 2, cell -> cell.size(100, 50)));
}, Styles.logict, () -> {
}).size(90, 40).color(table.color).left().padLeft(2);
}, Styles.logict, () -> {}).size(90, 40).color(table.color).left().padLeft(2);
table.add(" of ");
+3
View File
@@ -1,5 +1,7 @@
package mindustry.logic;
import arc.math.*;
public enum UnaryOp{
negate("-", a -> -a),
not("not", a -> ~(int)(a)),
@@ -12,6 +14,7 @@ public enum UnaryOp{
floor("floor", Math::floor),
ceil("ceil", Math::ceil),
sqrt("sqrt", Math::sqrt),
rand("rand", d -> Mathf.rand.nextDouble() * d),
;
public static final UnaryOp[] all = values();