X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fscripting%2Ffunctions.cpp;h=5b24c92498112b1e0ba64377fa1ea2d40dcca92e;hb=2c60d146e19529ed9037539a12abb6001f850c60;hp=fbff6d8a7dcd71bdf58cb60aa8339c1b05188bd3;hpb=864c93e01ec366f730b3ebad08d5c52d6a9363b6;p=supertux.git diff --git a/src/scripting/functions.cpp b/src/scripting/functions.cpp index fbff6d8a7..5b24c9249 100644 --- a/src/scripting/functions.cpp +++ b/src/scripting/functions.cpp @@ -1,13 +1,22 @@ #include +#include +#include #include "functions.h" #include "script_interpreter.h" +#include "tinygettext/tinygettext.h" +#include "gettext.h" namespace Scripting { -void wait(float seconds) +void set_wakeup_time(float seconds) { - ScriptInterpreter::current()->suspend(seconds); + ScriptInterpreter::current()->set_wakeup_time(seconds); +} + +std::string translate(const std::string& text) +{ + return dictionary_manager.get_dictionary().translate(text); } }