When the player places a blueprint, one on_pre_built event fires, then one on_built_entity for each ghost that the blueprint creates.
This request is for an event that fires at the end of that process, indicating that the build process for the blueprint is finished. The event could fire for non-blueprints, but it seems less useful in those cases.
PS: This is an XY post. The underlying problem/goal here is finding a way to prevent https://mods.factorio.com/mod/automatic ... connectors from building a pipe ghost between two new underground pipe ghosts in the middle of a blueprint placement. The broader inquiry into how to solve that sort of problem with that mod is at viewtopic.php?t=129325
on_post_built event, especially for blueprints
Re: on_post_built event, especially for blueprints
I can see the utility in such an event: after all the blueprint entities/actions are finished. The only issue I can see is knowing which entities it was related to since the game has no way to make that association now. It would be up to anyone listening to it to simply flush everything it had queued between pre-built and it running - treat them all as part of that action.
If you want to get ahold of me I'm almost always on Discord.
Re: on_post_built event, especially for blueprints
That would be my strategy. Set a flag in on_pre_built, check the flag in on_built_entity, clear the flag in on_post_built.
Re: on_post_built event, especially for blueprints
Suggestion to solve the original problem:
Check the last_user or the just built entity.
Check the cursor_stack of that player.
If it's not an underground pipe, don't do anything.
That way if they are holding a blueprint, it won't trigger.
Check the last_user or the just built entity.
Check the cursor_stack of that player.
If it's not an underground pipe, don't do anything.
That way if they are holding a blueprint, it won't trigger.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Re: on_post_built event, especially for blueprints
I only don't want to connect entities within the same blueprint. I still want to connect an underground pipe in a blueprint to an underground pipe outside the blueprint.
Also another mod can modify their cursor stack before I check it.
PS: And I'd really prefer to have discussions of the larger problem over in the thread for that. viewtopic.php?t=129325
Also another mod can modify their cursor stack before I check it.
PS: And I'd really prefer to have discussions of the larger problem over in the thread for that. viewtopic.php?t=129325