mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-27 02:19:33 +01:00
Remove 5.3 check for get_natural_light function
as 5.3 isn't supported anymore
This commit is contained in:
parent
8320f1f756
commit
467ecc7c58
1 changed files with 1 additions and 12 deletions
|
@ -1025,15 +1025,6 @@ local node_ok = function(pos, fallback)
|
|||
return minetest.registered_nodes[fallback]
|
||||
end
|
||||
|
||||
local function get_light(pos, tod)
|
||||
if minetest.get_node_or_nil(pos) then
|
||||
local lightfunc = minetest.get_natural_light or minetest.get_node_light
|
||||
return lightfunc(pos, tod)
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
-- environmental damage (water, lava, fire, light etc.)
|
||||
local do_env_damage = function(self)
|
||||
|
||||
|
@ -1076,9 +1067,7 @@ local do_env_damage = function(self)
|
|||
end
|
||||
end
|
||||
|
||||
-- Use get_node_light for Minetest version 5.3 where get_natural_light
|
||||
-- does not exist yet.
|
||||
local sunlight = get_light(pos, self.time_of_day)
|
||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
||||
|
||||
-- bright light harms mob
|
||||
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
||||
|
|
Loading…
Reference in a new issue