Betelgeuse wrote:I have some questions.
When you fire an item event with objFireItemEvent does gItem and gSource get set and reset when it gets returned or is it up to the caller to do those things?
gItem and gSource are set and reset.
Betelgeuse wrote:Given two devices of the same type and data installed on a single ship would they evaluate eq to True?
Given two armors of the same type and data installed on a single ship would they evaluate eq to True?
No, in both cases. The installation location will be different for each item (a different device slot or a different armor segment location).
Betelgeuse wrote:bonus question: In onUninstall is gItem installed. (assuming gItem is the item being uninstalled)
There may be a bug here.
For devices, it is called BEFORE the item is uninstalled. But for armor, it is called just AFTER.
I think for armor I will move the call to before the item is uninstalled.
Note that in either case, the item is in a transition state. The original goal of the OnUninstall event is to give you a hook to undo things that the item did on install (such as add an overlay to the ship). If you try to manipulate the item itself, there probably are bugs and unintended consequences.
Also, in the future I will provide a way to prevent an item from being uninstalled.