Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.on_event(defines.events.on_player_mined_entity, function(event)
- local player_index = event.player_index
- local player = game.players[player_index]
- local entity = player.selected
- if entity and entity.valid then
- if entity.type == "linked-belt" then
- local lbn = entity.linked_belt_neighbour
- if lbn and lbn.surface == entity.surface then
- --Mark linked belt neighbour for deconstruction
- lbn.order_deconstruction(lbn.force, player)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment