From Bohemia's comments, it is left ambiguous whether or not TryInsertItem() is supposed to be able to replace items. I think the answer is no, due to the following comment for TryReplaceItem(): "Same as insert, only should allow replacing item at storage slot".
This pull request switches all PURPOSE_LOADOUT_PROXY purposed inserts for replace. No functional difference is expected.
It is a bit more code to do it this way, but I believe that this is more future-proof.
From Bohemia's comments, it is left ambiguous whether or not
TryInsertItem()
is supposed to be able to replace items. I think the answer is no, due to the following comment forTryReplaceItem()
: "Same as insert, only should allow replacing item at storage slot".This pull request switches all
PURPOSE_LOADOUT_PROXY
purposed inserts for replace. No functional difference is expected.It is a bit more code to do it this way, but I believe that this is more future-proof.