Display liquid tooltips

This commit is contained in:
Anuken 2022-01-19 10:50:28 -05:00
parent 7240da5016
commit cef3d383b7
6 changed files with 13 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -2705,7 +2705,7 @@ public class UnitTypes{
mineTier = 1;
buildSpeed = 0.8f;
drag = 0.06f;
speed = 2.5f;
speed = 2.9f;
rotateSpeed = 9f;
accel = 0.1f;
itemCapacity = 40;
@ -2763,7 +2763,7 @@ public class UnitTypes{
mineTier = 2;
buildSpeed = 1.4f;
drag = 0.06f;
speed = 2.6f;
speed = 2.8f;
rotateSpeed = 5f;
accel = 0.11f;
itemCapacity = 70;

View File

@ -192,7 +192,6 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
pass((x, y) -> {
if(block != Blocks.air){
//TODO use d4 instead of d8 for no out-of-reach ores?
if(nearAir(x, y)){
if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.52f){
block = Blocks.graphiticWall;

View File

@ -476,7 +476,7 @@ public class PlacementFragment extends Fragment{
}
//if the tile has a drop, display the drop
if(hoverTile.drop() != null || hoverTile.wallDrop() != null){
if(hoverTile.drop() != null || hoverTile.wallDrop() != null || hoverTile.floor().liquidDrop != null){
return hoverTile;
}
}

View File

@ -129,6 +129,16 @@ public class Floor extends Block{
}
}
@Override
public TextureRegion getDisplayIcon(Tile tile){
return liquidDrop == null ? super.getDisplayIcon(tile) : liquidDrop.uiIcon;
}
@Override
public String getDisplayName(Tile tile){
return liquidDrop == null ? super.getDisplayName(tile) : liquidDrop.localizedName;
}
@Override
public void createIcons(MultiPacker packer){
super.createIcons(packer);