mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-29 03:30:19 +01:00
mesecons_doors: Don't modify doors that are already mesecon-enabled
This commit is contained in:
parent
ff87cf3162
commit
ac83dead50
@ -22,6 +22,11 @@ end
|
||||
local function meseconify_door(name)
|
||||
if minetest.registered_items[name .. "_b_1"] then
|
||||
-- old style double-node doors
|
||||
if minetest.registered_items[name .. "_b_1"].mesecons then
|
||||
minetest.log("info", "[mesecons_doors] Not touching door " .. name)
|
||||
return
|
||||
end
|
||||
|
||||
local function toggle_state1 (pos)
|
||||
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||
end
|
||||
@ -47,6 +52,10 @@ local function meseconify_door(name)
|
||||
})
|
||||
elseif minetest.registered_items[name .. "_a"] then
|
||||
-- new style mesh node based doors
|
||||
if minetest.registered_items[name .. "_a"].mesecons then
|
||||
minetest.log("info", "[mesecons_doors] Not touching door " .. name)
|
||||
return
|
||||
end
|
||||
local override = {
|
||||
mesecons = {effector = {
|
||||
action_on = function(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user