mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
parent
befda9baaa
commit
afbde49fa2
@ -13,7 +13,7 @@ public class FlyingAI extends AIController{
|
||||
public void updateMovement(){
|
||||
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
|
||||
if(!unit.type.circleTarget){
|
||||
moveTo(target, unit.range() * 0.8f);
|
||||
moveTo(target, unit.type.range * 0.8f);
|
||||
unit.lookAt(target);
|
||||
}else{
|
||||
attack(120f);
|
||||
|
@ -1339,6 +1339,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
case enabled -> enabled ? 1 : 0;
|
||||
case controlled -> this instanceof ControlBlock c && c.isControlled() ? 2 : 0;
|
||||
case payloadCount -> getPayload() != null ? 1 : 0;
|
||||
case size -> block.size;
|
||||
default -> Float.NaN; //gets converted to null in logic
|
||||
};
|
||||
}
|
||||
|
@ -142,6 +142,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
case controlled -> controller instanceof LogicAI ? 1 : controller instanceof Player ? 2 : controller instanceof FormationAI ? 3 : 0;
|
||||
case commanded -> controller instanceof FormationAI ? 1 : 0;
|
||||
case payloadCount -> self() instanceof Payloadc pay ? pay.payloads().size : 0;
|
||||
case size -> hitSize / tilesize;
|
||||
default -> Float.NaN;
|
||||
};
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ public enum LAccess{
|
||||
y,
|
||||
shootX,
|
||||
shootY,
|
||||
size,
|
||||
dead,
|
||||
range,
|
||||
shooting,
|
||||
|
@ -172,9 +172,11 @@ public class ItemBridge extends Block{
|
||||
public void playerPlaced(Object config){
|
||||
super.playerPlaced(config);
|
||||
|
||||
Tile link = findLink(tile.x, tile.y);
|
||||
if(linkValid(tile, link) && !proximity.contains(link.build)){
|
||||
link.build.configure(tile.pos());
|
||||
if(config == null){
|
||||
Tile link = findLink(tile.x, tile.y);
|
||||
if(linkValid(tile, link) && !proximity.contains(link.build)){
|
||||
link.build.configure(tile.pos());
|
||||
}
|
||||
}
|
||||
|
||||
lastBuild = this;
|
||||
|
Loading…
Reference in New Issue
Block a user