This commit is contained in:
minjaesong
2024-02-07 01:32:54 +09:00
parent a143887375
commit 866b8fed83
18 changed files with 91 additions and 27 deletions

View File

@@ -121,7 +121,7 @@ open class FancyWorldReadLoadScreen(screenToBeLoaded: IngameInstance, private va
class FancyWorldgenLoadScreen(screenToBeLoaded: IngameInstance, private val worldwidth: Int, private val worldheight: Int) : FancyWorldReadLoadScreen(screenToBeLoaded, worldwidth, worldheight, {}) {
private val chunks = (worldwidth / CHUNK_W) * 8
private val chunks = (worldwidth / CHUNK_W) * 9
override fun getProgress(): Double {
return progress.get().toDouble() / chunks * previewWidth

View File

@@ -34,6 +34,9 @@ internal object ExportMap : ConsoleCommand {
"ores@basegame:6" to Cvec(0xffcc00ff.toInt()),
"ores@basegame:7" to Cvec(0xd5d9f9ff.toInt()),
"ores@basegame:8" to Cvec(0xff9300ff.toInt()),
"ores@basegame:256" to Cvec(0xff00ffff.toInt()),
"ores@basegame:257" to Cvec(0xee77ffff.toInt()),
"ores@basegame:258" to Cvec(0xffffffff.toInt()),
)
private val WALL_OVERLAY = Cvec(0.35f, 0.35f, 0.35f, 1f)

View File

@@ -153,6 +153,23 @@ class OreLead(originalID: ItemID) : OreItemBase(originalID, true) {
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(8,6)
}
class GemQuartz(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_GEM_QUARTZ"
override var smeltingProduct: ItemID? = "item@basegame:149"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(13,6)
}
class GemAmethyst(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_GEM_AMETHYST"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(14,6)
}
class ItemRockSalt(originalID: ItemID) : OreItemBase(originalID, true) {
override var originalName = "ITEM_ROCK_SALT"
override val itemImage: TextureRegion
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(10,6)
}
class ItemCoalCoke(originalID: ItemID) : OreItemBase(originalID) {
override var originalName = "ITEM_COAL_COKE"

View File

@@ -62,6 +62,15 @@ class OregenAutotiling(world: GameWorld, isFinal: Boolean, seed: Long, val tilin
BlocksDrawer.connectLut16[autotiled] or mult.shl(4)
}
"a16x8" -> {
// get placement (tile connection) info
val mult = getHashCoord(x, y, 8)
val autotiled = getNearbyOres8(x, y).foldIndexed(0) { index, acc, placement ->
acc or (placement.item == ore).toInt(index)
}
BlocksDrawer.connectLut16[autotiled] or mult.shl(4)
}
"a16x16" -> {
// get placement (tile connection) info
val mult = getHashCoord(x, y, 16)

View File

@@ -146,7 +146,7 @@ object Worldgen {
val start = (0.00342f * world.height - 3.22f).floorToInt().coerceAtLeast(1)
// this value has to extend up, otherwise the player may spawn into the chopped-off mountaintop
// this value has to extend down into the rock layer, otherwise, if the bottom of the bottom chunk is dirt, they will turn into grasses
return start - 1 to start + 6
return start - 1 to start + 7
}
private val rockScoreMin = 40