Minor bugfixes

This commit is contained in:
Anuken
2022-11-01 01:19:56 -04:00
parent d9624d274f
commit 9afcc6fd32
3 changed files with 9 additions and 1 deletions

View File

@@ -3389,6 +3389,7 @@ public class UnitTypes{
groundLayer = Layer.legUnit;
targetAir = false;
alwaysShootWhenMoving = true;
weapons.add(new Weapon("collaris-weapon"){{
shootSound = Sounds.pulseBlast;

View File

@@ -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;

View File

@@ -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;