diff --git a/core/src/mindustry/ai/types/LogicAI.java b/core/src/mindustry/ai/types/LogicAI.java index a0eb6d1fa9..b20bc87db6 100644 --- a/core/src/mindustry/ai/types/LogicAI.java +++ b/core/src/mindustry/ai/types/LogicAI.java @@ -131,6 +131,11 @@ public class LogicAI extends AIController{ unit.approach(vec); } + @Override + protected boolean checkTarget(Teamc target, float x, float y, float range){ + return false; + } + //always retarget @Override protected boolean retarget(){ diff --git a/core/src/mindustry/entities/bullet/BulletType.java b/core/src/mindustry/entities/bullet/BulletType.java index 73e0fb93ba..53aad2f052 100644 --- a/core/src/mindustry/entities/bullet/BulletType.java +++ b/core/src/mindustry/entities/bullet/BulletType.java @@ -334,6 +334,7 @@ public abstract class BulletType extends Content{ bullet.type = this; bullet.owner = owner; bullet.team = team; + bullet.time = 0f; bullet.vel.trns(angle, speed * velocityScl); if(backMove){ bullet.set(x - bullet.vel.x * Time.delta, y - bullet.vel.y * Time.delta); diff --git a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java index 236ede8887..3d89e4d272 100644 --- a/core/src/mindustry/entities/bullet/ShrapnelBulletType.java +++ b/core/src/mindustry/entities/bullet/ShrapnelBulletType.java @@ -33,6 +33,8 @@ public class ShrapnelBulletType extends BulletType{ @Override public void init(Bullet b){ + super.init(b); + Damage.collideLaser(b, length, hitLarge); } diff --git a/core/src/mindustry/entities/comp/PayloadComp.java b/core/src/mindustry/entities/comp/PayloadComp.java index 8db8656d88..9afd26bb9a 100644 --- a/core/src/mindustry/entities/comp/PayloadComp.java +++ b/core/src/mindustry/entities/comp/PayloadComp.java @@ -158,7 +158,7 @@ abstract class PayloadComp implements Posc, Rotc, Hitboxc, Unitc{ pad = (width - (itemSize) * items) / items; } - for (Payload p : payloads){ + for(Payload p : payloads){ table.image(p.icon(Cicon.small)).size(itemSize).padRight(pad); } } diff --git a/core/src/mindustry/entities/units/AIController.java b/core/src/mindustry/entities/units/AIController.java index 0eb12d7a6a..b42c5efdb7 100644 --- a/core/src/mindustry/entities/units/AIController.java +++ b/core/src/mindustry/entities/units/AIController.java @@ -123,7 +123,7 @@ public class AIController implements UnitController{ targets[i] = findTarget(mountX, mountY, weapon.bullet.range(), weapon.bullet.collidesAir, weapon.bullet.collidesGround); } - if(Units.invalidateTarget(targets[i], unit.team, mountX, mountY, weapon.bullet.range())){ + if(checkTarget(targets[i], mountX, mountY, weapon.bullet.range())){ targets[i] = null; } } @@ -149,6 +149,10 @@ public class AIController implements UnitController{ } } + protected boolean checkTarget(Teamc target, float x, float y, float range){ + return Units.invalidateTarget(target, unit.team, x, y, range); + } + protected boolean shouldShoot(){ return true; } diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index e41050118f..19a06c3196 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -182,11 +182,11 @@ public class UnitType extends UnlockableContent{ var count = new float[]{-1}; bars.table().update(t -> { - if(count[0] != payload.payloadUsed()) { + if(count[0] != payload.payloadUsed()){ payload.contentInfo(t, 8 * 2, 270); count[0] = payload.payloadUsed(); } - }).growX().left(); + }).growX().left().height(0f).pad(0f); } }).growX(); diff --git a/core/src/mindustry/world/blocks/units/CommandCenter.java b/core/src/mindustry/world/blocks/units/CommandCenter.java index a564f4dc07..19a721832b 100644 --- a/core/src/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/mindustry/world/blocks/units/CommandCenter.java @@ -31,6 +31,7 @@ public class CommandCenter extends Block{ destructible = true; solid = true; configurable = true; + drawDisabled = false; config(UnitCommand.class, (CommandBuild build, UnitCommand command) -> { build.team.data().command = command; diff --git a/gradle.properties b/gradle.properties index ad549888ac..9b15d50c4d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=b2f3d212c1a88a62f140f5cb04f4c86e61332d1c +archash=c55aa1fe790c50db389225d9a2287b57f71260ff