Construction Drones deprecated

by Klonan

Adds ground based personal construction robots.

Content
3 years ago
0.17 - 1.0
386
Logistic network

g The wrong sort of deconstruction

5 years ago

I just started a playthrough including both Construction Drones and Tree Growth: Scaled Trees (with its dependencies), and noticed a strange interaction which I verified in a new game where these were the only mods to 0.17.34.
If I deploy the drones and equip the roboport into the armour slot, they will happily chop down trees that I mark with a deconstruction planner. Tree Growth has adjustable settings for distance from a user structure below which trees will be marked for deconstruction, and this occurs within a few dozen ticks of placing things, but the drones ignore the marking. To get the trees cleared, I have to un-mark the trees with Shift-Drag deconstruction, and then swiftly re-mark for deconstruction before the Tree Growth marking can take effect again.
https://imgur.com/LzRqzHx
https://imgur.com/mx2sCTM
It feels as if there are two different kinds of deconstruction marking, and the drones don't understand the one that Tree Growth uses.
More info: if I get construction robots (with Creative mod) then the robots will pick up the auto-marked trees. I've copied this observation to the Tree Growth mod discussion page.

5 years ago

The tree growth will need to raise an event when it marks the trees for deconstruction

5 years ago
(updated 5 years ago)

No. According to the documentation the event is generated by the game. And I verified, that it is.
https://lua-api.factorio.com/latest/events.html#on_marked_for_deconstruction
However player_index will be nil as there is no associated player. I believe this prevents your event handler from working.

https://github.com/Klonan/Construction_Drones/blob/master/script/construction_drone.lua#L2622
You access event.force, but that is not documented and I could not detect it either.
It would be great if the force were part of the event, since it is part of the corresponding API call. Maybe you should create a feature request?

5 years ago

@Klonan
The bot also didn't deconstruct mining drill that were auto mark by "Auto Deconstruct" mod.

New response