Please include previous instance in on_pre_build events when created_by_moving is true

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5683
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Please include previous instance in on_pre_build events when created_by_moving is true

Post by mrvn »

TL;DR
When an entity or ghost is build on the move by click&drag the on_pre_build event should include the previous instance.

What ?
When you click&drag for example a power pole the on_pre_build event should include the power pole that was first clicked or the last placed pole. I'm mostly concerned with power poles but belts, pipes or rails would also make sense. Can't think of a use for other entities but can't hurt to always include the previous instance in a drag.
Why ?
Recently there was a suggestion of having the large power poles auto connect red/green wires. My take on that was that click&drag mode should connect red/green wires if the original pole had them. To do that in a mod requires knowing when click&drag is used (on_pre_build.created_by_moving I assume will work) but also where the previous power pole in the drag is.

Post Reply

Return to “Modding interface requests”