on_pre_build event, but when unable to build

Things that we aren't going to implement
Post Reply
Emjas
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri May 19, 2017 8:30 pm
Contact:

on_pre_build event, but when unable to build

Post by Emjas »

Hello,

I'm looking to create a mod where, when placing a blueprint, if there are entity or tile collisions, it will deconstruct what is existing there first. I know it is easy to deconstruct first manually; so it's obviously low-priority, but just a very mild QoL sort of change.

However, when playing around with the `on_*` events (actually, I created a handler for every one listed in the API to check), no event is raised when attempting to build a blueprint where it intersects (it shows the "<entity> is in the way" floating message on the screen briefly, unless shift is held in which case it shows nothing but does not build).

on_pre_build could have an additional status of "is_buildable" or an entirely different event, on_pre_build_collision or something would avoid causing issues with any existing on_pre_build usage.

Thanks for the excellent game!

Lukas0120
Inserter
Inserter
Posts: 23
Joined: Fri Jun 20, 2014 11:24 am
Contact:

Re: on_pre_build event, but when unable to build

Post by Lukas0120 »

I need this (or something similar), I want to make a mod that automatically places ghosts of buildings on landfill, once the landfill has been build. To do that I need a way to detect when you try and fail to place an entity, including information about what you where trying to place including things like filters and stuff, why it failed to place and where it should have been placed. Maybe something like on_try_build?

Anfilt
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Oct 02, 2022 8:02 pm
Contact:

Re: on_pre_build event, but when unable to build

Post by Anfilt »

I will add I kinda have been wanting something similar hence this post here: viewtopic.php?f=28&t=103637

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: on_pre_build event, but when unable to build

Post by Rseding91 »

If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Won't implement”