Skip to content

Commit 9862bbc

Browse files
Thomas--Sparamat
authored andcommittedJul 18, 2016
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:".
1 parent 3661cb6 commit 9862bbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎mods/doors/init.lua

+4
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,10 @@ function _doors.trapdoor_toggle(pos, node, clicker)
533533
end
534534

535535
function doors.register_trapdoor(name, def)
536+
if not name:find(":") then
537+
name = "doors:" .. name
538+
end
539+
536540
local name_closed = name
537541
local name_opened = name.."_open"
538542

0 commit comments

Comments
 (0)
Please sign in to comment.