added console commands: "cheats", "cmdlist", "numberofthebeast"
authorMarek Moeckel <wansti@gmx.de>
Fri, 7 Apr 2006 10:57:10 +0000 (10:57 +0000)
committerMarek Moeckel <wansti@gmx.de>
Fri, 7 Apr 2006 10:57:10 +0000 (10:57 +0000)
SVN-Revision: 3255

src/game_session.cpp

index 7a124f5..1112cad 100644 (file)
@@ -342,6 +342,17 @@ GameSession::consoleCommand(std::string command)
     return true;
   }
 
+  //TODO: Build command list automatically
+  if (command == "cmdlist") {
+    msg_info("foo, cmdlist, cheats, whereami, camera");
+    return true;
+  }
+  //TODO: remove (or at least hide) this before release
+  if (command == "cheats") {
+    msg_info("grow, fire, ice, lifeup, numberofthebeast, lifedown, grease,\ninvincible, mortal, shrink, kill, gotoend, flip, finish");
+    return true;
+  } 
+
   if (currentsector == 0) return false;
   Player& tux = *currentsector->player;
   
@@ -363,6 +374,10 @@ GameSession::consoleCommand(std::string command)
     player_status->lives++;
     return true;
   }
+  if (command == "numberofthebeast") {
+    player_status->lives = 55;
+    return true;
+  }
   if (command == "lifedown") {
     player_status->lives--;
     return true;