on_pre_build event, but when unable to build
Posted: Sun Jul 24, 2022 7:33 pm
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!
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!