New powerups added to cheat menu
authorLMH <lmh.0013@gmail.com>
Sun, 9 Nov 2014 20:35:29 +0000 (10:35 -1000)
committerLMH <lmh.0013@gmail.com>
Sun, 9 Nov 2014 20:35:29 +0000 (10:35 -1000)
src/supertux/menu/cheat_menu.cpp
src/supertux/menu/cheat_menu.hpp

index f31d80d..a6ea828 100644 (file)
@@ -31,6 +31,8 @@ CheatMenu::CheatMenu()
   add_entry(MNID_GROW, _("Bonus: Grow"));
   add_entry(MNID_FIRE, _("Bonus: Fire"));
   add_entry(MNID_ICE, _("Bonus: Ice"));
+  add_entry(MNID_AIR, _("Bonus: Air"));
+  add_entry(MNID_EARTH, _("Bonus: Earth"));
   add_entry(MNID_STAR, _("Bonus: Star"));
   add_entry(MNID_SHRINK, _("Shrink Tux"));
   add_entry(MNID_KILL, _("Kill Tux"));
@@ -70,6 +72,20 @@ CheatMenu::menu_action(MenuItem* item)
         }
         break;
 
+      case MNID_AIR:
+        if (player)
+        {
+          player->set_bonus(AIR_BONUS);
+        }
+        break;
+
+      case MNID_EARTH:
+        if (player)
+        {
+          player->set_bonus(EARTH_BONUS);
+        }
+        break;
+
       case MNID_STAR:
         if (player)
         {
index 55a147f..02a0a2b 100644 (file)
@@ -26,6 +26,8 @@ private:
     MNID_GROW,
     MNID_FIRE,
     MNID_ICE,
+    MNID_AIR,
+    MNID_EARTH,
     MNID_STAR,
     MNID_SHRINK,
     MNID_KILL,