Final bugfixes

This commit is contained in:
Anuken
2020-12-01 08:39:16 -05:00
parent c0c5257ed8
commit ee28f4564b
3 changed files with 8 additions and 2 deletions

View File

@@ -1768,6 +1768,8 @@ public class Blocks implements ContentList{
}}
);
maxAmmo = 40;
ammoPerShot = 4;
rotateSpeed = 2.5f;
reloadTime = 200f;
ammoUseEffect = Fx.casing3Double;

View File

@@ -722,7 +722,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
stable.row();
if(sector.save != null){
if(sector.hasBase()){
stable.button("@stats", Icon.info, Styles.transt, () -> showStats(sector)).height(40f).fillX().row();
}

View File

@@ -345,7 +345,11 @@ public class Turret extends ReloadTurret{
/** @return whether the turret has ammo. */
public boolean hasAmmo(){
return ammo.size > 0 && ammo.peek().amount >= 1;
//skip first entry if it has less than the required amount of ammo
if(ammo.size >= 2 && ammo.peek().amount < ammoPerShot){
ammo.pop();
}
return ammo.size > 0 && ammo.peek().amount >= ammoPerShot;
}
protected void updateShooting(){