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

72 lines
2.6 KiB
Plaintext

--[[
Monkey patch to Bart's Good Ammo Counters script
changes the color of the not used ammo counters to make them invisible
20/11/2020
Anomaly game scripts used as reference: ui_sidhud.script by RavenAscendant
Author: strangerism
--]]
good_mun = "good"
bad_mun = "bad"
very_bad_mun = "verybad"
l = "allume"
dl = "eteint"
clr_list_1 ={}
clr_list_1 = {
["fmj_ammo"] = {
[good_mun] = {allume = GetARGB(255, 113, 160, 99), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},},
["ap_ammo"] = {
[good_mun] = {allume = GetARGB(255, 50, 148, 219), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},},
["third_ammo"] = {
[good_mun] = {allume = GetARGB(255, 196, 196, 196), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},}
}
clr_list_2 ={}
clr_list_2 = {
["fmj_ammo"] = {
[good_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},},
["ap_ammo"] = {
[good_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},},
["third_ammo"] = {
[good_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},
[very_bad_mun] = {allume = GetARGB(255, 255, 255, 255), eteint = GetARGB(0, 255, 255, 255)},},
}
function monkey() end
if ui_bartgac_mcm then
monkey = ui_bartgac_mcm.on_game_start
end
function monkey_on_game_start()
monkey()
printf("[ui_bartgac_mcm] Hey! I have been monkey patched by z_ui_bartgac_mcm")
end
if ui_bartgac_mcm then
ui_bartgac_mcm.clr_list_1 = clr_list_1
ui_bartgac_mcm.clr_list_2 = clr_list_2
end
function on_game_start()
printf("[z_ui_bartgac_mcm] I am monkey patching ui_bartgac_mcm.script")
end