mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-24 17:20:19 +01:00
guard against glow worm/water interaction crash
It appears that the ABM that destroys glow worms doesn't always remove them from the next light-kills check, resulting in this code being called on an air node.
This commit is contained in:
parent
225023298a
commit
aa02e526c6
@ -186,7 +186,7 @@ if dfcaverns.config.light_kills_fungus then
|
||||
local dead_node = node_def._dfcaverns_dead_node or "dfcaverns:dead_fungus"
|
||||
-- 11 is the value adjacent to a torch
|
||||
local light_level = minetest.get_node_light(pos)
|
||||
if light_level and light_level > node_def.groups.light_sensitive_fungus then
|
||||
if light_level and node_def.groups.light_sensitive_fungus and light_level > node_def.groups.light_sensitive_fungus then
|
||||
minetest.set_node(pos, {name=dead_node, param2 = node.param2})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user