Slag heater block

This commit is contained in:
Anuken
2021-11-21 14:06:18 -05:00
parent 0014c7a525
commit 64efa599d0
12 changed files with 23 additions and 7 deletions

View File

@@ -15,9 +15,7 @@ public class HeatProducer extends GenericCrafter{
public HeatProducer(String name){
super(name);
drawer = new DrawMulti(new DrawHeatOutput(){{
drawRegion = true;
}});
drawer = new DrawHeatOutput(true);
rotateDraw = false;
rotate = true;
canOverdrive = false;
@@ -35,7 +33,7 @@ public class HeatProducer extends GenericCrafter{
public void setBars(){
super.setBars();
bars.add("heat", (HeatProducerBuild entity) -> new Bar("bar.heat", Pal.lightOrange, () -> entity.heat));
bars.add("heat", (HeatProducerBuild entity) -> new Bar("bar.heat", Pal.lightOrange, () -> entity.heat / heatOutput));
}
public class HeatProducerBuild extends GenericCrafterBuild implements HeatBlock{

View File

@@ -18,6 +18,13 @@ public class DrawHeatOutput extends DrawBlock{
public float heatPulse = 0.3f, heatPulseScl = 10f, glowMult = 1.2f;
public boolean drawRegion = false;
public DrawHeatOutput(){
}
public DrawHeatOutput(boolean drawRegion){
this.drawRegion = drawRegion;
}
@Override
public void drawBase(Building build){
if(drawRegion) Draw.rect(build.block.region, build.x, build.y);