1
0
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:
MewMew 2020-03-31 20:43:35 +02:00 committed by GitHub
commit e8525e4152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)