This commit is contained in:
Anuken
2022-03-06 16:22:37 -05:00
parent d3a919b5f4
commit 46489f9893
3 changed files with 11 additions and 6 deletions

View File

@@ -39,7 +39,8 @@ public class Pathfinder implements Runnable{
public static final Seq<PathCost> costTypes = Seq.with(
//ground
(team, tile) -> (PathTile.allDeep(tile) || (PathTile.team(tile) == team || PathTile.team(tile) == 0) && PathTile.solid(tile)) ? impassable : 1 +
(team, tile) ->
(PathTile.allDeep(tile) || (PathTile.team(tile) == team || PathTile.team(tile) == 0) && PathTile.solid(tile)) ? impassable : 1 +
PathTile.health(tile) * 5 +
(PathTile.nearSolid(tile) ? 2 : 0) +
(PathTile.nearLiquid(tile) ? 6 : 0) +
@@ -47,12 +48,14 @@ public class Pathfinder implements Runnable{
(PathTile.damages(tile) ? 30 : 0),
//legs
(team, tile) -> PathTile.legSolid(tile) ? impassable : 1 +
(team, tile) ->
PathTile.legSolid(tile) ? impassable : 1 +
(PathTile.deep(tile) ? 6000 : 0) + //leg units can now drown
(PathTile.solid(tile) ? 5 : 0),
//water
(team, tile) -> (PathTile.solid(tile) || !PathTile.liquid(tile) ? 6000 : 1) +
(team, tile) ->
(PathTile.solid(tile) || !PathTile.liquid(tile) ? 6000 : 1) +
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
(PathTile.deep(tile) ? 0 : 1) +
(PathTile.damages(tile) ? 35 : 0)

View File

@@ -27,7 +27,6 @@ public class LoadDialog extends BaseDialog{
Gamemode filteredMode;
TextField searchField;
ScrollPane pane;
BaseDialog dialog;
public LoadDialog(){
this("@loadgame");
@@ -37,7 +36,10 @@ public class LoadDialog extends BaseDialog{
super(title);
setup();
shown(this::setup);
shown(() -> {
searchString = "";
setup();
});
onResize(this::setup);
addCloseButton();

View File

@@ -33,7 +33,7 @@ public class ReloadTurret extends BaseTurret{
}
protected void updateCooling(){
if(reloadCounter < reload && coolant != null && coolant.efficiency(this) > 0){
if(reloadCounter < reload && coolant != null && coolant.efficiency(this) > 0 && efficiency > 0){
float capacity = coolant instanceof ConsumeLiquidFilter filter ? filter.getConsumed(this).heatCapacity : 1f;
coolant.update(this);
reloadCounter += coolant.amount * edelta() * capacity * coolantMultiplier;