Add wooden automatic door

master
Dmitry Kostenko 2021-06-06 00:36:44 +02:00
parent 3423982b06
commit 616f718816
2 changed files with 21 additions and 0 deletions

19
init.lua Normal file
View File

@ -0,0 +1,19 @@
doors.register("autodoors:door_wood", {
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
description = "Automatic Wooden Door",
inventory_image = "doors_item_wood.png^[colorize:yellow:50",
groups = { node = 1, oddly_breakable_by_hand = 1 },
on_rightclick = function() end,
mesecons = {
effector = {
action_on = function(pos, node)
local door = doors.get(pos)
if door then door:open() end
end,
action_off = function(pos, node)
local door = doors.get(pos)
if door then door:close() end
end,
}
},
})

2
mod.conf Normal file
View File

@ -0,0 +1,2 @@
depends=doors