forked from minetest/minetest_game
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:".
This commit is contained in:
parent
3661cb61e3
commit
9862bbc8e5
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user