summaryrefslogtreecommitdiff
path: root/homedecor
diff options
context:
space:
mode:
Diffstat (limited to 'homedecor')
-rw-r--r--homedecor/depends.txt1
-rw-r--r--homedecor/doors_and_gates.lua5
2 files changed, 6 insertions, 0 deletions
diff --git a/homedecor/depends.txt b/homedecor/depends.txt
index 5a37ef6..1c71e74 100644
--- a/homedecor/depends.txt
+++ b/homedecor/depends.txt
@@ -13,3 +13,4 @@ beds?
flowers?
3d_armor?
skinsdb?
+mesecons?
diff --git a/homedecor/doors_and_gates.lua b/homedecor/doors_and_gates.lua
index f29ea24..34ba017 100644
--- a/homedecor/doors_and_gates.lua
+++ b/homedecor/doors_and_gates.lua
@@ -4,6 +4,8 @@ local S = homedecor_i18n.gettext
local function N_(x) return x end
+local m_rules = mesecon and mesecon.rules and mesecon.rules.pplate
+
-- doors
local function isSolid(pos, adjust)
@@ -264,6 +266,7 @@ for i, side in ipairs(sides) do
drop = "homedecor:door_"..doorname.."_left",
mesecons = {
effector = {
+ rules = m_rules,
action_on = function(pos,node)
local isClosed = getClosed(pos)
if isClosed then
@@ -405,6 +408,7 @@ for i, g in ipairs(gate_list) do
end,
mesecons = {
effector = {
+ rules = m_rules,
action_on = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "closed") end
}
}
@@ -433,6 +437,7 @@ for i, g in ipairs(gate_list) do
return itemstack
end
def.mesecons.effector = {
+ rules = m_rules,
action_off = function(pos,node) homedecor.flip_gate(pos,node,nil,gate, "open") end
}