summaryrefslogtreecommitdiff
path: root/compat-chests.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-11 08:58:19 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-11 09:01:12 -0400
commit698c83d6264ab5a23e90c84f4631af28abc44ccc (patch)
treeaf38792ac11af8ba7de616fb53145d02f1e4fb6d /compat-chests.lua
parentfcd9b0fbf434b65dc61442350e5371f0ee690d12 (diff)
downloadpipeworks-698c83d6264ab5a23e90c84f4631af28abc44ccc.tar
pipeworks-698c83d6264ab5a23e90c84f4631af28abc44ccc.tar.gz
pipeworks-698c83d6264ab5a23e90c84f4631af28abc44ccc.tar.bz2
pipeworks-698c83d6264ab5a23e90c84f4631af28abc44ccc.tar.xz
pipeworks-698c83d6264ab5a23e90c84f4631af28abc44ccc.zip
chests/furnaces: cache tube overlay images
Diffstat (limited to 'compat-chests.lua')
-rw-r--r--compat-chests.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/compat-chests.lua b/compat-chests.lua
index ef771ab..c018f75 100644
--- a/compat-chests.lua
+++ b/compat-chests.lua
@@ -6,6 +6,8 @@
local fs_helpers = pipeworks.fs_helpers
+tube_entry = "^pipeworks_tube_connection_wooden.png"
+
local base_chest_formspec = "size[8,9]" ..
default.gui_bg ..
default.gui_bg_img ..
@@ -34,11 +36,11 @@ end
minetest.override_item("default:chest", {
tiles = {
- "default_chest_top.png^pipeworks_tube_connection_wooden.png",
- "default_chest_top.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
+ "default_chest_top.png"..tube_entry,
+ "default_chest_top.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
"default_chest_front.png"
},
groups = {choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, tubedevice_receiver = 1},
@@ -101,11 +103,11 @@ end
minetest.override_item("default:chest_locked", {
tiles = {
- "default_chest_top.png^pipeworks_tube_connection_wooden.png",
- "default_chest_top.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
- "default_chest_side.png^pipeworks_tube_connection_wooden.png",
+ "default_chest_top.png"..tube_entry,
+ "default_chest_top.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
+ "default_chest_side.png"..tube_entry,
"default_chest_lock.png"
},
groups = {choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, tubedevice_receiver = 1},