mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Update tree-decon.lua
This commit is contained in:
@@ -99,11 +99,17 @@ Event.on_nth_tick(300, function()
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_entity_damaged, function(event)
|
||||
if not (event.damage_type.name == 'impact' and event.force) then
|
||||
if not (event.damage_type.name == 'impact' and event.force) then
|
||||
return
|
||||
end
|
||||
|
||||
if event.entity.type == 'tree' or event.entity.type == 'simple-entity' then
|
||||
event.entity.destroy()
|
||||
if not (event.entity.type == 'tree' or event.entity.type == 'simple-entity') then
|
||||
return
|
||||
end
|
||||
|
||||
if (not event.cause) or (event.cause.type ~= 'car')then
|
||||
return
|
||||
end
|
||||
|
||||
event.entity.destroy()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user