Bugfixes
This commit is contained in:
@@ -496,24 +496,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
|
||||
protected void changeEntity(Team team, Prov<Building> entityprov, int rotation){
|
||||
if(build != null){
|
||||
int size = build.block.size;
|
||||
build.remove();
|
||||
build = null;
|
||||
|
||||
//update edge entities
|
||||
tileSet.clear();
|
||||
|
||||
for(Point2 edge : Edges.getEdges(size)){
|
||||
Building other = world.build(x + edge.x, y + edge.y);
|
||||
if(other != null){
|
||||
tileSet.add(other);
|
||||
}
|
||||
}
|
||||
|
||||
//update proximity, since multiblock was just removed
|
||||
for(Building t : tileSet){
|
||||
t.updateProximity();
|
||||
}
|
||||
}
|
||||
|
||||
if(block.hasBuilding()){
|
||||
|
||||
@@ -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