hedgewars/uCommandHandlers.pas
changeset 13459 08a3851aaf67
parent 13107 7b3bc9a4dfb9
child 13461 854caa3c9212
--- a/hedgewars/uCommandHandlers.pas	Tue Jul 10 15:20:19 2018 +0200
+++ b/hedgewars/uCommandHandlers.pas	Tue Jul 10 16:07:11 2018 +0200
@@ -834,6 +834,19 @@
   cAdvancedMapGenMode:= true;
 end;
 
+procedure chShowMission_p(var s: shortstring);
+begin
+  s:= s; // avoid compiler hint
+  isShowMission:= true;
+end;
+
+procedure chShowMission_m(var s: shortstring);
+begin
+  s:= s; // avoid compiler hint
+  isShowMission:= false;
+  HideMission();
+end;
+
 procedure initModule;
 begin
 //////// Begin top sorted by freq analysis not including chatmsg
@@ -922,6 +935,8 @@
     RegisterVariable('record'  , @chRecord       , true );
     RegisterVariable('worldedge',@chWorldEdge    , false);
     RegisterVariable('advmapgen',@chAdvancedMapGenMode, false);
+    RegisterVariable('+mission', @chShowMission_p, true);
+    RegisterVariable('-mission', @chShowMission_m, true);
 end;
 
 procedure freeModule;