mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-25 18:20:20 +01:00
any light damage > 12 harms light sensative mobs
This commit is contained in:
parent
01ad44d3b3
commit
8d3e6897bc
10
api.lua
10
api.lua
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
-- Mobs Api (12th August 2017)
|
-- Mobs Api (1st September 2017)
|
||||||
|
|
||||||
mobs = {}
|
mobs = {}
|
||||||
mobs.mod = "redo"
|
mobs.mod = "redo"
|
||||||
@ -569,11 +569,11 @@ local do_env_damage = function(self)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- daylight above ground
|
-- too bright a light harms mob (was daylight above ground)
|
||||||
if self.light_damage ~= 0
|
if self.light_damage ~= 0
|
||||||
and pos.y > 0
|
-- and pos.y > 0
|
||||||
and self.time_of_day > 0.2
|
-- and self.time_of_day > 0.2
|
||||||
and self.time_of_day < 0.8
|
-- and self.time_of_day < 0.8
|
||||||
and (minetest.get_node_light(pos) or 0) > 12 then
|
and (minetest.get_node_light(pos) or 0) > 12 then
|
||||||
|
|
||||||
self.health = self.health - self.light_damage
|
self.health = self.health - self.light_damage
|
||||||
|
Loading…
Reference in New Issue
Block a user