62 lines
10 KiB
Plaintext
62 lines
10 KiB
Plaintext
|
-- StatsDisplay - Nitpicker's Modpack
|
||
|
-- Last modified: 2021.10.13
|
||
|
-- https://github.com/Ishmaeel/NitpickerModpack
|
||
|
--
|
||
|
-- This is the earthly remains of an older compatibility patch for the addons below.
|
||
|
-- The actual patch code here was moved into the main StatsDisplay script. This file now exists only for backward compatibility.
|
||
|
--
|
||
|
-- -- "Outfits Affect Movespeed" (https://www.moddb.com/mods/stalker-anomaly/addons/outfits-affect-movespeed-update-5)
|
||
|
-- -- "Outfit Parts and Repair Overhaul" (https://www.moddb.com/mods/stalker-anomaly/addons/outfit-parts-and-repair-overhaul)
|
||
|
--
|
||
|
-- StatsDisplay patches the patching done by OAM/OPO and then patches itself to patch back the functionality patched in by OAM/OPO that was patched out by this patch.
|
||
|
-- If your copy of "monke_patch_ui.script" does not look like the OG versions provided below, then your OAM/OPO is a different version and the patch may need patching.
|
||
|
--[[ BEGIN OAM "monke_patch_ui.script"
|
||
|
|
||
|
-- Patching script for utils_ui to inject fields into outfit without causing conflicts with other addons doing the same thing.
|
||
|
|
||
|
old_prep_table = utils_ui.prepare_stats_table
|
||
|
|
||
|
function utils_ui.prepare_stats_table()
|
||
|
old_prep_table()
|
||
|
utils_ui.stats_table["outfit"] = {
|
||
|
["fire_wound_protection"] = { index= 1, typ= "float", name= "ui_inv_outfit_fire_wound_protection", icon_p= "ui_am_propery_01", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","max_fire_wound_protection")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "FireWound"}},
|
||
|
["burn_protection"] = { index= 2, typ= "float", name= "ui_inv_outfit_burn_protection", icon_p= "ui_am_prop_thermo", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","fire_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Burn"} },
|
||
|
["shock_protection"] = { index= 3, typ= "float", name= "ui_inv_outfit_shock_protection", icon_p= "ui_am_prop_electro", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","electra_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Shock"}},
|
||
|
["chemical_burn_protection"] = { index= 4, typ= "float", name= "ui_inv_outfit_chemical_burn_protection", icon_p= "ui_am_prop_chem", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","acid_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "ChemicalBurn"}},
|
||
|
["radiation_protection"] = { index= 5, typ= "float", name= "ui_inv_outfit_radiation_protection", icon_p= "ui_am_propery_09", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","radio_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Radiation"}},
|
||
|
["telepatic_protection"] = { index= 6, typ= "float", name= "ui_inv_outfit_telepatic_protection", icon_p= "ui_am_propery_11", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","psi_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Telepatic"}},
|
||
|
["wound_protection"] = { index= 7, typ= "float", name= "ui_inv_outfit_wound_protection", icon_p= "ui_am_prop_wound", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","max_wound_protection")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Wound"}},
|
||
|
["strike_protection"] = { index= 8, typ= "float", name= "ui_inv_outfit_strike_protection", icon_p= "ui_am_prop_strike", icon_n= "", track= true, magnitude= 1, unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Strike"}},
|
||
|
["explosion_protection"] = { index= 9, typ= "float", name= "ui_inv_outfit_explosion_protection", icon_p= "ui_am_prop_explo", icon_n= "", track= true, magnitude= 1, unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Explosion"}},
|
||
|
["artefact_count"] = { index= 10, typ= "float", name= "ui_inv_outfit_artefact_count", icon_p= "ui_am_prop_artefact",icon_n= "", track= false, magnitude= 1, unit= "", compare= false, sign= false,show_always= true , value_functor= {"utils_item","get_outfit_belt_size"}},
|
||
|
["additional_inventory_weight"]= { index= 11, typ= "float", name= "ui_inv_outfit_additional_weight", icon_p= "ui_am_propery_08", icon_n= "ui_am_prop_carry_weight_negative", track= false, magnitude= 1, unit= "st_kg", compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_property", "additional_inventory_weight"}},
|
||
|
["speed_modifier"] = { index= 12, typ= "float", name= "ui_inv_outfit_speed", icon_p= "ui_am_prop_sprint", icon_n= "", track= false, magnitude= 100, unit= "%", compare= false, sign= false, show_always= false , value_functor= {"outfit_speed","get_outfit_speed"}},
|
||
|
}
|
||
|
end
|
||
|
|
||
|
--[[ END OAM "monke_patch_ui.script" ]] --[[ BEGIN OPO "monke_patch_ui.script"
|
||
|
|
||
|
-- Patching script for utils_ui to inject fields into outfit without causing conflicts with other addons doing the same thing.
|
||
|
|
||
|
old_prep_table = utils_ui.prepare_stats_table
|
||
|
|
||
|
function utils_ui.prepare_stats_table()
|
||
|
old_prep_table()
|
||
|
utils_ui.stats_table["outfit"] = {
|
||
|
["max_condition"] = { index= 1, typ= "float", name= "ui_inv_max_condition", icon_p= "ui_am_propery_01", icon_n= "", track= false, magnitude= 1, unit= "%", compare= false, sign= false, show_always= false , value_functor= {"arti_outfits","get_max_condition"}},
|
||
|
["fire_wound_protection"] = { index= 2, typ= "float", name= "ui_inv_outfit_fire_wound_protection", icon_p= "ui_am_propery_01", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","max_fire_wound_protection")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "FireWound"}},
|
||
|
["burn_protection"] = { index= 3, typ= "float", name= "ui_inv_outfit_burn_protection", icon_p= "ui_am_prop_thermo", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","fire_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Burn"} },
|
||
|
["shock_protection"] = { index= 4, typ= "float", name= "ui_inv_outfit_shock_protection", icon_p= "ui_am_prop_electro", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","electra_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Shock"}},
|
||
|
["chemical_burn_protection"] = { index= 5, typ= "float", name= "ui_inv_outfit_chemical_burn_protection", icon_p= "ui_am_prop_chem", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","acid_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "ChemicalBurn"}},
|
||
|
["radiation_protection"] = { index= 6, typ= "float", name= "ui_inv_outfit_radiation_protection", icon_p= "ui_am_propery_09", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","radio_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Radiation"}},
|
||
|
["telepatic_protection"] = { index= 7, typ= "float", name= "ui_inv_outfit_telepatic_protection", icon_p= "ui_am_propery_11", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","psi_zone_max_power")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Telepatic"}},
|
||
|
["wound_protection"] = { index= 8, typ= "float", name= "ui_inv_outfit_wound_protection", icon_p= "ui_am_prop_wound", icon_n= "", track= true, magnitude= (1/SYS_GetParam(2,"actor_condition","max_wound_protection")), unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Wound"}},
|
||
|
["strike_protection"] = { index= 9, typ= "float", name= "ui_inv_outfit_strike_protection", icon_p= "ui_am_prop_strike", icon_n= "", track= true, magnitude= 1, unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Strike"}},
|
||
|
["explosion_protection"] = { index= 10, typ= "float", name= "ui_inv_outfit_explosion_protection", icon_p= "ui_am_prop_explo", icon_n= "", track= true, magnitude= 1, unit= "", condition= true, compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_protection", "Explosion"}},
|
||
|
["artefact_count"] = { index= 11, typ= "float", name= "ui_inv_outfit_artefact_count", icon_p= "ui_am_prop_artefact",icon_n= "", track= false, magnitude= 1, unit= "", compare= false, sign= false,show_always= true , value_functor= {"utils_item","get_outfit_belt_size"}},
|
||
|
["additional_inventory_weight"]= { index= 12, typ= "float", name= "ui_inv_outfit_additional_weight", icon_p= "ui_am_propery_08", icon_n= "ui_am_prop_carry_weight_negative", track= false, magnitude= 1, unit= "st_kg", compare= false, sign= true, show_always= true , value_functor= {"utils_item","get_outfit_property", "additional_inventory_weight"}},
|
||
|
}
|
||
|
end
|
||
|
|
||
|
--[[ END OPO "monke_patch_ui.script" ]]
|