More decimals for RTG stats / Pathfinder crash fix in editor
This commit is contained in:
@@ -145,10 +145,16 @@ public class Pathfinder implements Runnable{
|
|||||||
|
|
||||||
Events.on(ResetEvent.class, event -> stop());
|
Events.on(ResetEvent.class, event -> stop());
|
||||||
|
|
||||||
Events.on(TileChangeEvent.class, event -> updateTile(event.tile));
|
Events.on(TileChangeEvent.class, event -> {
|
||||||
|
if(state.isEditor()) return;
|
||||||
|
|
||||||
|
updateTile(event.tile);
|
||||||
|
});
|
||||||
|
|
||||||
//remove nearSolid flag for tiles
|
//remove nearSolid flag for tiles
|
||||||
Events.on(TilePreChangeEvent.class, event -> {
|
Events.on(TilePreChangeEvent.class, event -> {
|
||||||
|
if(state.isEditor()) return;
|
||||||
|
|
||||||
Tile tile = event.tile;
|
Tile tile = event.tile;
|
||||||
|
|
||||||
if(tile.solid()){
|
if(tile.solid()){
|
||||||
@@ -228,7 +234,7 @@ public class Pathfinder implements Runnable{
|
|||||||
if(other.legSolid()) nearLegSolid = true;
|
if(other.legSolid()) nearLegSolid = true;
|
||||||
|
|
||||||
//other tile is now near solid
|
//other tile is now near solid
|
||||||
if(solid && !tile.block().teamPassable){
|
if(solid && !tile.block().teamPassable && other.array() < tiles.length){
|
||||||
tiles[other.array()] |= PathTile.bitMaskNearSolid;
|
tiles[other.array()] |= PathTile.bitMaskNearSolid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ public class StatValues{
|
|||||||
|
|
||||||
c.table(Styles.grayPanel, b -> {
|
c.table(Styles.grayPanel, b -> {
|
||||||
b.image(item.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
|
b.image(item.uiIcon).size(40).pad(10f).left().scaling(Scaling.fit);
|
||||||
b.add(item.localizedName + (timePeriod > 0 ? "\n[lightgray]" + (time < 0.01f ? Strings.fixed(time, 3) : Strings.autoFixed(time, 2)) + StatUnit.perSecond.localized() : "")).left().grow();
|
b.add(item.localizedName + (timePeriod > 0 ? "\n[lightgray]" + (time < 0.01f ? Strings.fixed(time, 4) : Strings.autoFixed(time, 2)) + StatUnit.perSecond.localized() : "")).left().grow();
|
||||||
b.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(item) * 100f))).right().pad(10f).padRight(15f);
|
b.add(Core.bundle.format("stat.efficiency", fixValue(efficiency.get(item) * 100f))).right().pad(10f).padRight(15f);
|
||||||
}).growX().pad(5).row();
|
}).growX().pad(5).row();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user