DontRebuildThisStuff

by tkausl

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

Content
1 year, 4 months ago
1.1
247
Blueprints
Owner:
tkausl
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
2 years ago
Latest Version:
0.0.3 (1 year, 4 months ago)
Factorio version:
1.1
Downloaded by:
247 users

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.