Split control/joystickkeyboardcontroller.?pp
[supertux.git] / data / scripts / console.nut
index 5da3775..16464db 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,27 @@ function finish()
        Level.finish(true);
 }
 
+function edit()
+{
+       Level.edit(true);
+}
+
+function play()
+{
+       Level.edit(false);
+}
+
+function worldmapfinish()
+{
+       save_state();
+       foreach(world in state.worlds) {
+               foreach(levelname, level in world.levels) {
+                       level.solved = true;
+               }
+       }
+       update_worldmap();
+}
+
 function grow()
 {
        sector.Tux.add_bonus("grow");