From 9afcc6fd32b5c3af189353c318aec6fce867eec2 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 1 Nov 2022 01:19:56 -0400 Subject: [PATCH] Minor bugfixes --- core/src/mindustry/content/UnitTypes.java | 1 + core/src/mindustry/type/UnitType.java | 4 +++- .../mindustry/world/blocks/units/UnitCargoUnloadPoint.java | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 3af6553456..9ba51c2c6a 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -3389,6 +3389,7 @@ public class UnitTypes{ groundLayer = Layer.legUnit; targetAir = false; + alwaysShootWhenMoving = true; weapons.add(new Weapon("collaris-weapon"){{ shootSound = Sounds.pulseBlast; diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 417360e0a9..85e0f3f4ef 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -214,6 +214,8 @@ public class UnitType extends UnlockableContent{ naval = false, /** if false, RTS AI controlled units do not automatically attack things while moving. This is automatically assigned. */ autoFindTarget = true, + /** if true, this unit will always shoot while moving regardless of slowdown */ + alwaysShootWhenMoving = false, /** whether this unit has a hover tooltip */ hoverable = true, @@ -693,7 +695,7 @@ public class UnitType extends UnlockableContent{ } //if a status effects slows a unit when firing, don't shoot while moving. - autoFindTarget = !weapons.contains(w -> w.shootStatus.speedMultiplier < 0.99f); + autoFindTarget = !weapons.contains(w -> w.shootStatus.speedMultiplier < 0.99f) || alwaysShootWhenMoving; clipSize = Math.max(clipSize, lightRadius * 1.1f); singleTarget = weapons.size <= 1 && !forceMultiTarget; diff --git a/core/src/mindustry/world/blocks/units/UnitCargoUnloadPoint.java b/core/src/mindustry/world/blocks/units/UnitCargoUnloadPoint.java index d7a2e02c0d..62d12a7db5 100644 --- a/core/src/mindustry/world/blocks/units/UnitCargoUnloadPoint.java +++ b/core/src/mindustry/world/blocks/units/UnitCargoUnloadPoint.java @@ -34,6 +34,11 @@ public class UnitCargoUnloadPoint extends Block{ configClear((UnitCargoUnloadPointBuild build) -> build.item = null); } + @Override + public boolean outputsItems(){ + return false; + } + public class UnitCargoUnloadPointBuild extends Building{ public Item item; public float staleTimer;