Prevent crash caused by nil in division returned by `minetest.get_node_light` in solar_helmet.lua
This commit is contained in:
parent
752731972c
commit
e95a2a7cc1
|
@ -22,7 +22,7 @@ local function onGlobalStep(player,inv,stack)
|
|||
if stack:get_name()~="industrialtest:solar_helmet" then
|
||||
return false
|
||||
end
|
||||
local amount=math.floor(minetest.get_node_light(player:get_pos())/2)
|
||||
local amount=math.floor((minetest.get_node_light(player:get_pos()) or 0)/2)
|
||||
if amount==0 then
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue