I see, it is already in, and working.
(Thanks for such quick implementation :hug: )
And one thing to think about: what if magazine capacity is not enough?
Standard magazine capacity is 10 (if I'm correct, my modded one is somehow 17.5)
So consumption of 30 ammo - is it 3 magazines, or is it at most 1 magazine always?
Current behaviour is that the turret consumes a single magazine or everything left in it (even if it is a single bullet) and fires.
It's not necessarily bad (it is convenient for a casual player).
But at least it is worth noting somewhere. (Info near a setting, or here on the mod page).
Or do a rework, if you are feeling like it. (And if the Factorio engine allows this)