I have written a mod that looks for yellow belts and places red belt ghosts under them. Unfortunately construction bots go the ghost and stay there forever rather than place the red belts!
I would like for construction bots to be able to fast-replace these belts, much in the same way they already can swap bricks and concrete where they lay down the new one and pick up the old one.
In a related note, I would like the ability to call surface.can_place_entity{name="entity-ghost" ...} and have it return true if inner_name matches one of the occupying's entity's fast-replace, this would simplify it by allowing usage of can_place_entity instead of keeping track of where ghosts have been placed.
Allow construction-bots to fast-replace
Re: Allow construction-bots to fast-replace
Hm. Moved from Suggestions to Modding interface requests.
PS: You know this mods:
https://mods.factorio.com/mods/Klonan/upgrade-planner
and
https://mods.factorio.com/mods/NearlyDu ... on-planner
PS: You know this mods:
https://mods.factorio.com/mods/Klonan/upgrade-planner
and
https://mods.factorio.com/mods/NearlyDu ... on-planner
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Allow construction-bots to fast-replace
I was able to take the code in my concreep mod and changing just a couple lines turn it into a belt replacer. At the moment I have to deconstruct then place a ghost which is very disruptive.
I'm not quite sure how Klonan's mod works, but it let me know to replace both sides of the underground belt!
I'm not quite sure how Klonan's mod works, but it let me know to replace both sides of the underground belt!
Re: Allow construction-bots to fast-replace
It does the same thing. Just check its code and you will see something interesting.Mylon wrote:I was able to take the code in my concreep mod and changing just a couple lines turn it into a belt replacer. At the moment I have to deconstruct then place a ghost which is very disruptive.
I'm not quite sure how Klonan's mod works, but it let me know to replace both sides of the underground belt!
Code: Select all
for k, *beep*_tree in pairs (player.surface.find_entities_filtered({area = area, type = "tree"})) do
*beep*_tree.order_deconstruction(player.force)
end