Add nil check in doors_toggle (#126)
Add nil check to prevent errors xdecor caused in combination with pkarcs_doors.
This commit is contained in:
parent
5b0b4f3b56
commit
841a033983
@ -9,6 +9,7 @@ local function door_toggle(pos_actuator, pos_door, player)
|
||||
local player_name = player:get_player_name()
|
||||
local actuator = minetest.get_node(pos_actuator)
|
||||
local door = doors.get(pos_door)
|
||||
if not door then return end
|
||||
|
||||
if actuator.name:sub(-4) == "_off" then
|
||||
minetest.set_node(pos_actuator,
|
||||
|
Loading…
Reference in New Issue
Block a user