mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
9 lines
376 B
Lua
9 lines
376 B
Lua
local event = require 'utils.event'
|
|
|
|
local function on_marked_for_deconstruction(event)
|
|
if event.entity.force.name ~= "neutral" then return end
|
|
if event.entity.name == "item-on-ground" 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) |