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:
Luke Puchner-Hardman
2014-09-23 14:39:34 +02:00
committed by sfan5
parent 523f0e8c5b
commit 7057c196c4
8 changed files with 54 additions and 4 deletions

View File

@@ -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,

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