diff --git a/src/scripting/level.cpp b/src/scripting/level.cpp index 07029796ee2..7dd55fcfaed 100644 --- a/src/scripting/level.cpp +++ b/src/scripting/level.cpp @@ -30,7 +30,7 @@ Level_finish(bool win) } bool -Level_end_sequence_started() +Level_has_active_sequence() { SCRIPT_GUARD_GAMESESSION(false); return game_session.get_end_sequence(); diff --git a/src/scripting/level.hpp b/src/scripting/level.hpp index 8cbbf3c8fe8..4ec5b94b6f4 100644 --- a/src/scripting/level.hpp +++ b/src/scripting/level.hpp @@ -51,14 +51,10 @@ class Level * @param bool $win If ""true"", the level is marked as completed if launched from a worldmap. */ void Level_finish(bool win); -/** - * Returns whether the current level has ended. - */ -bool Level_is_finished(); /** * Gets whether an end sequence has started. (AKA when the stats at the end are visible) */ -bool Level_end_sequence_started(); +bool Level_has_active_sequence(); /** * Respawns Tux in sector named ""sector"" at spawnpoint named ""spawnpoint"".${SRG_TABLENEWPARAGRAPH} diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp index 618384e9acc..e001776b2d0 100644 --- a/src/scripting/wrapper.cpp +++ b/src/scripting/wrapper.cpp @@ -12530,11 +12530,11 @@ static SQInteger Level_finish_wrapper(HSQUIRRELVM vm) } -static SQInteger Level_is_finished_wrapper(HSQUIRRELVM vm) +static SQInteger Level_has_active_sequence_wrapper(HSQUIRRELVM vm) { try { - bool return_value = scripting::Level_is_finished(); + bool return_value = scripting::Level_has_active_sequence(); sq_pushbool(vm, return_value); return 1; @@ -12543,7 +12543,7 @@ static SQInteger Level_is_finished_wrapper(HSQUIRRELVM vm) sq_throwerror(vm, e.what()); return SQ_ERROR; } catch(...) { - sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_is_finished'")); + sq_throwerror(vm, _SC("Unexpected exception while executing function 'Level_has_active_sequence'")); return SQ_ERROR; } @@ -14018,11 +14018,11 @@ void register_supertux_wrapper(HSQUIRRELVM v) throw SquirrelError(v, "Couldn't register function 'Level_finish'"); } - sq_pushstring(v, "Level_is_finished", -1); - sq_newclosure(v, &Level_is_finished_wrapper, 0); + sq_pushstring(v, "Level_has_active_sequence", -1); + sq_newclosure(v, &Level_has_active_sequence_wrapper, 0); sq_setparamscheck(v, SQ_MATCHTYPEMASKSTRING, "."); if(SQ_FAILED(sq_createslot(v, -3))) { - throw SquirrelError(v, "Couldn't register function 'Level_is_finished'"); + throw SquirrelError(v, "Couldn't register function 'Level_has_active_sequence'"); } sq_pushstring(v, "Level_spawn", -1);