From: Thomas--S Date: Sun, 17 Jul 2016 16:52:42 +0000 (+0200) Subject: Doors: Same naming for trapdoors as for doors X-Git-Tag: 0.4.15~129 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9862bbc8e5bdb7ce1fd1878c6f40c23c2a3fbb72;p=oweals%2Fminetest_game.git 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:". --- diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 0d3fd23f..914e385f 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"