Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2023-01-13 19:34:52 -05:00
3 changed files with 13 additions and 2 deletions
@@ -88,7 +88,7 @@ public class ItemTurret extends Turret{
super.onProximityAdded(); super.onProximityAdded();
//add first ammo item to cheaty blocks so they can shoot properly //add first ammo item to cheaty blocks so they can shoot properly
if(cheating() && ammo.size > 0){ if(cheating() && ammoTypes.size > 0){
handleItem(this, ammoTypes.entries().next().key); handleItem(this, ammoTypes.entries().next().key);
} }
} }
@@ -59,6 +59,16 @@ public class LiquidTurret extends Turret{
} }
public class LiquidTurretBuild extends TurretBuild{ public class LiquidTurretBuild extends TurretBuild{
@Override
public void onProximityAdded(){
super.onProximityAdded();
//add first ammo liquid to cheaty blocks so they can shoot properly
if(cheating() && ammoTypes.size > 0){
handleLiquid(this, ammoTypes.entries().next().key, 1f);
}
}
@Override @Override
public boolean shouldActiveSound(){ public boolean shouldActiveSound(){
@@ -500,7 +500,8 @@ public class Turret extends ReloadTurret{
if(ammo.size >= 2 && ammo.peek().amount < ammoPerShot && ammo.get(ammo.size - 2).amount >= ammoPerShot){ if(ammo.size >= 2 && ammo.peek().amount < ammoPerShot && ammo.get(ammo.size - 2).amount >= ammoPerShot){
ammo.swap(ammo.size - 1, ammo.size - 2); ammo.swap(ammo.size - 1, ammo.size - 2);
} }
return ammo.size > 0 && ammo.peek().amount >= ammoPerShot;
return ammo.size > 0 && ammo.peek().amount >= ammoPerShot || cheating();
} }
public boolean charging(){ public boolean charging(){