Divergent/mods/Armsel Protecta Reanimation/gamedata/scripts/uni_anim_ammo.script

12 lines
369 B
Plaintext
Raw Permalink Normal View History

2024-03-17 20:18:03 -04:00
local common = animation_common
-- Animation: Append with '_ammoX' if weapon has X amount of ammo left
local function anm_ammo(anm_table, item)
local section = item:section()
local ammo_amount = item:get_ammo_in_magazine()
local suffix = "_ammo" .. ammo_amount
common.mutate_anim(anm_table, suffix, section)
end
common.add_anim_mutator(anm_ammo, 3.5)