Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2019-11-19 19:08:52 -05:00
9 changed files with 61 additions and 24 deletions

View File

@@ -507,7 +507,7 @@ public class Blocks implements ContentList{
int bottomRegion = reg("-bottom"), weaveRegion = reg("-weave");
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name)};
drawIcons = () -> new TextureRegion[]{Core.atlas.find(name + "-bottom"), Core.atlas.find(name), Core.atlas.find(name + "-weave")};
drawer = tile -> {
GenericCrafterEntity entity = tile.entity();

View File

@@ -99,7 +99,7 @@ public class ForceProjector extends Block{
entity.phaseHeat = Mathf.lerpDelta(entity.phaseHeat, Mathf.num(phaseValid), 0.1f);
if(phaseValid && !entity.broken && entity.timer.get(timerUse, phaseUseTime)){
if(phaseValid && !entity.broken && entity.timer.get(timerUse, phaseUseTime) && entity.efficiency() > 0){
entity.cons.trigger();
}

View File

@@ -51,7 +51,7 @@ public class PowerDiode extends Block{
// battery % of the graph on either side, defaults to zero
protected float bar(Tile tile){
return tile.block().hasPower ? tile.entity.power.graph.getBatteryStored() / tile.entity.power.graph.getTotalBatteryCapacity() : 0f;
return (tile != null && tile.block().hasPower) ? tile.entity.power.graph.getBatteryStored() / tile.entity.power.graph.getTotalBatteryCapacity() : 0f;
}
@Override