diff options
author | Luke Puchner-Hardman <x.lukk3.x@gmail.com> | 2014-09-23 14:39:34 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2017-01-02 15:28:06 +0100 |
commit | 7057c196c442ff3484b53f48d940f4c9e0ffe23a (patch) | |
tree | ea6e57d1755253577e3eda6fe22280314d22fb87 /games/minimal | |
parent | 523f0e8c5bce0cb58215dc1f9d027cf32394e3c3 (diff) | |
download | minetest-7057c196c442ff3484b53f48d940f4c9e0ffe23a.tar.gz minetest-7057c196c442ff3484b53f48d940f4c9e0ffe23a.tar.bz2 minetest-7057c196c442ff3484b53f48d940f4c9e0ffe23a.zip |
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.
Diffstat (limited to 'games/minimal')
-rw-r--r-- | games/minimal/mods/default/init.lua | 10 | ||||
-rw-r--r-- | games/minimal/mods/default/textures/default_chest.png | bin | 0 -> 263 bytes | |||
-rw-r--r-- | games/minimal/mods/default/textures/default_chest_front.png | bin | 114 -> 0 bytes | |||
-rw-r--r-- | games/minimal/mods/default/textures/default_chest_lock.png | bin | 145 -> 0 bytes | |||
-rw-r--r-- | games/minimal/mods/default/textures/default_chest_side.png | bin | 98 -> 0 bytes | |||
-rw-r--r-- | games/minimal/mods/default/textures/default_chest_top.png | bin | 93 -> 0 bytes |
6 files changed, 6 insertions, 4 deletions
diff --git a/games/minimal/mods/default/init.lua b/games/minimal/mods/default/init.lua index bff7860e3..f532e7193 100644 --- a/games/minimal/mods/default/init.lua +++ b/games/minimal/mods/default/init.lua @@ -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, diff --git a/games/minimal/mods/default/textures/default_chest.png b/games/minimal/mods/default/textures/default_chest.png Binary files differnew file mode 100644 index 000000000..9746a3fd9 --- /dev/null +++ b/games/minimal/mods/default/textures/default_chest.png diff --git a/games/minimal/mods/default/textures/default_chest_front.png b/games/minimal/mods/default/textures/default_chest_front.png Binary files differdeleted file mode 100644 index 55b076c35..000000000 --- a/games/minimal/mods/default/textures/default_chest_front.png +++ /dev/null diff --git a/games/minimal/mods/default/textures/default_chest_lock.png b/games/minimal/mods/default/textures/default_chest_lock.png Binary files differdeleted file mode 100644 index 4b2d1af6c..000000000 --- a/games/minimal/mods/default/textures/default_chest_lock.png +++ /dev/null diff --git a/games/minimal/mods/default/textures/default_chest_side.png b/games/minimal/mods/default/textures/default_chest_side.png Binary files differdeleted file mode 100644 index ae4847cb6..000000000 --- a/games/minimal/mods/default/textures/default_chest_side.png +++ /dev/null diff --git a/games/minimal/mods/default/textures/default_chest_top.png b/games/minimal/mods/default/textures/default_chest_top.png Binary files differdeleted file mode 100644 index ac41551b0..000000000 --- a/games/minimal/mods/default/textures/default_chest_top.png +++ /dev/null |