Support custom bottom color (#1960)
Should work similarly to flameColor on the GenericSmelter.
This commit is contained in:
@@ -17,6 +17,8 @@ import mindustry.world.blocks.*;
|
|||||||
public class Conduit extends LiquidBlock implements Autotiler{
|
public class Conduit extends LiquidBlock implements Autotiler{
|
||||||
public final int timerFlow = timers++;
|
public final int timerFlow = timers++;
|
||||||
|
|
||||||
|
public Color botColor = Color.valueOf("565656");
|
||||||
|
|
||||||
public TextureRegion[] topRegions = new TextureRegion[7];
|
public TextureRegion[] topRegions = new TextureRegion[7];
|
||||||
public TextureRegion[] botRegions = new TextureRegion[7];
|
public TextureRegion[] botRegions = new TextureRegion[7];
|
||||||
|
|
||||||
@@ -47,7 +49,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
|
|
||||||
if(bits == null) return;
|
if(bits == null) return;
|
||||||
|
|
||||||
Draw.colorl(0.34f);
|
Draw.color(botColor);
|
||||||
Draw.alpha(0.5f);
|
Draw.alpha(0.5f);
|
||||||
Draw.rect(botRegions[bits[0]], req.drawx(), req.drawy(),
|
Draw.rect(botRegions[bits[0]], req.drawx(), req.drawy(),
|
||||||
botRegions[bits[0]].getWidth() * Draw.scl * req.animScale, botRegions[bits[0]].getHeight() * Draw.scl * req.animScale,
|
botRegions[bits[0]].getWidth() * Draw.scl * req.animScale, botRegions[bits[0]].getHeight() * Draw.scl * req.animScale,
|
||||||
@@ -91,7 +93,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
|
|||||||
public void draw(){
|
public void draw(){
|
||||||
int rotation = rotation() * 90;
|
int rotation = rotation() * 90;
|
||||||
|
|
||||||
Draw.colorl(0.34f);
|
Draw.color(botColor);
|
||||||
Draw.rect(botRegions[blendbits], x, y, rotation);
|
Draw.rect(botRegions[blendbits], x, y, rotation);
|
||||||
|
|
||||||
Draw.color(liquids.current().color);
|
Draw.color(liquids.current().color);
|
||||||
|
|||||||
Reference in New Issue
Block a user