Floor experiment progress
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 994 B |
BIN
core/assets-raw/sprites/blocks/environment/plating.png
Normal file
BIN
core/assets-raw/sprites/blocks/environment/plating.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -601,3 +601,4 @@
|
||||
63081=basalt-vent|block-basalt-vent-ui
|
||||
63080=tile-logic-display|block-tile-logic-display-ui
|
||||
63079=crux-floor-1|block-crux-floor-1-ui
|
||||
63078=crux-floor-2|block-crux-floor-2-ui
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Blocks{
|
||||
shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder, yellowStoneBoulder,
|
||||
arkyicBoulder, crystalCluster, vibrantCrystalCluster, crystalBlocks, crystalOrbs, crystallineBoulder, redIceBoulder, rhyoliteBoulder, redStoneBoulder,
|
||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
|
||||
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal, cruxFloor1,
|
||||
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal, cruxFloor1, cruxFloor2,
|
||||
pebbles, tendrils,
|
||||
|
||||
//ores
|
||||
@@ -315,6 +315,7 @@ public class Blocks{
|
||||
solid = true;
|
||||
variants = 0;
|
||||
canShadow = false;
|
||||
drawEdgeOut = false;
|
||||
}};
|
||||
|
||||
empty = new EmptyFloor("empty");
|
||||
@@ -810,10 +811,19 @@ public class Blocks{
|
||||
darkMetal = new StaticWall("dark-metal");
|
||||
|
||||
cruxFloor1 = new Floor("crux-floor-1"){{
|
||||
autotile = true;
|
||||
emitLight = true;
|
||||
drawEdgeOut = false;
|
||||
drawEdgeIn = false;
|
||||
}};
|
||||
|
||||
cruxFloor2 = new Floor("crux-floor-2"){{
|
||||
autotile = true;
|
||||
emitLight = true;
|
||||
lightRadius = 30f;
|
||||
lightColor = Team.crux.color.cpy().a(0.3f);
|
||||
drawEdgeOut = false;
|
||||
drawEdgeIn = false;
|
||||
}};
|
||||
|
||||
Seq.with(metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6)
|
||||
|
||||
@@ -80,6 +80,10 @@ public class Floor extends Block{
|
||||
public int tilingVariants = 0;
|
||||
/** If true, this floor uses autotiling; variants are not supported. See https://github.com/GglLfr/tile-gen*/
|
||||
public boolean autotile = false;
|
||||
/** If true (default), this floor will draw edges of other floors on itself. */
|
||||
public boolean drawEdgeIn = true;
|
||||
/** If true (default), this floor will draw its edges onto other floors. */
|
||||
public boolean drawEdgeOut = true;
|
||||
|
||||
protected TextureRegion[][][] tilingRegions;
|
||||
protected TextureRegion[] autotileRegions;
|
||||
@@ -236,7 +240,9 @@ public class Floor extends Block{
|
||||
}
|
||||
|
||||
Draw.alpha(1f);
|
||||
drawEdges(tile);
|
||||
if(drawEdgeIn){
|
||||
drawEdges(tile);
|
||||
}
|
||||
drawOverlay(tile);
|
||||
}
|
||||
|
||||
@@ -295,7 +301,7 @@ public class Floor extends Block{
|
||||
Point2 point = Geometry.d8[i];
|
||||
Tile other = tile.nearby(point);
|
||||
//special case: empty is, well, empty, so never draw emptiness on top, as that would just be an incorrect black texture
|
||||
if(other != null && other.floor().cacheLayer == layer && other.floor().edges(tile.x, tile.y) != null && other.floor() != Blocks.empty){
|
||||
if(other != null && other.floor().drawEdgeOut && other.floor().cacheLayer == layer && other.floor().edges(tile.x, tile.y) != null){
|
||||
if(!blended.getAndSet(other.floor().id)){
|
||||
blenders.add(other.floor());
|
||||
dirs[i] = other.floorID();
|
||||
@@ -316,7 +322,7 @@ public class Floor extends Block{
|
||||
Point2 point = Geometry.d8[i];
|
||||
Tile other = tile.nearby(point);
|
||||
|
||||
if(other != null && doEdge(tile, other, other.floor()) && other.floor().cacheLayer == realCache && other.floor().edges(tile.x, tile.y) != null && other.floor() != Blocks.empty){
|
||||
if(other != null && other.floor().drawEdgeOut && doEdge(tile, other, other.floor()) && other.floor().cacheLayer == realCache && other.floor().edges(tile.x, tile.y) != null){
|
||||
if(!blended.getAndSet(other.floor().id)){
|
||||
blenders.add(other.floor());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user