Auto Deconstruct

by mindmix

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

Utilities
a month ago
0.13 - 2.0
289K
Mining

i Replace deconstructed miners with beacon+speed modules

1 year, 1 month ago
(updated 1 year, 1 month 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