1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-08 00:39:30 +02:00
ComfyFactorio/modules/no_deconstruction_of_neutral_entities.lua
2019-08-06 03:04:35 +02:00

8 lines
318 B
Lua

local event = require 'utils.event'
local function on_marked_for_deconstruction(event)
if event.entity.force.name ~= "neutral" then return end
event.entity.cancel_deconstruction(game.players[event.player_index].force.name)
end
event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction)