mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Added "[sheet" to the texture special commands.
"[sheet:WxH:X,Y" assumes the base image is a tilesheet with W*H tiles on it and crops to the tile at position X,Y. Basically it works like "[verticalframe" but in 2D. For testing, I combined the four default_chest images into one.
This commit is contained in:
parent
523f0e8c5b
commit
7057c196c4
8 changed files with 54 additions and 4 deletions
|
@ -1130,8 +1130,9 @@ minetest.register_node("default:sign_wall", {
|
|||
|
||||
minetest.register_node("default:chest", {
|
||||
description = "Chest",
|
||||
tiles ={"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
|
||||
"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"},
|
||||
tiles ={"default_chest.png^[sheet:2x2:0,0", "default_chest.png^[sheet:2x2:0,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:0,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
legacy_facedir_simple = true,
|
||||
|
@ -1164,8 +1165,9 @@ end
|
|||
|
||||
minetest.register_node("default:chest_locked", {
|
||||
description = "Locked Chest",
|
||||
tiles ={"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
|
||||
"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"},
|
||||
tiles ={"default_chest.png^[sheet:2x2:0,0", "default_chest.png^[sheet:2x2:0,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,0",
|
||||
"default_chest.png^[sheet:2x2:1,0", "default_chest.png^[sheet:2x2:1,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||
legacy_facedir_simple = true,
|
||||
|
|
BIN
games/minimal/mods/default/textures/default_chest.png
Normal file
BIN
games/minimal/mods/default/textures/default_chest.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 B |
Binary file not shown.
Before Width: | Height: | Size: 114 B |
Binary file not shown.
Before Width: | Height: | Size: 145 B |
Binary file not shown.
Before Width: | Height: | Size: 98 B |
Binary file not shown.
Before Width: | Height: | Size: 93 B |
Loading…
Add table
Add a link
Reference in a new issue