Change on_pre_build for power poles built by dragging
Posted: Thu Jan 28, 2021 8:56 pm
When dragging a power pole, on_pre_build is fired for every position that the player's cursor moves over, without regard for whether a power pole is actually built. There doesn't appear to be any way in Lua to detect whether the placement will result in a power pole being built.
I can work around this by "delaying" the event and checking if an entity was actually created, but this is a very dirty hack and it would be nice to have a "proper" way to detect this.
I can work around this by "delaying" the event and checking if an entity was actually created, but this is a very dirty hack and it would be nice to have a "proper" way to detect this.