Bugfixes
This commit is contained in:
@@ -351,8 +351,9 @@ public abstract class Turret extends Block{
|
||||
|
||||
AmmoEntry entry = ammo.peek();
|
||||
entry.amount -= ammoPerShot;
|
||||
if(entry.amount == 0) ammo.pop();
|
||||
if(entry.amount <= 0) ammo.pop();
|
||||
totalAmmo -= ammoPerShot;
|
||||
totalAmmo = Math.max(totalAmmo, 0);
|
||||
Time.run(reloadTime / 2f, this::ejectEffects);
|
||||
return entry.type();
|
||||
}
|
||||
@@ -364,7 +365,7 @@ public abstract class Turret extends Block{
|
||||
|
||||
/** @return whether the turret has ammo. */
|
||||
public boolean hasAmmo(){
|
||||
return ammo.size > 0 && ammo.peek().amount >= ammoPerShot;
|
||||
return ammo.size > 0 && ammo.peek().amount >= 1;
|
||||
}
|
||||
|
||||
protected void updateShooting(){
|
||||
|
||||
Reference in New Issue
Block a user