So, I've got a couple of things that would be insanely useful for mod devs that use it.
If not many, than at least one other dev that is trying to do the same thing I am.
-
event.player - The player that queued the event.
- As far as I'm aware, a non-player can't mark something for deconstruction.
This is where mods will probably break that assumption, but it'd be fairly simple to provide a helper script for mods wanting to mark something for deconstruction, as the event will require these values. -
event.item - The item that was in hand, or used directly to mark the entity for deconstruction.
- This might not even be necessary, as we can retrieve it from the player that marked the entities, but I thought to include it for sake of posterity.
This results in poor gameplay, and a shockingly amount of workarounds from each mod that wants an item that highlights an area, to constantly make sure that it has a list of all possible items that it could collide with from other mods.
You might be able to go one step further, and when registering the event handler, take in an item name that is compared against the item that is used, and then only pass in the events from that item.
You could even go one layer out, and create an item that isn't a deconstructor, and highlights the area. Same as the deconstructor, except, when creating the item, providing a callback for all entities that were marked because of the item.
Either way, I hope that once you've gotten through this massive wall of text, that you see that I would greatly appreciate anyone looking into this, and maybe even coming up with a better solution than these.
Thanks for reading.