mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
Merge pull request #153 from hanakocz/patch-3
fix for soft reset deleting deconstructed entities
This commit is contained in:
commit
e8525e4152
@ -5,6 +5,7 @@ local blacklist = {
|
||||
|
||||
local function on_marked_for_deconstruction(event)
|
||||
local entity = event.entity
|
||||
if not entity.valid then return end
|
||||
if not event.player_index then return end
|
||||
if entity.force.name ~= "neutral" then return end
|
||||
if blacklist[entity.type] then return end
|
||||
@ -12,4 +13,4 @@ local function on_marked_for_deconstruction(event)
|
||||
end
|
||||
|
||||
local Event = require 'utils.event'
|
||||
Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
|
||||
Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)
|
||||
|
Loading…
Reference in New Issue
Block a user