Unit unbind control

This commit is contained in:
Anuken
2022-01-24 23:26:34 -05:00
parent 08b8f9421d
commit 9391c14ad4
3 changed files with 8 additions and 2 deletions
+4
View File
@@ -383,6 +383,10 @@ public class LExecutor{
unit.clearBuilding();
}
}
case unbind -> {
//TODO is this a good idea? will allocate
unit.resetController();
}
case within -> {
exec.setnum(p4, unit.within(x1, y1, d1) ? 1 : 0);
}
+3 -2
View File
@@ -6,7 +6,7 @@ public enum LUnitControl{
move("x", "y"),
approach("x", "y", "radius"),
boost("enable"),
pathfind(),
pathfind,
target("x", "y", "shoot"),
targetp("unit", "shoot"),
itemDrop("to", "amount"),
@@ -18,7 +18,8 @@ public enum LUnitControl{
flag("value"),
build("x", "y", "block", "rotation", "config"),
getBlock("x", "y", "type", "building"),
within("x", "y", "radius", "result");
within("x", "y", "radius", "result"),
unbind;
public final String[] params;
public static final LUnitControl[] all = values();