I don't know if it is already done this way, but has anyone considered defining a few generic ammo functions and then simply using those? .hasAmmo(%type) .useAmmo(%type) .addAmmo(%type) .depleteAmmo(%type), each with an optional number, defaulting to 1 if ommited, and returning the ammount of ammo actually used/added/removed?
Then, adding the condition of "must have ammo to fire" without a clip system, would be, in pseudocode,
ammoitem::onpickup
%player.addAmmo(%type, %contents)
gunimage::onfire
if(%player.useAmmo("gunshells"))
parent::onfire
else
tellPlayer("Not enough ammo")