Skip to content

Commit

Permalink
fix(targetid): Respect enabled ttt_identify_body_woconfirm (#1684)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Histalek authored Nov 27, 2024
1 parent 4d400d9 commit afb0c18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lua/terrortown/lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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."
5 changes: 5 additions & 0 deletions lua/ttt2/libraries/targetid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit afb0c18

Please sign in to comment.