When adding items that descend from the item class ItemRadio from a ammo box the command removeItem fails to remove the item. The command removeAllItems does work.
Description
Details
- Legacy ID
- 488574005
- Severity
- Major
- Resolution
- No Bug
- Reproducibility
- Always
- Category
- Inventory
- Create a addon with a weapon item descendant from ItemRadio.
- Add that item to a ammo box.
- Enter game and pick up item from ammo box.
- Execute a removeItem command on that item class on your player.
- Check gear if still there.
This appeared when porting ACRE for A2 to A3.
ACRE uses a "base" item class that descends from ItemRadio (as so people start out with a radio by default since its included on all players) that ACRE then replaces with a uniquely ID'd weapon class name. It checks to see if a base class exists in your inventory, and then it gets a unique ID class, adds that and removes the base class. If ACRE can not remove the base class it can not tell if that is an additional new non-ID radio or if its the original and it fails to work properly.
Event Timeline
Woops, this issue was on my end. Crates were adding Items to TransportWeapons still... not TransportItems.
This can be closed out (though its sort of confusing that Items are in CfgWeapons still, but are handled entirely differently now and prior code still sorta but doesn't work with it... Very confusing).