]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Enhanced chat message user display
authorLegendaryGuard <theasixchan777@gmail.com>
Sat, 20 Mar 2021 17:26:51 +0000 (18:26 +0100)
committerLegendaryGuard <theasixchan777@gmail.com>
Sat, 20 Mar 2021 17:26:51 +0000 (18:26 +0100)
qcsrc/common/gamemodes/gamemode/ttt/sv_ttt.qc
qcsrc/common/notifications/all.inc

index b101dd8eb5a48bedcf01ea8893fd759e80c7e7e4..9159544e2a0b8634173344d05abef222798a2219 100644 (file)
@@ -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());
index b81c2503a0ee82035282e73a40e8f2eff365fff8..7a43de5a9d4ed675cdb165829a04358a5da1e3c2 100644 (file)
@@ -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!"), "" )