mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 13:51:53 +09:00
overlaying tile breakage over ores
This commit is contained in:
14
assets/mods/basegame/ores/ores.csv
Normal file
14
assets/mods/basegame/ores/ores.csv
Normal file
@@ -0,0 +1,14 @@
|
||||
"id";"item";"tags"
|
||||
"1";"item@basegame:128";"COPPER,MALACHITE"
|
||||
# "2";"item@basegame:129";"IRON,HEMATITE"
|
||||
# "3";"item@basegame:130";"GOLD,NATURAL_GOLD"
|
||||
# "4";"item@basegame:131";"COAL,CARBON"
|
||||
# "5";"item@basegame:132";"ZINC,SPHALERITE"
|
||||
# "6";"item@basegame:133";"TITANIUM,RUTILE"
|
||||
# "7";"item@basegame:134";"GEM,RUBY"
|
||||
# "8";"item@basegame:135";"GEM,EMERALD"
|
||||
# "9";"item@basegame:136";"GEM,SAPPHIRE"
|
||||
#"10";"item@basegame:137";"GEM,TOPAZ"
|
||||
#"11";"item@basegame:138";"GEM,DIAMOND"
|
||||
#"12";"item@basegame:139";"GEM,SIO2,AMETHYST"
|
||||
#"13";"item@basegame:140";"GEM,SIO2,QUARTZ"
|
||||
|
Can't render this file because it contains an unexpected character in line 3 and column 3.
|
@@ -341,7 +341,6 @@ internal object BlocksDrawer {
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
|
||||
// draw a tile
|
||||
val nearbyTilesInfo = if (mode == OCCLUSION) {
|
||||
getNearbyTilesInfoFakeOcc(x, y)
|
||||
@@ -406,9 +405,9 @@ internal object BlocksDrawer {
|
||||
//println("tileNumberBase = $tileNumberBase, tileNumber = $tileNumber, fluid = ${world.getFluid(x, y)}")
|
||||
}
|
||||
|
||||
val breakage = if (mode == TERRAIN) world.getTerrainDamage(x, y) else if (mode == WALL) world.getWallDamage(x, y) else 0f
|
||||
val maxHealth = if (mode == TERRAIN) BlockCodex[world.getTileFromTerrain(x, y)].strength else if (mode == WALL) BlockCodex[world.getTileFromWall(x, y)].strength else 1
|
||||
val breakingStage = if (mode == TERRAIN || mode == WALL) (breakage / maxHealth).coerceIn(0f, 1f).times(BREAKAGE_STEPS).roundToInt() else 0
|
||||
val breakage = if (mode == TERRAIN || mode == ORES) world.getTerrainDamage(x, y) else if (mode == WALL) world.getWallDamage(x, y) else 0f
|
||||
val maxHealth = if (mode == TERRAIN || mode == ORES) BlockCodex[world.getTileFromTerrain(x, y)].strength else if (mode == WALL) BlockCodex[world.getTileFromWall(x, y)].strength else 1
|
||||
val breakingStage = if (mode == TERRAIN || mode == WALL || mode == ORES) (breakage / maxHealth).coerceIn(0f, 1f).times(BREAKAGE_STEPS).roundToInt() else 0
|
||||
|
||||
// draw a tile
|
||||
writeToBuffer(mode, bufferX, bufferY, thisTileX, thisTileY, breakingStage)
|
||||
|
||||
Reference in New Issue
Block a user