43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
|
--[[
|
||
|
=====================================================================
|
||
|
Addon : Tosox Mini Mods Repo: Talk to Everyone
|
||
|
Link : https://www.moddb.com/mods/stalker-anomaly/addons/tosox-mini-mods-repo/
|
||
|
Author : Tosox
|
||
|
Credits : Great_Day
|
||
|
Date : 31.01.2024
|
||
|
Last Edit : 31.01.2024
|
||
|
=====================================================================
|
||
|
--]]
|
||
|
|
||
|
orig_xr_meet_process_npc_usability = xr_meet.process_npc_usability
|
||
|
xr_meet.process_npc_usability = function(npc)
|
||
|
if (character_community(npc) == "zombied") then
|
||
|
npc:disable_talk()
|
||
|
return
|
||
|
end
|
||
|
|
||
|
if (IsWounded(npc)) then
|
||
|
local st = db.storage[npc:id()]
|
||
|
if (npc:relation(db.actor) >= game_object.enemy and st and st.victim_surrender ~= AC_ID) then
|
||
|
npc:disable_talk()
|
||
|
else
|
||
|
local wounded = db.storage[npc:id()].wounded
|
||
|
if wounded.enable_talk then
|
||
|
npc:enable_talk()
|
||
|
else
|
||
|
npc:disable_talk()
|
||
|
end
|
||
|
end
|
||
|
return
|
||
|
end
|
||
|
|
||
|
-- Special case for doc to force him to talk
|
||
|
if (npc:section() == "mar_smart_terrain_doc_doctor") then
|
||
|
npc:enable_talk()
|
||
|
return
|
||
|
end
|
||
|
|
||
|
-- Override
|
||
|
npc:enable_talk()
|
||
|
end
|