summaryrefslogtreecommitdiff
path: root/technic_chests
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-11 07:15:59 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-11 07:15:59 -0400
commitb6d343e928efdf0bfedbab47301b61424509380c (patch)
treee8026d6033023f2badb800aa5a2b816fd00ea1b3 /technic_chests
parentbdd45f161aae13e7b59fd7561dac72804625d19d (diff)
add pipeworks tube connection overlays to all chests
(only applies if pipeworks is installed, if not, nothing is added)
Diffstat (limited to 'technic_chests')
-rw-r--r--technic_chests/register.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/technic_chests/register.lua b/technic_chests/register.lua
index 8315482..b697bfd 100644
--- a/technic_chests/register.lua
+++ b/technic_chests/register.lua
@@ -4,6 +4,7 @@ local pipeworks = rawget(_G, "pipeworks")
local fs_helpers = rawget(_G, "fs_helpers")
local allow_label = ""
+local tube_entry = ""
local shift_edit_field = 0
if not minetest.get_modpath("pipeworks") then
@@ -26,6 +27,7 @@ else
fs_helpers = pipeworks.fs_helpers
allow_label = "label[0.9,0.36;Allow splitting incoming stacks from tubes]"
shift_edit_field = 3
+ tube_entry = "^pipeworks_tube_connection_metallic.png"
end
local chest_mark_colors = {
@@ -266,11 +268,24 @@ function technic.chests:definition(name, data)
desc = S("%s Chest"):format(name)
end
+ local tentry = tube_entry
+ if tube_entry ~= "" then
+ if lname == "wooden" then
+ tentry = "^pipeworks_tube_connection_wooden.png"
+ elseif lname == "mithril" then
+ tentry = "^pipeworks_tube_connection_stony.png"
+ end
+ end
local def = {
description = desc,
- tiles = {"technic_"..lname.."_chest_top.png", "technic_"..lname.."_chest_top.png",
- "technic_"..lname.."_chest_side.png", "technic_"..lname.."_chest_side.png",
- "technic_"..lname.."_chest_side.png", table.concat(front, "^")},
+ tiles = {
+ "technic_"..lname.."_chest_top.png"..tentry,
+ "technic_"..lname.."_chest_top.png"..tentry,
+ "technic_"..lname.."_chest_side.png"..tentry,
+ "technic_"..lname.."_chest_side.png"..tentry,
+ "technic_"..lname.."_chest_side.png"..tentry,
+ table.concat(front, "^")
+ },
paramtype2 = "facedir",
groups = self.groups,
tube = self.tube,