Files
Divergent/mods/Tosox Mini Mods Repo/gamedata/scripts/z_keep_torn_patches.script
T
Rage 376b4b9689 Added New Mods and Profiles Folders
This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
2025-01-14 05:07:53 -05:00

25 lines
985 B
Plaintext

--[[
=====================================================================
Addon : Tosox Mini Mods Repo: Keep Torn Patches
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
Author : Tosox
Date : 19.11.2023
Last Edit : 26.01.2024
=====================================================================
--]]
orig_menu_patch_action = gameplay_disguise.menu_patch_action
gameplay_disguise.menu_patch_action = function(obj)
orig_menu_patch_action(obj)
-- Determine the patch item and give it back if it was torn
local outfit_comm = ini_sys:r_string_ex(obj:section(), "community")
if (outfit_comm) and (outfit_comm ~= "") and (gameplay_disguise.possible_factions[outfit_comm]) then
local patch_section = gameplay_disguise.get_patch(outfit_comm, true)
local is_unpatched = se_load_var(obj:id(), obj:name(), "unpatched")
if (is_unpatched) and (patch_section) then
alife_create_item(patch_section, db.actor)
end
end
end