aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods
diff options
context:
space:
mode:
authorLuke Puchner-Hardman <x.lukk3.x@gmail.com>2014-09-23 14:39:34 +0200
committersfan5 <sfan5@live.de>2017-01-02 15:28:06 +0100
commit7057c196c442ff3484b53f48d940f4c9e0ffe23a (patch)
treeea6e57d1755253577e3eda6fe22280314d22fb87 /games/minimal/mods
parent523f0e8c5bce0cb58215dc1f9d027cf32394e3c3 (diff)
downloadminetest-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/mods')
-rw-r--r--games/minimal/mods/default/init.lua10
-rw-r--r--games/minimal/mods/default/textures/default_chest.pngbin0 -> 263 bytes
-rw-r--r--games/minimal/mods/default/textures/default_chest_front.pngbin114 -> 0 bytes
-rw-r--r--games/minimal/mods/default/textures/default_chest_lock.pngbin145 -> 0 bytes
-rw-r--r--games/minimal/mods/default/textures/default_chest_side.pngbin98 -> 0 bytes
-rw-r--r--games/minimal/mods/default/textures/default_chest_top.pngbin93 -> 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
new file mode 100644
index 000000000..9746a3fd9
--- /dev/null
+++ b/games/minimal/mods/default/textures/default_chest.png
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_chest_front.png b/games/minimal/mods/default/textures/default_chest_front.png
deleted file mode 100644
index 55b076c35..000000000
--- a/games/minimal/mods/default/textures/default_chest_front.png
+++ /dev/null
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_chest_lock.png b/games/minimal/mods/default/textures/default_chest_lock.png
deleted file mode 100644
index 4b2d1af6c..000000000
--- a/games/minimal/mods/default/textures/default_chest_lock.png
+++ /dev/null
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_chest_side.png b/games/minimal/mods/default/textures/default_chest_side.png
deleted file mode 100644
index ae4847cb6..000000000
--- a/games/minimal/mods/default/textures/default_chest_side.png
+++ /dev/null
Binary files differ
diff --git a/games/minimal/mods/default/textures/default_chest_top.png b/games/minimal/mods/default/textures/default_chest_top.png
deleted file mode 100644
index ac41551b0..000000000
--- a/games/minimal/mods/default/textures/default_chest_top.png
+++ /dev/null
Binary files differ