Divergent/mods/DynaHUD/gamedata/scripts/z_ammo_check_mp.script

42 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-03-17 20:18:03 -04:00
--[[
Monkey patch to ammo_check script
when running check_ammo it shows the firemode check also if the mod is enabled
20/11/2020
Anomaly game scripts used as reference: ui_sidhud.script by RavenAscendant
Author: strangerism
--]]
function monkey() end
if ammo_check_mcm then
monkey = ammo_check_mcm.check_Ammo
end
function monkey_check_Ammo()
monkey()
-- printf("[ammo_check_mcm] Hey! I have been monkey patched by z_ammo_check_mcm.script")
if magazines then
zzzz_dynahud.dynahud_mags_ui_update_ammocheck(zzzz_dynahud.ACTION.AMMO_CHECK)
else
zzzz_dynahud.weapon_hud_update(zzzz_dynahud.ACTION.AMMO_CHECK)
end
if ish_firemode and zzzz_dynahud.DYNAHUD_DYNAMIC_MAGHUD_WEAPON_CHECK then
ish_firemode.show_firemode()
end
end
if ammo_check_mcm then
ammo_check_mcm.check_Ammo = monkey_check_Ammo
end
function on_game_start()
printf("[z_ui_sidhud_mcm] I am monkey patching ui_sidhud_mcm.script")
if ammo_check_mcm then
printf("Enabling DYNAHUD_AMMOCHECK_SUPPORT")
else
printf("DYNAHUD_AMMOCHECK_SUPPORT not Enabled")
end
end