Pirate
(Pirate)
August 19, 2016, 12:03pm
859
Sure, my Ammo is all Stackable. But except for the Shotgun Shells or Grenades all Ammo is in Magazines. For example 30 Rounds in one Magazine. Right now i added 2 more Variables to the Inventory Item. AmmoCount as INT what gives the actual Amount of Rounds in the MAG and AmmoType as ENUM. But like i said, now i have to modify all the functions that are handle Use, Drop, Move, Add Items and read out that values and give it to my Equipped Weapon to update the current Ammo.
I was just wondering if there is maybe a easier way to do it with the inventory System.
There is no way to avoid creating the logic for this. Create reusable functions that execute the new logic so you can cleanly integrate the changes into the existing functions.