From c19e6a8536685865df2e0a7c9e4fae41ea1a81ed Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Sat, 20 Mar 2021 18:26:51 +0100 Subject: [PATCH] Enhanced chat message user display --- qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc | 7 +++---- qcsrc/common/notifications/all.inc | 10 ++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc b/qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc index b101dd8eb..9159544e2 100644 --- a/qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc +++ b/qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc @@ -17,8 +17,6 @@ float autocvar_g_ttt_karma_bantime = 1800; //karma ban seconds //Ideas: skills/items per each player-type: (these skills/items should be used once) // Innocents: Shield and Strength; Traitors: Shield and Strength; Detectives: skill to detect any player to see what player-type is -//TODO: Add force to spec, kick and ban for low karma points 27-02-2021 - // Detective is a created team, this team is added inside Innocents team //TODO: @@ -324,19 +322,20 @@ void ttt_RoundStart() if(it.ttt_status == TTT_STATUS_INNOCENT) { Send_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CENTER_TTT_INNOCENT); + Send_Notification(NOTIF_ONE_ONLY, it, MSG_INFO, INFO_TTT_INNOCENT); //PrintToChatAll(sprintf("^1DEBUG^7: %s is ^2Innocent^7!", it.netname)); } else if(it.ttt_status == TTT_STATUS_TRAITOR) { Send_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CENTER_TTT_TRAITOR); + Send_Notification(NOTIF_ONE_ONLY, it, MSG_INFO, INFO_TTT_TRAITOR); //PrintToChatAll(sprintf("^1DEBUG^7: %s is ^1Traitor^7!", it.netname)); } else if(it.ttt_status == TTT_STATUS_DETECTIVE) { Send_Notification(NOTIF_ONE_ONLY, it, MSG_CENTER, CENTER_TTT_DETECTIVE); + Send_Notification(NOTIF_ONE_ONLY, it, MSG_INFO, INFO_TTT_DETECTIVE); PrintToChatAll(sprintf("%s is ^4Detective^7!", it.netname)); - //see the possibilities in qcsrc/server/chat.qc and qcrsc/server/chat.qh - //Say(it, false, it, sprintf("%s is ^4Detective^7!", it.netname), true); } ttt_FakeTimeLimit(it, round_handler_GetEndTime()); diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index b81c2503a..7a43de5a9 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -440,8 +440,16 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != MSG_INFO_NOTIF(TEAMCHANGE_LARGERTEAM, N_CONSOLE, 0, 0, "", "", "", _("^BGYou cannot change to a larger team"), "") MSG_INFO_NOTIF(TEAMCHANGE_NOTALLOWED, N_CONSOLE, 0, 0, "", "", "", _("^BGYou are not allowed to change teams"), "") //LegendGuard adds MSG_INFO_NOTIF for TTT 20-02-2021 + //LegendGuard adds N_CHATCON option 20-03-2021 + MSG_INFO_NOTIF(TTT_TRAITOR, N_CHATCON, 0, 0, "", "", "", _("^BGYou are ^K1Traitor^BG!"), "") MSG_INFO_NOTIF(TTT_TRAITOR_WIN, N_CONSOLE, 0, 0, "", "", "", _("^K1Traitors^BG win the round"), "") + + //LegendGuard adds N_CHATCON option 20-03-2021 + MSG_INFO_NOTIF(TTT_INNOCENT, N_CHATCON, 0, 0, "", "", "", _("^BGYou are ^F1Innocent^BG!"), "") MSG_INFO_NOTIF(TTT_INNOCENT_WIN, N_CONSOLE, 0, 0, "", "", "", _("^F1Innocents^BG win the round"), "") + + //LegendGuard adds N_CHATCON option 20-03-2021 + MSG_INFO_NOTIF(TTT_DETECTIVE, N_CHATCON, 0, 0, "", "", "", _("^BGYou are ^4Detective^BG!"), "") MSG_INFO_NOTIF(VERSION_BETA, N_CONSOLE, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s"), "") MSG_INFO_NOTIF(VERSION_OLD, N_CHATCON, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s"), "") @@ -776,8 +784,10 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input != //LegendGuard adds MSG_CENTER_NOTIF for TTT 20-02-2021 MSG_CENTER_NOTIF(TTT_TRAITOR, N_ENABLE, 0, 0, "", CPID_TTT, "5 0", strcat(BOLD_OPERATOR, _("^BGYou are ^K1Traitor^BG! Kill all the innocents without raising suspicion!")), "") MSG_CENTER_NOTIF(TTT_TRAITOR_WIN, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^K1Traitors^BG win the round"), "") + MSG_CENTER_NOTIF(TTT_INNOCENT, N_ENABLE, 0, 0, "", CPID_TTT, "5 0", strcat(BOLD_OPERATOR, _("^BGYou are ^F1Innocent^BG! Try to find out who are traitors and survive until time is up!")), "") MSG_CENTER_NOTIF(TTT_INNOCENT_WIN, N_ENABLE, 0, 0, "", CPID_ROUND, "0 0", _("^F1Innocents^BG win the round"), "") + MSG_CENTER_NOTIF(TTT_DETECTIVE, N_ENABLE, 0, 0, "", CPID_TTT, "5 0", strcat(BOLD_OPERATOR, _("^BGYou are ^4Detective^BG! Find out who are traitors and protect the innocents!")), "") MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME, N_ENABLE, 0, 0, "", CPID_Null, "0 0", _("^K1Cannot join given minigame session!"), "" ) -- 2.39.2