replacing water/lava tiles with one fluid marker

actual fluid not implemented
This commit is contained in:
Minjae Song
2018-12-12 20:32:13 +09:00
parent 6e4cea28e7
commit 95245c8945
9 changed files with 56 additions and 57 deletions

View File

@@ -2,6 +2,7 @@
package net.torvald.terrarum.gameworld
import com.badlogic.gdx.graphics.Color
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.realestate.LandUtil
import net.torvald.terrarum.blockproperties.BlockCodex
import net.torvald.terrarum.serialise.ReadLayerDataLzma
@@ -336,6 +337,13 @@ open class GameWorld {
fun getWallDamage(x: Int, y: Int): Float =
wallDamages[LandUtil.getBlockAddr(this, x, y)] ?: 0f
fun setFluid(x: Int, y: Int, fluidType: Int, fill: Float) {
val addr = LandUtil.getBlockAddr(this, x, y)
fluidTypes[addr] = fluidType
fluidFills[addr] = fill
setTileTerrain(x, y, Block.FLUID_MARKER)
}
fun getTemperature(worldTileX: Int, worldTileY: Int): Float? {
return null