mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-01 23:11:11 +01:00
Make on_lightning_strike available to non-mob entities
This commit is contained in:
parent
2c4a768685
commit
fcba67b7e7
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ function lightning.strike_func(pos, pos2, objects)
|
||||||
-- damage nearby objects, transform mobs
|
-- damage nearby objects, transform mobs
|
||||||
for _, obj in pairs(objects) do
|
for _, obj in pairs(objects) do
|
||||||
local lua = obj:get_luaentity()
|
local lua = obj:get_luaentity()
|
||||||
if lua and lua.is_mob then
|
if lua then
|
||||||
if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ) ~= true then
|
if not lua.on_lightning_strike or ( lua.on_lightning_strike and lua.on_lightning_strike(lua, pos, pos2, objects) ) ~= true then
|
||||||
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
|
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue