From 9862bbc8e5bdb7ce1fd1878c6f40c23c2a3fbb72 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Sun, 17 Jul 2016 18:52:42 +0200 Subject: [PATCH] Doors: Same naming for trapdoors as for doors This makes register_trapdoor act the same as the register_door. If `name` isn't prefixed, it will be prefixed with "doors:". --- mods/doors/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 0d3fd23..914e385 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -533,6 +533,10 @@ function _doors.trapdoor_toggle(pos, node, clicker) end function doors.register_trapdoor(name, def) + if not name:find(":") then + name = "doors:" .. name + end + local name_closed = name local name_opened = name.."_open"