The new needService - does sadly not also cover infantry. its vehicle only.
There is needReload and someAmmo - these are too basic and general
[primary,secondary,pistol,throwMuzzle] = needRearm unit;
Best case you would be able to know if the primary, secondary weapon, pistol or throw muzzle runs out.
Status
- black: all empty
- red: only ammo left in the weapon (no more reload)
- orange: still one magazine
- yellow: only to magazines left
- green: more than two left
Somewhat similar to https://community.bistudio.com/wiki/magazinesAmmoFull but in different form of presentation.
The engine should have already flags and triggers for that with AI shouting on radio or acting upon it (trying to rearm nearby)
Best case also an unit based eventhnandler