diff options
Diffstat (limited to 'src/cat/TPTScriptInterface.cpp')
| -rw-r--r-- | src/cat/TPTScriptInterface.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index 2f250a5..7f15566 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -82,6 +82,8 @@ ValueType TPTScriptInterface::testType(std::string word) return TypeFunction; else if(word == "bubble") return TypeFunction; + else if(word == "quit") + return TypeFunction; //Basic type parseNumber: for(i = 0; i < word.length(); i++) @@ -129,6 +131,8 @@ AnyType TPTScriptInterface::eval(std::deque<std::string> * words) return tptS_reset(words); else if(word == "bubble") return tptS_bubble(words); + else if(word == "quit") + return tptS_quit(words); break; case TypeNumber: return NumberType(atoi(rawWord)); @@ -467,6 +471,13 @@ AnyType TPTScriptInterface::tptS_reset(std::deque<std::string> * words) return NumberType(0); } +AnyType TPTScriptInterface::tptS_quit(std::deque<std::string> * words) +{ + ui::Engine::Ref().Exit(); + + return NumberType(0); +} + TPTScriptInterface::~TPTScriptInterface() { } |
