Auto Deconstruct

by mindmix

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

Utilities
2 months ago
0.13 - 2.0
321K
Mining

i [won't implement] Replace deconstructed miners with beacon+speed modules

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