This commit is contained in:
Anuken
2021-08-14 09:21:02 -04:00
parent c2fcffb0d8
commit 16fb70b0ef
2 changed files with 4 additions and 2 deletions

View File

@@ -462,7 +462,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
player.unit().updateBuilding(isBuilding); player.unit().updateBuilding(isBuilding);
} }
if(player.shooting && !wasShooting && player.unit().hasWeapons() && state.rules.unitAmmo && player.unit().ammo <= 0){ if(player.shooting && !wasShooting && player.unit().hasWeapons() && state.rules.unitAmmo && !player.team().rules().infiniteAmmo && player.unit().ammo <= 0){
player.unit().type.weapons.first().noAmmoSound.at(player.unit()); player.unit().type.weapons.first().noAmmoSound.at(player.unit());
} }

View File

@@ -63,7 +63,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
public boolean showed = false, sectorsShown; public boolean showed = false, sectorsShown;
public String searchText = ""; public String searchText = "";
public Table sectorTop = new Table(), notifs; public Table sectorTop = new Table(), notifs = new Table();
public Label hoverLabel = new Label(""); public Label hoverLabel = new Label("");
public PlanetDialog(){ public PlanetDialog(){
@@ -559,6 +559,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
} }
void rebuildList(){ void rebuildList(){
if(notifs == null) return;
notifs.clear(); notifs.clear();
var all = planets.planet.sectors.select(Sector::hasBase); var all = planets.planet.sectors.select(Sector::hasBase);