mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 20:44:05 +09:00
fluids to their own block layer
This commit is contained in:
@@ -5,6 +5,7 @@ import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.App.printdbg
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.gameworld.BlockLayerI16
|
||||
import net.torvald.terrarum.gameworld.BlockLayerI16F16
|
||||
import net.torvald.terrarum.gameworld.BlockLayerI16I8
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
@@ -147,6 +148,7 @@ object LoadSavegame {
|
||||
world.layerTerrain = BlockLayerI16(world.width, world.height)
|
||||
world.layerWall = BlockLayerI16(world.width, world.height)
|
||||
world.layerOres = BlockLayerI16I8(world.width, world.height)
|
||||
world.layerFluids = BlockLayerI16F16(world.width, world.height)
|
||||
|
||||
newIngame.world = world // must be set before the loadscreen, otherwise the loadscreen will try to read from the NullWorld which is already destroyed
|
||||
newIngame.worldDisk = VDUtil.readDiskArchive(worldDisk.diskFile, Level.INFO)
|
||||
|
||||
@@ -84,6 +84,12 @@ class Terragen(world: GameWorld, seed: Long, params: Any) : Gen(world, seed, par
|
||||
|
||||
world.setTileTerrain(x, y, terrBlock, true)
|
||||
world.setTileWall(x, y, wallBlock, true)
|
||||
|
||||
|
||||
// TODO TEST CODE
|
||||
if (terrBlock == Block.DIRT) {
|
||||
world.setTileOre(x, y, "ores@basegame:1", 0)
|
||||
}
|
||||
}
|
||||
|
||||
// dither shits
|
||||
@@ -111,12 +117,6 @@ class Terragen(world: GameWorld, seed: Long, params: Any) : Gen(world, seed, par
|
||||
world.setTileTerrain(x, y, newTile, true)
|
||||
|
||||
world.setTileWall(x, y, newTile, true)
|
||||
|
||||
|
||||
// TODO TEST CODE
|
||||
if (newTile == Block.DIRT) {
|
||||
world.setTileOre(x, y, "ores@basegame:1", 0)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user