DontRebuildThisStuff

by tkausl

Fixes bots deconstructing and constructing entities when ghosts are placed on top of entities marked for deconstruction.

9 months ago
1.1
177
Owner:
tkausl
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
9 months ago
Latest Version:
0.0.2 (9 months ago)
Factorio version:
1.1
Downloaded:
177 times

WIP, please report problems so I can fix them.

This is my try on fixing bots de- and immediately reconstructing things when a blueprint is placed on an area marked for deconstruction.

Usually, when a ghost is placed on an entity which is marked for deconstruction, a bot will happily deconstruct the entity and then construct the ghost, even if the outcome is the same as pre-deconstructing. This mod changes this behavior in the following way:

If a ghost entity (by shift-placing or placing a blueprint) is placed on an entity marked for deconstruction of the same type, the ghost is destroyed immediately and the entity is unmarked for deconstruction.

If the direction of said entity is different from the new (the ghosts) direction, an "upgrade" is requested with the new direction.

If the entity is of the same type but different name (i.e. one is an upgrade of the other), an upgrade is requested.

If the ghost contains modules, a module request is created.