mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-26 03:52:22 +02:00
8 lines
318 B
Lua
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)
|