Skip to content

Commit

Permalink
Doors: Same naming for trapdoors as for doors
Browse files Browse the repository at this point in the history
This makes register_trapdoor act the same as the register_door.
If `name` isn't prefixed, it will be prefixed with "doors:".
  • Loading branch information
Thomas--S authored and paramat committed Jul 18, 2016
1 parent 3661cb6 commit 9862bbc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mods/doors/init.lua
Expand Up @@ -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"
Expand Down

0 comments on commit 9862bbc

Please sign in to comment.