Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel
- Added `GM:TTT2PlayDeathScream` hook to cancel or overwrite/change the deathscream sound that plays, when you die (by @NickCloudAT)
- Added support for "toggle_zoom" binds to trigger the radio commands menu (by @TW1STaL1CKY)
- Added option to use right click to enable/disable roles in the role layering menu (by @TimGoll)
- Added option to enable team name next to role name on the HUD (by @milkwxter)

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ if CLIENT then
end,
}

savingKeys.showTeamName = {
typ = "bool",
desc = "label_hud_show_team_name",
default = false,
OnChange = function(slf, bool)
slf:PerformLayout()
slf:SaveData()
end,
}

return table.Copy(savingKeys)
end

Expand Down Expand Up @@ -195,7 +205,11 @@ if CLIENT then
local round_state = gameloop.GetRoundState()

if cactive then
text = L[rd.name]
if self.showTeamName then
text = L[rd.name] .. " (" .. L[client:GetTeam()] .. ")"
else
text = L[rd.name]
end
else
if IsValid(tgt) and tgt:IsPlayer() then
text = tgt:Nick()
Expand Down
4 changes: 4 additions & 0 deletions lua/terrortown/lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,7 @@ L.searchbar_roles_placeholder = "Search roles..."
L.label_menu_search_no_items = "No items matched your search."

L.submenu_roles_overview_title = "Roles Overview (READ ME)"

-- Is there a way to ahve some sort of external file that's possibly-localized?
L.roles_overview_html = [[
<h1>Overview</h1>
Expand Down Expand Up @@ -2691,3 +2692,6 @@ considered. (This is relevant in the presence of forced subroles.)</p>

-- 2025-01-19
L.help_rolelayering_enable = "The red and green border around the icon shows if the role is currently enabled. Right click on an icon to quickly enable/disable that role."

-- 2025-01-20
L.label_hud_show_team_name = "Enable showing team name next to role name"