mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 20:14:05 +09:00
replacing water/lava tiles with one fluid marker
actual fluid not implemented
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user