Update Squirrel to 2.2.2 (although README says 2.2.1)
[supertux.git] / data / scripts / console.nut
index e01540d..5ceec2d 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * This script is loaded into the console script interpreter.
- * You should define shortcuts and helper functions that are usefull for the
+ * You should define shortcuts and helper functions that are useful for the
  * console here
  */
 
@@ -14,6 +14,25 @@ function finish()
        Level.finish(true);
 }
 
+function edit()
+{
+       Level.edit(true);
+}
+
+function play()
+{
+       Level.edit(false);
+}
+
+function worldmapfinish()
+{
+       save_state();
+       foreach(levelname, level in state.worlds[state.world].levels) {
+               level.solved = true;
+       }
+       update_worldmap();
+}
+
 function grow()
 {
        sector.Tux.add_bonus("grow");
@@ -24,6 +43,11 @@ function fire()
        sector.Tux.add_bonus("fireflower");
 }
 
+function ice()
+{
+       sector.Tux.add_bonus("iceflower");
+}
+
 function shrink()
 {
        sector.Tux.add_bonus("none");
@@ -34,6 +58,11 @@ function kill()
        sector.Tux.kill(true);
 }
 
+function lifeup()
+{
+       sector.Tux.add_coins(100);
+}
+
 /**
  * Display a list of functions in the roottable (or in the table specified)
  */