Shootable Weapon - Can Equip Empty Item

nathanj

Active member
On the ShootableWeapon script, I believe the "Can Equip Empty Item" checks the inventory.GetItemIdentifierAmount but wouldn't it be better to check the usableItem.GetConsumableItemIdentifierAmount instead?

I could be wrong about this, but I'm trying to equip a weapon that only ever has a single ammo amount.

Thanks,
Nathan
 
You're referring to the logic within ItemSetManagerBase? I will need to think about this one some more and what is right for a ShootableWeapon.
 
Edit, on second thought, if it's a hassle I can get around this after some thought.

Yeah, that's where it is.
Code:
if (!usableItem.CanEquipEmptyItem && usableItem.GetConsumableItemIdentifier() != null && m_Inventory.GetItemIdentifierAmount(usableItem.GetConsumableItemIdentifier()) == 0) {

If there could be an Or check to see if the usable weapon has 1 consumable and if so allow the item to be equipped.
 
Last edited:
Top