Okay, here is a Lua question:
How do I properly find out when a girder (or rubber) has been placed by the player?
Here are some ways which do [i]not[/i] work:
[list]
[*]Using onHogAttack: Useless, it also gets called if a placement attempt has failed (for example on an invalid position).
[*]Using onGearAdd: Also gets called when placement has failed.
[*]Observing the number of girders in inventory for changes: Does not work if the player has infinite girders.[/list]
Hi, I am a Hedgewars developer.