Preconfigure Placement


Build with MMB to configure an entity before it starts working. Also allows copy pipetting with Alt + Q, as well as copying entity settings while building.

Utilities
a month ago
2.0
87

b (Crash) Incompatibility with Compact Circuits

18 days ago

This crash happens when using the mod Compact circuits (https://mods.factorio.com/mod/compaktcircuit)
Not sure which mod actually causes the issue though.

The mod Preconfigure Placement (0.0.6) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event preconfigure-placement::on_built_entity (ID 6)
The mod Compakt circuits (2.0.26) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event compaktcircuit::on_entity_settings_pasted (ID 39)
compaktcircuit/scripts/processor.lua:1030: attempt to index local 'src' (a nil value)
stack traceback:
compaktcircuit/scripts/processor.lua:1030: in function 'handler'
compaktcircuit/scripts/tools.lua:300: in function <compaktcircuit/scripts/tools.lua:298>
stack traceback:
[C]: in function 'copy_settings'
preconfigure-placement/control.lua:239: in function <preconfigure-placement/control.lua:201>

Steps to reproduce:
1. grab an entity and place using MMB.
2. Configure whatever you want.
3. Now try placing a second entity with the pipetted configuration.
4. Crash.

17 days ago

I think that's a problem with the other mod, mainly because of this line:

compaktcircuit/scripts/processor.lua:1030: attempt to index local 'src' (a nil value)

What's happening is Preconfigure Placement is pasting settings on the entity you just built, and Compact circuits has an event handler for when settings are pasted. If I had to guess without looking at the code, I'd assume they didn't handle the case of a script pasting the settings instead of a player, which is easy to miss.

16 days ago

Thanks for the reply. In that case I have reported it to the other mod's page.

New response