From 472fcfc05bff1bb98d2cb41c928022c3cd6d362c Mon Sep 17 00:00:00 2001 From: minjaesong Date: Sun, 25 Aug 2024 20:20:46 +0900 Subject: [PATCH] wood blocks update --- assets/mods/basegame/blocks/48.tga | 2 +- assets/mods/basegame/blocks/49.tga | 4 ++-- assets/mods/basegame/blocks/50.tga | 4 ++-- assets/mods/basegame/blocks/51.tga | 4 ++-- assets/mods/basegame/blocks/blocks.csv | 12 ++++++------ src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt | 6 +++--- .../torvald/terrarum/worlddrawer/CreateTileAtlas.kt | 2 ++ .../terrain/terrain_variable_subtiling_full.kra | 4 ++-- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/assets/mods/basegame/blocks/48.tga b/assets/mods/basegame/blocks/48.tga index b42a513d4..4ffdc50c7 100644 --- a/assets/mods/basegame/blocks/48.tga +++ b/assets/mods/basegame/blocks/48.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1448fae01ad29fb604c16fe823935d4dcbe71b036c189c3073636e5c04829c95 +oid sha256:f8e84a04581bf540c85ba824215d2ed69f2b3412d24a5d853f5e77e44566b01b size 56594 diff --git a/assets/mods/basegame/blocks/49.tga b/assets/mods/basegame/blocks/49.tga index 47fa3a27c..11f682cf0 100644 --- a/assets/mods/basegame/blocks/49.tga +++ b/assets/mods/basegame/blocks/49.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50123dd776c62860b6dd51a42b887a3089d53c9337d80fd1a6d42f8bea26e676 -size 50220 +oid sha256:43ff7df26ab51da5f93d8639c71aa4dc2d989432ae239dd79e9cd8bc57396f0e +size 56594 diff --git a/assets/mods/basegame/blocks/50.tga b/assets/mods/basegame/blocks/50.tga index 42d5110b5..9a2905330 100644 --- a/assets/mods/basegame/blocks/50.tga +++ b/assets/mods/basegame/blocks/50.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb49ed63f4bd1b8928f59ccc94601a1769cd8193c754ca4a867f90e6a3a52b06 -size 50194 +oid sha256:9a88fd04a497241794455fb2ae0d9e68796815e797fd53dc8eae21f708328cb5 +size 56594 diff --git a/assets/mods/basegame/blocks/51.tga b/assets/mods/basegame/blocks/51.tga index d0cab62e4..2207a2451 100644 --- a/assets/mods/basegame/blocks/51.tga +++ b/assets/mods/basegame/blocks/51.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46a7edf44e2f9bec0b4de19045770c0ea3338ef9d152a6523bcc1ef25a5c9794 -size 50220 +oid sha256:44bcd209d0b5b83c170aa0f521bf72dc022d48f8c3a159dd48a51285c181313d +size 56594 diff --git a/assets/mods/basegame/blocks/blocks.csv b/assets/mods/basegame/blocks/blocks.csv index bfb12d376..cfbb0d5d5 100644 --- a/assets/mods/basegame/blocks/blocks.csv +++ b/assets/mods/basegame/blocks/blocks.csv @@ -5,8 +5,8 @@ # rocks "16";"17";"17";"BLOCK_STONE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"ROCK,NATURAL,OREBEARING,SHALLOWROCK,BRICKROCK" "17";"17";"17";"BLOCK_STONE_QUARRIED";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"ROCK,NATURAL,OREBEARING,SHALLOWROCK,BRICKROCK" -"18";"18";"18";"BLOCK_STONE_TILE_WHITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.18";"STONE,NORANDTILE" -"19";"19";"19";"BLOCK_STONE_BRICKS";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"STONE,NORANDTILE" +"18";"18";"18";"BLOCK_STONE_TILE_WHITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.18";"STONE" +"19";"19";"19";"BLOCK_STONE_BRICKS";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"STONE" "20";"20";"20";"BLOCK_STONE_DEEP";"0.1252";"0.1252";"0.1252";"0.1252";"80";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"ROCK,NATURA,OREBEARING,DEEPROCK,BRICKROCK" "21";"21";"21";"BLOCK_STONE_MARBLE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.1";"ROCK,NATURAL,DEEPROCK" @@ -23,10 +23,10 @@ #"40";"40";"40";"BLOCK_FOLIAGE_PURPLE";"0.1252";"0.1252";"0.1252";"0.1252";"12";"1400";"GRSS";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"GRASS,NATURAL" # woods (tag WOOD: ingredient, tag WOODEN: can be attacked using axe) -"48";"48";"48";"BLOCK_PLANK_NORMAL";"0.1252";"0.1252";"0.1252";"0.1252";"19";"740";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN,NORANDTILE" -"49";"49";"49";"BLOCK_PLANK_EBONY";"0.1252";"0.1252";"0.1252";"0.1252";"23";"1200";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN,NORANDTILE" -"50";"50";"50";"BLOCK_PLANK_BIRCH";"0.1252";"0.1252";"0.1252";"0.1252";"18";"670";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN,NORANDTILE" -"51";"51";"51";"BLOCK_PLANK_ROSEWOOD";"0.1252";"0.1252";"0.1252";"0.1252";"20";"900";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN,NORANDTILE" +"48";"48";"48";"BLOCK_PLANK_NORMAL";"0.1252";"0.1252";"0.1252";"0.1252";"19";"740";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN" +"49";"49";"49";"BLOCK_PLANK_EBONY";"0.1252";"0.1252";"0.1252";"0.1252";"23";"1200";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN" +"50";"50";"50";"BLOCK_PLANK_BIRCH";"0.1252";"0.1252";"0.1252";"0.1252";"18";"670";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN" +"51";"51";"51";"BLOCK_PLANK_ROSEWOOD";"0.1252";"0.1252";"0.1252";"0.1252";"20";"900";"WOOD";"1";"1";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"WOOD,WOODEN" # small punchable trees "64";"item@basegame:168";"item@basegame:168";"BLOCK_TRUNK_NORMAL";"0.0312";"0.0312";"0.0312";"0.0312";"16";"740";"WOOD";"0";"0";"N/A";"0";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"0.0";"TREE,TREETRUNK,TREESMALL,NATURAL" diff --git a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt index 3ee73e6e7..8cc9195f6 100644 --- a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt +++ b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer.kt @@ -403,7 +403,7 @@ internal object BlocksDrawer { var hash = if ((mode == WALL || mode == TERRAIN) && !BlockCodex[world.tileNumberToNameMap[rawTileNum.toLong()]].hasTag("NORANDTILE")) getHashCoord(x, y, 8, mode.modeToString()) - else 0 + else 0 // this zero is completely ignored if the block uses Subtiling // draw a tile val nearbyTilesInfo = if (mode == OCCLUSION) { @@ -538,8 +538,8 @@ internal object BlocksDrawer { else 1 val breakingStage = - if (mode == TERRAIN || mode == WALL || mode == ORES) (breakage / maxHealth).coerceIn(0f, 1f) - .times(BREAKAGE_STEPS).roundToInt() + if (mode == TERRAIN || mode == WALL || mode == ORES) + (breakage / maxHealth).coerceIn(0f, 1f).times(BREAKAGE_STEPS).roundToInt() else 0 if (renderTag.maskType >= CreateTileAtlas.RenderTag.MASK_SUBTILE_GENERIC) { diff --git a/src/net/torvald/terrarum/worlddrawer/CreateTileAtlas.kt b/src/net/torvald/terrarum/worlddrawer/CreateTileAtlas.kt index 9eaa1925a..5e53ce57a 100644 --- a/src/net/torvald/terrarum/worlddrawer/CreateTileAtlas.kt +++ b/src/net/torvald/terrarum/worlddrawer/CreateTileAtlas.kt @@ -464,6 +464,7 @@ class CreateTileAtlas { // 0000 (0): INVALID // 1000 (1): connect-mutual // 0100 (2): connect-self + // NOTE: For this system, the "NORANDTILE" tag is ignored val maskType = if (tilesPixmap.width >= 3*W_SUBTILE_GENERIC) MASK_SUBTILE_GRASS else MASK_SUBTILE_GENERIC var connectionType0 = 0 var tilingMode = 0 @@ -498,6 +499,7 @@ class CreateTileAtlas { // 0000 (0): INVALID // 0001 (1): 16-tiles tiling [Deprecated] // 0010 (2): 47-tiles tiling + // NOTE: For this system ONLY, the FlipRot can be disabled by adding "NORANDTILE" tag on the blocks.csv var connectionType = 0 var maskType = 0 for (bit in 0 until TILE_SIZE) { diff --git a/work_files/graphics/terrain/terrain_variable_subtiling_full.kra b/work_files/graphics/terrain/terrain_variable_subtiling_full.kra index fdf98f631..3fc44c1c0 100644 --- a/work_files/graphics/terrain/terrain_variable_subtiling_full.kra +++ b/work_files/graphics/terrain/terrain_variable_subtiling_full.kra @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef9ee1677103c56d6ee49d216a1e91f9c78c178f350f5d53ae9de3718076a6aa -size 638495 +oid sha256:1a1ab0d80096bc36668503f2804d7edae71e96e09587b5f01497f626e1f8b218 +size 680805