Doors: Fix potential crashes, code improvements
authorTim <t4im@users.noreply.github.com>
Sat, 30 Jul 2016 12:21:30 +0000 (14:21 +0200)
committerparamat <mat.gregory@virginmedia.com>
Mon, 1 Aug 2016 00:21:57 +0000 (01:21 +0100)
commit00c2dde4ea0d08224235649af25d23a4c49b15b3
tree141c00a9480397d6ac6ffd760739bae3a7f7f768
parent4fba897a96a0fdd113632bc82a99a530c42e5c73
Doors: Fix potential crashes, code improvements

Fix crash when doors are placed under unknown nodes.
Share a can_dig among doors, that does not crash on nil-player.
Only set can_dig if we actually protect the door.
mods/doors/init.lua