add mining/mineX/mineY sensors

This commit is contained in:
DeltaNedas
2020-11-14 18:09:46 +00:00
parent 7559996227
commit b66294b50a
2 changed files with 6 additions and 0 deletions
@@ -123,6 +123,9 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
case shooting -> isShooting() ? 1 : 0; case shooting -> isShooting() ? 1 : 0;
case shootX -> World.conv(aimX()); case shootX -> World.conv(aimX());
case shootY -> World.conv(aimY()); case shootY -> World.conv(aimY());
case mining -> mining() ? 1 : 0;
case mineX -> mining() ? mineTile.x : -1;
case mineY -> mining() ? mineTile.y : -1;
case flag -> flag; case flag -> flag;
case controlled -> controller instanceof LogicAI || controller instanceof Player ? 1 : 0; case controlled -> controller instanceof LogicAI || controller instanceof Player ? 1 : 0;
case payloadCount -> self() instanceof Payloadc pay ? pay.payloads().size : 0; case payloadCount -> self() instanceof Payloadc pay ? pay.payloads().size : 0;
+3
View File
@@ -27,6 +27,9 @@ public enum LAccess{
shootX, shootX,
shootY, shootY,
shooting, shooting,
mineX,
mineY,
mining,
team, team,
type, type,
flag, flag,