mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-10 17:53:52 +01:00
Make on_lightning_strike available to non-mob entities
This commit is contained in:
parent
2c4a768685
commit
fcba67b7e7
@ -135,7 +135,7 @@ function lightning.strike_func(pos, pos2, objects)
|
||||
-- damage nearby objects, transform mobs
|
||||
for _, obj in pairs(objects) do
|
||||
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
|
||||
mcl_util.deal_damage(obj, 5, { type = "lightning_bolt" })
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user