X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=data%2Fscripts%2Fconsole.nut;h=5ceec2d0e9d57c002e43d6028d51ce9a10adc54c;hb=80acfab92ae7bdb38609bb74565ccac5dd329a2b;hp=ff411c04c57ced543090d87c267eb4c2afc239a6;hpb=690ac9e5920c8d3dd0a8a14a7bd163eaf52ce689;p=supertux.git diff --git a/data/scripts/console.nut b/data/scripts/console.nut index ff411c04c..5ceec2d0e 100644 --- a/data/scripts/console.nut +++ b/data/scripts/console.nut @@ -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,55 @@ 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"); +} + +function fire() +{ + sector.Tux.add_bonus("fireflower"); +} + +function ice() +{ + sector.Tux.add_bonus("iceflower"); +} + +function shrink() +{ + sector.Tux.add_bonus("none"); +} + +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) */