added commands: "restart" to restart current level, and a placeholder for "quit"
authorMarek Moeckel <wansti@gmx.de>
Sat, 8 Apr 2006 23:53:28 +0000 (23:53 +0000)
committerMarek Moeckel <wansti@gmx.de>
Sat, 8 Apr 2006 23:53:28 +0000 (23:53 +0000)
SVN-Revision: 3274

src/game_session.cpp

index 448ea5e..dd335c5 100644 (file)
@@ -93,7 +93,9 @@ namespace {
          "kill",
          "gotoend",
          "flip",
-         "finish"
+         "finish",
+          "restart",
+          "quit"
   };
 }
 
@@ -405,6 +407,10 @@ GameSession::consoleCommand(std::string command)
     tux.kill(tux.KILL);
     return true;
   }
+  if (command == "restart") {
+    restart_level(true);
+    return true;
+  }
   if (command == "whereami") {
     msg_info("You are at x " << tux.get_pos().x << ", y " << tux.get_pos().y);
     return true;
@@ -432,6 +438,10 @@ GameSession::consoleCommand(std::string command)
               << Sector::current()->camera->get_translation().y);
     return true;
   }
+  if (command == "quit") {
+    msg_info("Please implement me! :-)");
+    return true;
+  }
 
   return false;
 }