Display error when entering invalid chat command in offline game
authorWuzzy <Wuzzy2@mail.ru>
Wed, 03 Oct 2018 03:24:03 +0200
changeset 13824 93aa09004d36
parent 13823 d012948b1eda
child 13825 5d58fce48b1d
Display error when entering invalid chat command in offline game
hedgewars/uChat.pas
hedgewars/uTypes.pas
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/en.txt
--- a/hedgewars/uChat.pas	Wed Oct 03 02:28:39 2018 +0200
+++ b/hedgewars/uChat.pas	Wed Oct 03 03:24:03 2018 +0200
@@ -604,6 +604,8 @@
 
     if (gameType = gmtNet) then
         SendConsoleCommand(s)
+    else
+        AddChatString(#0 + trcmd[sidCmdUnknown]);
     end
 else
     begin
--- a/hedgewars/uTypes.pas	Wed Oct 03 02:28:39 2018 +0200
+++ b/hedgewars/uTypes.pas	Wed Oct 03 03:24:03 2018 +0200
@@ -503,7 +503,7 @@
             sidCmdHeaderTaunts, sidCmdSpeech, sidCmdThink, sidCmdYell,
             sidCmdSpeechNumberHint, sidCmdHsa, sidCmdHta, sidCmdHya,
             sidCmdHurrah, sidCmdIlovelotsoflemonade, sidCmdJuggle,
-            sidCmdRollup, sidCmdShrug, sidCmdWave);
+            sidCmdRollup, sidCmdShrug, sidCmdWave, sidCmdUnknown);
 
     // Events that are important for the course of the game or at least interesting for other reasons
     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
--- a/share/hedgewars/Data/Locale/de.txt	Wed Oct 03 02:28:39 2018 +0200
+++ b/share/hedgewars/Data/Locale/de.txt	Wed Oct 03 03:24:03 2018 +0200
@@ -1422,3 +1422,4 @@
 06:23=/rollup: Igel sich einigeln lassen
 06:24=/shrug: Igel mit den Achseln zucken lassen
 06:25=/wave: Igel winken lassen
+06:26=Unbekannter Befehl oder ungültige Parameter. Sag »/help« im Chat für eine Liste an Befehlen.
--- a/share/hedgewars/Data/Locale/en.txt	Wed Oct 03 02:28:39 2018 +0200
+++ b/share/hedgewars/Data/Locale/en.txt	Wed Oct 03 03:24:03 2018 +0200
@@ -1325,3 +1325,4 @@
 06:23=/rollup: Make hedgehog roll up
 06:24=/shrug: Make hedgehog shrug
 06:25=/wave: Make hedgehog wave its hand
+06:26=Unknown command or invalid parameters. Say “/help” in chat for a list of commands.