projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3661cb6
)
Doors: Same naming for trapdoors as for doors
author
Thomas--S
<Thomas--S@users.noreply.github.com>
Sun, 17 Jul 2016 16:52:42 +0000
(18:52 +0200)
committer
paramat
<mat.gregory@virginmedia.com>
Mon, 18 Jul 2016 22:43:51 +0000
(23:43 +0100)
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
patch
|
blob
|
history
diff --git
a/mods/doors/init.lua
b/mods/doors/init.lua
index 0d3fd23f09f18dba6dc1c4124a9b2412d8d81f9e..914e385f37409b8b505651cf04c96fde677e2c4f 100644
(file)
--- 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"