From afb0c1885fa5b3a82fd31142992a7d0b6321a08c Mon Sep 17 00:00:00 2001 From: Histalek <16392835+Histalek@users.noreply.github.com> Date: Wed, 27 Nov 2024 19:19:04 +0100 Subject: [PATCH] fix(targetid): Respect enabled `ttt_identify_body_woconfirm` (#1684) Before this change when looking at a corpse targetID would show the same hint whether `ttt_identify_body_woconfirm` was enabled or not. This change introduces a new language string that does neither mention corpse confirmation nor searching covertly. --- CHANGELOG.md | 1 + lua/terrortown/lang/en.lua | 3 +++ lua/ttt2/libraries/targetid.lua | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ff1bdfc..f0ed36923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel - Fixed spectating player still being visible through thermalvision after killing that player (by @MrXonte) - Fixed Magneto-stick not using C_Hands (by @SvveetMavis) - Fixed console error when dropping ammo for weapons with no AmmoEnt (by @MrXonte) +- Fixed the targetID corpse hint not respecting `ttt_identify_body_woconfirm` (by @Histalek) - Fixed the beacon not being properly translated when placed (by @Histalek) ### Changed diff --git a/lua/terrortown/lang/en.lua b/lua/terrortown/lang/en.lua index 45fac3b72..64a67752f 100644 --- a/lua/terrortown/lang/en.lua +++ b/lua/terrortown/lang/en.lua @@ -2366,3 +2366,6 @@ L.label_loadingscreen_min_duration = "Minimum loading screen display time" L.label_keyhelper_leave_vehicle = "leave vehicle" L.name_vehicle = "Vehicle" L.vehicle_enter = "Press [{usekey}] to enter vehicle" + +-- 2024-11-27 +L.corpse_hint_without_confirm = "Press [{usekey}] to search." diff --git a/lua/ttt2/libraries/targetid.lua b/lua/ttt2/libraries/targetid.lua index 38d85e834..6179c2fc3 100644 --- a/lua/ttt2/libraries/targetid.lua +++ b/lua/ttt2/libraries/targetid.lua @@ -560,6 +560,11 @@ function targetid.HUDDrawTargetIDRagdolls(tData) then tData:SetSubtitle(ParT("corpse_hint_inspect_limited", key_params)) tData:AddDescriptionLine(TryT("corpse_hint_inspect_limited_details")) + elseif + bodysearch.GetInspectConfirmMode() == 0 + and not GetConVar("ttt_identify_body_woconfirm"):GetBool() + then + tData:SetSubtitle(ParT("corpse_hint_without_confirm", key_params)) else tData:SetSubtitle(ParT("corpse_hint", key_params)) end