From 0d31f59b124658155bf93ca78eb427a98c664572 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 26 Dec 2013 18:50:05 +0100 Subject: .takeoff() for SpaceShip (#265) --- src/script/cbottoken.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/script/cbottoken.cpp') diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 505228e..9f99752 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -253,10 +253,11 @@ std::string GetHelpFilename(const char *token) if ( strcmp(token, "getresearchenable" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/getresen.txt"); if ( strcmp(token, "getresearchdone" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/getresdo.txt"); if ( strcmp(token, "retobject" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/retobj.txt"); - if ( strcmp(token, "progfunc" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/factory.txt"); - if ( strcmp(token, "busy" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/busy.txt"); - if ( strcmp(token, "factory" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/factory.txt"); + if ( strcmp(token, "progfunc" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/factory.txt"); + if ( strcmp(token, "busy" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/busy.txt"); + if ( strcmp(token, "takeoff" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/takeoff.txt"); if ( strcmp(token, "research" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/research.txt"); + if ( strcmp(token, "factory" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/factory.txt"); if ( strcmp(token, "destroy" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/destroy.txt"); if ( strcmp(token, "search" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/search.txt"); if ( strcmp(token, "radar" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/radar.txt"); @@ -384,6 +385,7 @@ bool IsFunction(const char *token) if ( strcmp(token, "busy" ) == 0 ) return true; if ( strcmp(token, "factory" ) == 0 ) return true; if ( strcmp(token, "research" ) == 0 ) return true; + if ( strcmp(token, "takeoff" ) == 0 ) return true; if ( strcmp(token, "destroy" ) == 0 ) return true; if ( strcmp(token, "search" ) == 0 ) return true; if ( strcmp(token, "radar" ) == 0 ) return true; @@ -477,6 +479,7 @@ const char* GetHelpText(const char *token) if ( strcmp(token, "busy" ) == 0 ) return "object.busy ( );"; if ( strcmp(token, "factory" ) == 0 ) return "object.factory ( cat, program );"; if ( strcmp(token, "research" ) == 0 ) return "object.research ( type );"; + if ( strcmp(token, "takeoff" ) == 0 ) return "object.takeoff ( );"; if ( strcmp(token, "destroy" ) == 0 ) return "object.destroy ( );"; if ( strcmp(token, "search" ) == 0 ) return "search ( );"; if ( strcmp(token, "radar" ) == 0 ) return "radar ( cat, angle, focus, min, max, sens );"; -- cgit v1.2.3-1-g7c22 From 3d7017525bfe6563dc7cf93f5b1788e86bd98ce8 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 31 Dec 2013 19:09:54 +0100 Subject: Added camerafocus() for changing camera --- src/script/cbottoken.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/script/cbottoken.cpp') diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 9f99752..81219df 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -334,6 +334,7 @@ std::string GetHelpFilename(const char *token) if ( strcmp(token, "penup" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/penup.txt"); if ( strcmp(token, "pencolor" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/pencolor.txt"); if ( strcmp(token, "penwidth" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/penwidth.txt"); + if ( strcmp(token, "camerafocus" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/camerafocus.txt"); if ( strcmp(token, "extern" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/extern.txt"); if ( strcmp(token, "class" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/class.txt"); if ( strcmp(token, "static" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/static.txt"); @@ -441,6 +442,7 @@ bool IsFunction(const char *token) if ( strcmp(token, "penup" ) == 0 ) return true; if ( strcmp(token, "pencolor" ) == 0 ) return true; if ( strcmp(token, "penwidth" ) == 0 ) return true; + if ( strcmp(token, "camerafocus" ) == 0 ) return true; if ( strcmp(token, "sizeof" ) == 0 ) return true; return false; } @@ -535,6 +537,7 @@ const char* GetHelpText(const char *token) if ( strcmp(token, "penup" ) == 0 ) return "penup ( );"; if ( strcmp(token, "pencolor" ) == 0 ) return "pencolor ( color );"; if ( strcmp(token, "penwidth" ) == 0 ) return "penwidth ( width );"; + if ( strcmp(token, "camerafocus") == 0 ) return "camerafocus ( object );"; return ""; } -- cgit v1.2.3-1-g7c22