]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up welcome message newlines 1022/head
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 26 Sep 2022 05:23:33 +0000 (15:23 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 28 Sep 2022 20:00:47 +0000 (06:00 +1000)
qcsrc/client/main.qc
qcsrc/common/mutators/mutator/hook/cl_hook.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc

index 9fc858cdad179673c3166f5b2dde64b496129d79..ff51fb54c5d3d2208c792280356e410ef4806776 100644 (file)
@@ -1431,44 +1431,44 @@ bool net_handle_ServerWelcome()
 
        string msg = GetVersionMessage(hostversion, version_mismatch, version_check);
 
-       msg = strcat(msg, "^8\n\n", strcat(_("Gametype:"), " ^1", MapInfo_Type_ToText(gametype)), "^8\n");
+       msg = strcat(msg, "\n\n", _("Gametype:"), " ^1", MapInfo_Type_ToText(gametype), "\n");
 
-       msg = strcat(msg, "^8\n", _("Map:"), " ^2");
+       msg = strcat(msg, "\n", _("Map:"), " ^2");
        if (world.message == "")
-               msg = strcat(msg, mi_shortname, "^8\n");
+               msg = strcat(msg, mi_shortname, "\n");
        else
        {
                int i = strstrofs(world.message, " by ", 0); // matches _MapInfo_Generate()
                string longname = i >= 0 ? substring(world.message, 0, i) : world.message;
-               msg = strcat(msg, (strcasecmp(longname, mi_shortname) ? strcat(mi_shortname, " ^7// ^2") : ""), longname, "^8\n");
+               msg = strcat(msg, (strcasecmp(longname, mi_shortname) ? strcat(mi_shortname, " ^7// ^2") : ""), longname, "\n");
        }
 
        if (srv_minplayers || srv_maxplayers)
        {
-               msg = strcat(msg, "^8\n", _("This match supports"), " ^5");
+               msg = strcat(msg, "\n", _("This match supports"), " ^5");
                if (srv_minplayers == srv_maxplayers)
-                       msg = strcat(msg, sprintf(_("%d players"), srv_maxplayers), "^8\n");
+                       msg = strcat(msg, sprintf(_("%d players"), srv_maxplayers), "\n");
                else if (srv_minplayers && srv_maxplayers)
-                       msg = strcat(msg, sprintf(_("%d to %d players"), srv_minplayers, srv_maxplayers), "^8\n");
+                       msg = strcat(msg, sprintf(_("%d to %d players"), srv_minplayers, srv_maxplayers), "\n");
                else if (srv_maxplayers)
-                       msg = strcat(msg, sprintf(_("%d players maximum"), srv_maxplayers), "^8\n");
+                       msg = strcat(msg, sprintf(_("%d players maximum"), srv_maxplayers), "\n");
                else
-                       msg = strcat(msg, sprintf(_("%d players minimum"), srv_minplayers), "^8\n");
+                       msg = strcat(msg, sprintf(_("%d players minimum"), srv_minplayers), "\n");
        }
 
        modifications = cons_mid(modifications, ", ", weaponarena_list);
        if(modifications != "")
-               msg = strcat(msg, "^8\n", _("Active modifications:"), " ^3", modifications, "^8\n");
+               msg = strcat(msg, "\n", _("Active modifications:"), " ^3", modifications, "\n");
 
        if (cache_mutatormsg != "")
-               msg = strcat(msg, "\n\n^8", _("Special gameplay tips:"), " ^7", cache_mutatormsg);
+               msg = strcat(msg, "\n", _("Special gameplay tips:"), " ^7", cache_mutatormsg, "\n");
        string mutator_msg = "";
        MUTATOR_CALLHOOK(BuildGameplayTipsString, mutator_msg);
        mutator_msg = M_ARGV(0, string);
        msg = strcat(msg, mutator_msg); // trust that the mutator will do proper formatting
 
        if (motd != "")
-               msg = strcat(msg, "^8\n^9↓ ", _("Server's message"), " ↓^8\n", motd);
+               msg = strcat(msg, "\n^9↓ ", _("Server's message"), " ↓\n", motd);
 
        strcpy(welcome_msg, msg);
        welcome_msg_menu_check_maxtime = time + 1; // wait for menu to load before showing the welcome dialog
index be88853bbf37e2e2cb312367ff86ed90becd8c45..aa055666b2c052453ee85226084f130e89bae1dc 100644 (file)
@@ -9,7 +9,7 @@ MUTATOR_HOOKFUNCTION(cl_hook, BuildGameplayTipsString)
        {
                string key = getcommandkey(_("off-hand hook"), "+hook");
                M_ARGV(0, string) = strcat(M_ARGV(0, string),
-                       "\n\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+                       "\n", sprintf(_("^3grappling hook^8 is enabled, press ^3%s^8 to use it"), key), "\n");
        }
 }
 
index 7f0c8b94ad6d2c3d7924230e818f367860232103..1707e168b3af7163cd3c6f2fd39fde4efab2309d 100644 (file)
@@ -101,7 +101,7 @@ MUTATOR_HOOKFUNCTION(cl_nades, BuildGameplayTipsString)
        {
                string key = getcommandkey(_("drop weapon / throw nade"), "dropweapon");
                M_ARGV(0, string) = strcat(M_ARGV(0, string),
-                       "\n\n", sprintf(_("^3nades^8 are enabled, press ^3%s^8 to use them"), key), "\n");
+                       "\n", sprintf(_("^3nades^8 are enabled, press ^3%s^8 to use them"), key), "\n");
        }
 }
 
index f6b15aeda92f279e9e6172039205972eb9fd3e19..dd30807720d4fc40b392fbf2d3377bfc3083a9ec 100644 (file)
@@ -8,6 +8,6 @@ MUTATOR_HOOKFUNCTION(cl_offhand_blaster, BuildGameplayTipsString)
        {
                string key = getcommandkey(_("off-hand hook"), "+hook");
                M_ARGV(0, string) = strcat(M_ARGV(0, string),
-                       "\n\n", sprintf(_("^3offhand blaster^8 is enabled, press ^3%s^8 to use it"), key), "\n");
+                       "\n", sprintf(_("^3offhand blaster^8 is enabled, press ^3%s^8 to use it"), key), "\n");
        }
 }