Auto Deconstruct

by mindmix

This mod marks drills that have no more resources to mine for deconstruction.

Utilities
5 months ago
0.13 - 1.1
243K
Mining

i Replace deconstructed miners with beacon+speed modules

5 months ago
(updated 5 months ago)

Would speed up extraction when ore node is starting to get smaller.

Ended up making this for myself. Here's a working piece of code (hardcoded, no settings and no error checking):
local beacon = drill.surface.create_entity{
name="entity-ghost",
position = {x = drill.position.x, y = drill.position.y},
force=drill.force,
inner_name="beacon",
raise_built=true
}
local beacon_modules = {
["speed-module-3"] = 2
}
beacon.item_requests = beacon_modules

Just need to place it in new 'else' block after 'if has_fluid'. No clue how to code it for miners using fluids. ;)

New response