From: bones_was_here Date: Mon, 26 Sep 2022 05:23:33 +0000 (+1000) Subject: Clean up welcome message newlines X-Git-Tag: xonotic-v0.8.6~348^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fc92629a9ccbfda1a921093f489153c7d5445c1f;p=xonotic%2Fxonotic-data.pk3dir.git Clean up welcome message newlines --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 9fc858cda..ff51fb54c 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -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 diff --git a/qcsrc/common/mutators/mutator/hook/cl_hook.qc b/qcsrc/common/mutators/mutator/hook/cl_hook.qc index be88853bb..aa055666b 100644 --- a/qcsrc/common/mutators/mutator/hook/cl_hook.qc +++ b/qcsrc/common/mutators/mutator/hook/cl_hook.qc @@ -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"); } } diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 7f0c8b94a..1707e168b 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -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"); } } diff --git a/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc b/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc index f6b15aeda..dd3080772 100644 --- a/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc +++ b/qcsrc/common/mutators/mutator/offhand_blaster/cl_offhand_blaster.qc @@ -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"); } }