Cleanup
This commit is contained in:
@@ -231,14 +231,7 @@ public class Floor extends Block{
|
||||
}
|
||||
|
||||
protected boolean doEdge(Floor other, boolean sameLayer){
|
||||
//TODO this is awful and should not exist.
|
||||
boolean normal = ((other instanceof ShallowLiquid) == (this instanceof ShallowLiquid)) || (cacheLayer == other.cacheLayer);
|
||||
return (((other.blendGroup.id > blendGroup.id) || edges() == null) &&
|
||||
other.edgeOnto(this) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer)) == normal;
|
||||
}
|
||||
|
||||
protected boolean edgeOnto(Floor other){
|
||||
return true;
|
||||
return (((other.blendGroup.id > blendGroup.id) || edges() == null) && (other.cacheLayer.ordinal() > this.cacheLayer.ordinal() || !sameLayer));
|
||||
}
|
||||
|
||||
TextureRegion edge(Floor block, int x, int y){
|
||||
|
||||
@@ -4,12 +4,14 @@ import mindustry.world.*;
|
||||
|
||||
//do not use in mods!
|
||||
public class ShallowLiquid extends Floor{
|
||||
public final Floor liquidBase, floorBase;
|
||||
public Floor liquidBase, floorBase;
|
||||
public float liquidOpacity = 0.35f;
|
||||
|
||||
public ShallowLiquid(String name, Block liquid, Block floor){
|
||||
public ShallowLiquid(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
public void set(Block liquid, Block floor){
|
||||
this.liquidBase = liquid.asFloor();
|
||||
this.floorBase = floor.asFloor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user