Unit unbind control
This commit is contained in:
@@ -1813,6 +1813,7 @@ unitlocate.group = Building group to look for.
|
|||||||
|
|
||||||
lenum.idle = Don't move, but keep building/mining.\nThe default state.
|
lenum.idle = Don't move, but keep building/mining.\nThe default state.
|
||||||
lenum.stop = Stop moving/mining/building.
|
lenum.stop = Stop moving/mining/building.
|
||||||
|
lenum.unbind = Completely disable logic control.\nResume standard AI.
|
||||||
lenum.move = Move to exact position.
|
lenum.move = Move to exact position.
|
||||||
lenum.approach = Approach a position with a radius.
|
lenum.approach = Approach a position with a radius.
|
||||||
lenum.pathfind = Pathfind to the enemy spawn.
|
lenum.pathfind = Pathfind to the enemy spawn.
|
||||||
|
|||||||
@@ -383,6 +383,10 @@ public class LExecutor{
|
|||||||
unit.clearBuilding();
|
unit.clearBuilding();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case unbind -> {
|
||||||
|
//TODO is this a good idea? will allocate
|
||||||
|
unit.resetController();
|
||||||
|
}
|
||||||
case within -> {
|
case within -> {
|
||||||
exec.setnum(p4, unit.within(x1, y1, d1) ? 1 : 0);
|
exec.setnum(p4, unit.within(x1, y1, d1) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ public enum LUnitControl{
|
|||||||
move("x", "y"),
|
move("x", "y"),
|
||||||
approach("x", "y", "radius"),
|
approach("x", "y", "radius"),
|
||||||
boost("enable"),
|
boost("enable"),
|
||||||
pathfind(),
|
pathfind,
|
||||||
target("x", "y", "shoot"),
|
target("x", "y", "shoot"),
|
||||||
targetp("unit", "shoot"),
|
targetp("unit", "shoot"),
|
||||||
itemDrop("to", "amount"),
|
itemDrop("to", "amount"),
|
||||||
@@ -18,7 +18,8 @@ public enum LUnitControl{
|
|||||||
flag("value"),
|
flag("value"),
|
||||||
build("x", "y", "block", "rotation", "config"),
|
build("x", "y", "block", "rotation", "config"),
|
||||||
getBlock("x", "y", "type", "building"),
|
getBlock("x", "y", "type", "building"),
|
||||||
within("x", "y", "radius", "result");
|
within("x", "y", "radius", "result"),
|
||||||
|
unbind;
|
||||||
|
|
||||||
public final String[] params;
|
public final String[] params;
|
||||||
public static final LUnitControl[] all = values();
|
public static final LUnitControl[] all = values();
|
||||||
|
|||||||
Reference in New Issue
Block a user