diff options
| author | jacob1 <jfu614@gmail.com> | 2012-10-20 20:02:42 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-26 14:15:52 (GMT) |
| commit | 3ad7cf4539ee1e4cd7b700200722cfd39c9006bc (patch) | |
| tree | f53a2c6a5d69ef139eaefe647031e3010c1150a3 /src/cat/TPTScriptInterface.cpp | |
| parent | 5ef6bd8507becc26c72dbb4d3acb89c68a7c865a (diff) | |
| download | powder-3ad7cf4539ee1e4cd7b700200722cfd39c9006bc.zip powder-3ad7cf4539ee1e4cd7b700200722cfd39c9006bc.tar.gz | |
!quit function
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() { } |
