Internal changes for surface-less floors
This commit is contained in:
@@ -180,7 +180,7 @@ public class ConstructBlock extends Block{
|
||||
public void onDestroyed(){
|
||||
Fx.blockExplosionSmoke.at(tile);
|
||||
|
||||
if(!tile.floor().solid && !tile.floor().isLiquid){
|
||||
if(!tile.floor().solid && tile.floor().hasSurface()){
|
||||
Effect.rubble(x, y, size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +166,11 @@ public class Floor extends Block{
|
||||
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
|
||||
}
|
||||
|
||||
/** @return whether this floor has a valid surface on which to place things, e.g. scorch marks. */
|
||||
public boolean hasSurface(){
|
||||
return !isLiquid && !solid;
|
||||
}
|
||||
|
||||
public boolean isDeep(){
|
||||
return drownTime > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user