mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
gems
This commit is contained in:
@@ -52,7 +52,9 @@ id;classname;tags
|
|||||||
|
|
||||||
|
|
||||||
# gemstones
|
# gemstones
|
||||||
#144; gems
|
144;net.torvald.terrarum.modulebasegame.gameitems.GemQuartz;SMELTABLE,SIO2
|
||||||
|
145;net.torvald.terrarum.modulebasegame.gameitems.GemAmethyst;SMELTABLE,SIO2
|
||||||
|
146;net.torvald.terrarum.modulebasegame.gameitems.ItemRockSalt;
|
||||||
|
|
||||||
# tree seeds by tree species
|
# tree seeds by tree species
|
||||||
160;net.torvald.terrarum.modulebasegame.gameitems.ItemSeedOak;SEEDLING
|
160;net.torvald.terrarum.modulebasegame.gameitems.ItemSeedOak;SEEDLING
|
||||||
|
|||||||
|
Binary file not shown.
@@ -13,6 +13,7 @@
|
|||||||
"ITEM_GEM_TOPAZ": "Raw Topaz",
|
"ITEM_GEM_TOPAZ": "Raw Topaz",
|
||||||
"ITEM_GEM_DIAMOND": "Raw Diamond",
|
"ITEM_GEM_DIAMOND": "Raw Diamond",
|
||||||
"ITEM_GEM_AMETHYST": "Raw Amethyst",
|
"ITEM_GEM_AMETHYST": "Raw Amethyst",
|
||||||
|
"ITEM_GEM_QUARTZ": "Raw Quartz",
|
||||||
"ITEM_HATCHET_COPPER": "Copper Axe",
|
"ITEM_HATCHET_COPPER": "Copper Axe",
|
||||||
"ITEM_HATCHET_IRON": "Iron Axe",
|
"ITEM_HATCHET_IRON": "Iron Axe",
|
||||||
"ITEM_HATCHET_STEEL": "Steel Axe",
|
"ITEM_HATCHET_STEEL": "Steel Axe",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"ITEM_GEM_TOPAZ": "황옥석",
|
"ITEM_GEM_TOPAZ": "황옥석",
|
||||||
"ITEM_GEM_DIAMOND": "금강석",
|
"ITEM_GEM_DIAMOND": "금강석",
|
||||||
"ITEM_GEM_AMETHYST": "자수정석",
|
"ITEM_GEM_AMETHYST": "자수정석",
|
||||||
|
"ITEM_GEM_AMETHYST": "석영석",
|
||||||
"ITEM_HATCHET_COPPER": "구리 도끼",
|
"ITEM_HATCHET_COPPER": "구리 도끼",
|
||||||
"ITEM_HATCHET_IRON": "철 도끼",
|
"ITEM_HATCHET_IRON": "철 도끼",
|
||||||
"ITEM_HATCHET_STEEL": "강철 도끼",
|
"ITEM_HATCHET_STEEL": "강철 도끼",
|
||||||
|
|||||||
BIN
assets/mods/basegame/ores/256.tga
LFS
Normal file
BIN
assets/mods/basegame/ores/256.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/ores/257.tga
LFS
Normal file
BIN
assets/mods/basegame/ores/257.tga
LFS
Normal file
Binary file not shown.
BIN
assets/mods/basegame/ores/258.tga
LFS
Normal file
BIN
assets/mods/basegame/ores/258.tga
LFS
Normal file
Binary file not shown.
@@ -7,14 +7,16 @@
|
|||||||
"6";"item@basegame:133";"GOLD,NATURAL_GOLD"
|
"6";"item@basegame:133";"GOLD,NATURAL_GOLD"
|
||||||
"7";"item@basegame:134";"SILVER,NATURAL_SILVER"
|
"7";"item@basegame:134";"SILVER,NATURAL_SILVER"
|
||||||
"8";"item@basegame:135";"LEAD,GALENA"
|
"8";"item@basegame:135";"LEAD,GALENA"
|
||||||
# "8";"item@basegame:136";"GEM,RUBY"
|
#"9";"item@basegame:143";"TITANIUM,RUTILE"
|
||||||
# "9";"item@basegame:137";"GEM,EMERALD"
|
|
||||||
#"10";"item@basegame:138";"GEM,SAPPHIRE"
|
|
||||||
#"11";"item@basegame:139";"GEM,TOPAZ"
|
|
||||||
#"12";"item@basegame:140";"GEM,DIAMOND"
|
|
||||||
#"13";"item@basegame:141";"GEM,SIO2,AMETHYST"
|
|
||||||
#"14";"item@basegame:142";"GEM,SIO2,QUARTZ"
|
|
||||||
#"16";"item@basegame:143";"TITANIUM,RUTILE"
|
|
||||||
|
|
||||||
#"256";"macro@BASETILE";"GRASS"
|
"256";"item@basegame:146";"SALT"
|
||||||
#"257";"macro@BASETILE";"MOSS"
|
"257";"item@basegame:145";"GEM,SIO2,AMETHYST"
|
||||||
|
"258";"item@basegame:144";"GEM,SIO2,QUARTZ"
|
||||||
|
#"259";"item@basegame:136";"GEM,RUBY"
|
||||||
|
#"260";"item@basegame:137";"GEM,EMERALD"
|
||||||
|
#"261";"item@basegame:138";"GEM,SAPPHIRE"
|
||||||
|
#"262";"item@basegame:139";"GEM,TOPAZ"
|
||||||
|
#"263";"item@basegame:140";"GEM,DIAMOND"
|
||||||
|
|
||||||
|
#"512";"macro@BASETILE";"GRASS"
|
||||||
|
#"513";"macro@BASETILE";"MOSS"
|
||||||
|
Can't render this file because it contains an unexpected character in line 10 and column 3.
|
@@ -8,6 +8,10 @@
|
|||||||
"7";"0.013";"0.300";"0.476";"1.0";"a16x16";"natural silver"
|
"7";"0.013";"0.300";"0.476";"1.0";"a16x16";"natural silver"
|
||||||
"8";"0.017";"0.020";"0.511";"1.0";"a16x16";"lead (galena)"
|
"8";"0.017";"0.020";"0.511";"1.0";"a16x16";"lead (galena)"
|
||||||
|
|
||||||
|
"256";"0.010";"-0.366";"0.528";"2.4";"a16x8";"rocksalt"
|
||||||
|
"257";"0.007";"0.100";"0.494";"1.0";"a16x8";"amethyst"
|
||||||
|
"258";"0.019";"0.015";"0.509";"1.0";"a16x8";"quartz"
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# id: ore ID to spawn, the ID must exist on the ores.csv
|
# id: ore ID to spawn, the ID must exist on the ores.csv
|
||||||
|
|||||||
|
@@ -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, {}) {
|
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 {
|
override fun getProgress(): Double {
|
||||||
return progress.get().toDouble() / chunks * previewWidth
|
return progress.get().toDouble() / chunks * previewWidth
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ internal object ExportMap : ConsoleCommand {
|
|||||||
"ores@basegame:6" to Cvec(0xffcc00ff.toInt()),
|
"ores@basegame:6" to Cvec(0xffcc00ff.toInt()),
|
||||||
"ores@basegame:7" to Cvec(0xd5d9f9ff.toInt()),
|
"ores@basegame:7" to Cvec(0xd5d9f9ff.toInt()),
|
||||||
"ores@basegame:8" to Cvec(0xff9300ff.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)
|
private val WALL_OVERLAY = Cvec(0.35f, 0.35f, 0.35f, 1f)
|
||||||
|
|||||||
@@ -153,6 +153,23 @@ class OreLead(originalID: ItemID) : OreItemBase(originalID, true) {
|
|||||||
get() = CommonResourcePool.getAsItemSheet("basegame.items").get(8,6)
|
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) {
|
class ItemCoalCoke(originalID: ItemID) : OreItemBase(originalID) {
|
||||||
override var originalName = "ITEM_COAL_COKE"
|
override var originalName = "ITEM_COAL_COKE"
|
||||||
|
|||||||
@@ -62,6 +62,15 @@ class OregenAutotiling(world: GameWorld, isFinal: Boolean, seed: Long, val tilin
|
|||||||
BlocksDrawer.connectLut16[autotiled] or mult.shl(4)
|
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" -> {
|
"a16x16" -> {
|
||||||
// get placement (tile connection) info
|
// get placement (tile connection) info
|
||||||
val mult = getHashCoord(x, y, 16)
|
val mult = getHashCoord(x, y, 16)
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ object Worldgen {
|
|||||||
val start = (0.00342f * world.height - 3.22f).floorToInt().coerceAtLeast(1)
|
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 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
|
// 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
|
private val rockScoreMin = 40
|
||||||
|
|||||||
@@ -332,17 +332,20 @@ internal object TerragenTest : NoiseMaker {
|
|||||||
Block.STONE_MARBLE to Color(0.8f, 0.8f, 0.8f, 1f)
|
Block.STONE_MARBLE to Color(0.8f, 0.8f, 0.8f, 1f)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val COPPER_ORE = 0x00e9c8ff
|
private val COPPER_ORE = 0//x00e9c8ff.toInt()
|
||||||
private val IRON_ORE = 0xff7e74ff.toInt()
|
private val IRON_ORE = 0//xff7e74ff.toInt()
|
||||||
private val COAL_ORE = 0x383314ff.toInt()
|
private val COAL_ORE = 0//x383314ff.toInt()
|
||||||
private val ZINC_ORE = 0xefde76ff.toInt()
|
private val ZINC_ORE = 0//xefde76ff.toInt()
|
||||||
private val TIN_ORE = 0xcd8b62ff.toInt()
|
private val TIN_ORE = 0//xcd8b62ff.toInt()
|
||||||
private val GOLD_ORE = 0xffcc00ff.toInt()
|
private val GOLD_ORE = 0//xffcc00ff.toInt()
|
||||||
private val SILVER_ORE = 0xd5d9f9ff.toInt()
|
private val SILVER_ORE = 0//xd5d9f9ff.toInt()
|
||||||
private val LEAD_ORE = 0xff9300ff.toInt()
|
private val LEAD_ORE = 0//xff9300ff.toInt()
|
||||||
|
private val QUARTZ = 0//x55ff33ff.toInt()
|
||||||
|
private val AMETHYST = 0//xee77ffff.toInt()
|
||||||
|
private val ROCKSALT = 0xff00ffff.toInt()
|
||||||
|
|
||||||
private val oreCols = listOf(
|
private val oreCols = listOf(
|
||||||
COPPER_ORE, IRON_ORE, COAL_ORE, ZINC_ORE, TIN_ORE, GOLD_ORE, SILVER_ORE, LEAD_ORE
|
COPPER_ORE, IRON_ORE, COAL_ORE, ZINC_ORE, TIN_ORE, GOLD_ORE, SILVER_ORE, LEAD_ORE, ROCKSALT, QUARTZ, AMETHYST
|
||||||
)
|
)
|
||||||
|
|
||||||
private val terragenYscaling = (NOISEBOX_HEIGHT / 2400.0).pow(0.75)
|
private val terragenYscaling = (NOISEBOX_HEIGHT / 2400.0).pow(0.75)
|
||||||
@@ -353,7 +356,7 @@ internal object TerragenTest : NoiseMaker {
|
|||||||
val cave = if (noiseValue[1] < 0.5) 0 else 1
|
val cave = if (noiseValue[1] < 0.5) 0 else 1
|
||||||
val ore = (noiseValue.subList(2, noiseValue.size)).zip(oreCols).firstNotNullOfOrNull { (n, colour) -> if (n > 0.5) colour else null }
|
val ore = (noiseValue.subList(2, noiseValue.size)).zip(oreCols).firstNotNullOfOrNull { (n, colour) -> if (n > 0.5) colour else null }
|
||||||
|
|
||||||
val isMarble = noiseValue[10] > 0.5
|
val isMarble = false // noiseValue[13] > 0.5
|
||||||
|
|
||||||
val wallBlock = if (isMarble) Block.STONE_MARBLE else groundDepthBlock[terr]
|
val wallBlock = if (isMarble) Block.STONE_MARBLE else groundDepthBlock[terr]
|
||||||
val terrBlock = if (cave == 0) Block.AIR else if (isMarble) Block.STONE_MARBLE else wallBlock
|
val terrBlock = if (cave == 0) Block.AIR else if (isMarble) Block.STONE_MARBLE else wallBlock
|
||||||
@@ -687,6 +690,9 @@ internal object TerragenTest : NoiseMaker {
|
|||||||
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:6", 0.009, 0.300, 0.474, 1.0)),
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:6", 0.009, 0.300, 0.474, 1.0)),
|
||||||
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:7", 0.013, 0.300, 0.476, 1.0)),
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:7", 0.013, 0.300, 0.476, 1.0)),
|
||||||
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:8", 0.017, 0.020, 0.511, 1.0)),
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:8", 0.017, 0.020, 0.511, 1.0)),
|
||||||
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:256", 0.010, -0.366, 0.528, 2.4)),
|
||||||
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:257", 0.007, 0.100, 0.494, 1.0)),
|
||||||
|
Joise(generateOreVeinModule(caveAttenuateBiasScaledCache, seed shake "ores@basegame:258", 0.019, 0.015, 0.509, 1.0)),
|
||||||
|
|
||||||
Joise(generateRockLayer(groundScalingCached, seed, params, (0..7).map {
|
Joise(generateRockLayer(groundScalingCached, seed, params, (0..7).map {
|
||||||
thicknesses[it] + marblerng.nextTriangularBal() * 0.006 to (2.6 * terragenYscaling) + it * 0.18 + marblerng.nextTriangularBal() * 0.09
|
thicknesses[it] + marblerng.nextTriangularBal() * 0.006 to (2.6 * terragenYscaling) + it * 0.18 + marblerng.nextTriangularBal() * 0.09
|
||||||
|
|||||||
@@ -367,6 +367,11 @@ class CreateTileAtlas {
|
|||||||
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X4)
|
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X4)
|
||||||
drawToAtlantes(tilesPixmap, tilesGlowPixmap, tilesEmissivePixmap, RenderTag.MASK_16X4)
|
drawToAtlantes(tilesPixmap, tilesGlowPixmap, tilesEmissivePixmap, RenderTag.MASK_16X4)
|
||||||
}
|
}
|
||||||
|
// predefined by the image dimension: 256x128
|
||||||
|
else if (tilesPixmap.width == TILE_SIZE * 16 && tilesPixmap.height == TILE_SIZE * 8) {
|
||||||
|
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X8)
|
||||||
|
drawToAtlantes(tilesPixmap, tilesGlowPixmap, tilesEmissivePixmap, RenderTag.MASK_16X8)
|
||||||
|
}
|
||||||
// predefined by the image dimension: 256x256
|
// predefined by the image dimension: 256x256
|
||||||
else if (tilesPixmap.width == TILE_SIZE * 16 && tilesPixmap.height == TILE_SIZE * 16) {
|
else if (tilesPixmap.width == TILE_SIZE * 16 && tilesPixmap.height == TILE_SIZE * 16) {
|
||||||
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X16)
|
addTag(blockID, RenderTag.CONNECT_SELF, RenderTag.MASK_16X16)
|
||||||
@@ -511,7 +516,8 @@ class CreateTileAtlas {
|
|||||||
const val MASK_TORCH = 3
|
const val MASK_TORCH = 3
|
||||||
const val MASK_PLATFORM = 4
|
const val MASK_PLATFORM = 4
|
||||||
const val MASK_16X4 = 5
|
const val MASK_16X4 = 5
|
||||||
const val MASK_16X16 = 6
|
const val MASK_16X8 = 6
|
||||||
|
const val MASK_16X16 = 7
|
||||||
|
|
||||||
fun maskTypeToTileCount(maskType: Int) = when (maskType) {
|
fun maskTypeToTileCount(maskType: Int) = when (maskType) {
|
||||||
MASK_NA -> 1
|
MASK_NA -> 1
|
||||||
@@ -520,6 +526,7 @@ class CreateTileAtlas {
|
|||||||
MASK_TORCH -> 4
|
MASK_TORCH -> 4
|
||||||
MASK_PLATFORM -> 8
|
MASK_PLATFORM -> 8
|
||||||
MASK_16X4 -> 64
|
MASK_16X4 -> 64
|
||||||
|
MASK_16X8 -> 128
|
||||||
MASK_16X16 -> 256
|
MASK_16X16 -> 256
|
||||||
else -> throw IllegalArgumentException("Unknown maskType: $maskType")
|
else -> throw IllegalArgumentException("Unknown maskType: $maskType")
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
work_files/graphics/terrain/gems.kra
LFS
Normal file
BIN
work_files/graphics/terrain/gems.kra
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user