12 lines
369 B
Plaintext
12 lines
369 B
Plaintext
|
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)
|