summaryrefslogtreecommitdiffstats
path: root/src/script/cbottoken.cpp
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2013-05-05 14:44:51 +0200
committerkrzys-h <krzys_h@interia.pl>2013-05-05 14:44:51 +0200
commitfcb052cc8d1abb2e1872c9684bba225686f25b34 (patch)
treeed7870f1df1522b7c42828438db7295111396277 /src/script/cbottoken.cpp
parent78e32cf894797fbbe865e67299800292597c92ae (diff)
downloadcolobot-fcb052cc8d1abb2e1872c9684bba225686f25b34.tar.gz
colobot-fcb052cc8d1abb2e1872c9684bba225686f25b34.tar.bz2
colobot-fcb052cc8d1abb2e1872c9684bba225686f25b34.zip
Added [set/get][build/research[done/enable]] ( ); function fo CBot
* setbuild ( ); * setresearchdone ( ); * setresearchenable ( ); * getbuild ( ); * getresearchdone ( ); * getresearchenable ( );
Diffstat (limited to 'src/script/cbottoken.cpp')
-rw-r--r--src/script/cbottoken.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp
index 6eb6592..2ae2c72 100644
--- a/src/script/cbottoken.cpp
+++ b/src/script/cbottoken.cpp
@@ -249,6 +249,9 @@ std::string GetHelpFilename(const char *token)
if ( strcmp(token, "pow" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/expr.txt");
if ( strcmp(token, "rand" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/expr.txt");
if ( strcmp(token, "abs" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/expr.txt");
+ if ( strcmp(token, "getbuild" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/getbuild.txt");
+ 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, "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");
@@ -262,7 +265,6 @@ std::string GetHelpFilename(const char *token)
if ( strcmp(token, "turn" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/turn.txt");
if ( strcmp(token, "goto" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/goto.txt");
if ( strcmp(token, "grab" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/grab.txt");
- if ( strcmp(token, "buildinfo" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/buildinfo.txt");
if ( strcmp(token, "canbuild" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/canbuild.txt");
if ( strcmp(token, "build" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/build.txt");
if ( strcmp(token, "drop" ) == 0 ) return std::string("help/") + CApplication::GetInstancePointer()->GetLanguageChar() + std::string("/cbot/drop.txt");
@@ -368,6 +370,9 @@ bool IsFunction(const char *token)
if ( strcmp(token, "pow" ) == 0 ) return true;
if ( strcmp(token, "rand" ) == 0 ) return true;
if ( strcmp(token, "abs" ) == 0 ) return true;
+ if ( strcmp(token, "getbuild" ) == 0 ) return true;
+ if ( strcmp(token, "getresearchenable" ) == 0 ) return true;
+ if ( strcmp(token, "getresearchdone" ) == 0 ) return true;
if ( strcmp(token, "retobject" ) == 0 ) return true;
if ( strcmp(token, "search" ) == 0 ) return true;
if ( strcmp(token, "radar" ) == 0 ) return true;
@@ -382,9 +387,8 @@ bool IsFunction(const char *token)
if ( strcmp(token, "turn" ) == 0 ) return true;
if ( strcmp(token, "goto" ) == 0 ) return true;
if ( strcmp(token, "grab" ) == 0 ) return true;
- if ( strcmp(token, "buildinfo" ) == 0 ) return true;
- if ( strcmp(token, "canbuild" ) == 0 ) return true;
- if ( strcmp(token, "build" ) == 0 ) return true;
+ if ( strcmp(token, "canbuild" ) == 0 ) return true;
+ if ( strcmp(token, "build" ) == 0 ) return true;
if ( strcmp(token, "drop" ) == 0 ) return true;
if ( strcmp(token, "sniff" ) == 0 ) return true;
if ( strcmp(token, "receive" ) == 0 ) return true;
@@ -453,6 +457,9 @@ const char* GetHelpText(const char *token)
if ( strcmp(token, "pow" ) == 0 ) return "pow ( x, y );";
if ( strcmp(token, "rand" ) == 0 ) return "rand ( );";
if ( strcmp(token, "abs" ) == 0 ) return "abs ( value );";
+ if ( strcmp(token, "getbuild" ) == 0 ) return "getbuild ( );";
+ if ( strcmp(token, "getresearchenable" ) == 0 ) return "getresearchenable ( );";
+ if ( strcmp(token, "getresearchdone" ) == 0 ) return "getresearchdone ( );";
if ( strcmp(token, "retobject" ) == 0 ) return "retobject ( );";
if ( strcmp(token, "search" ) == 0 ) return "search ( );";
if ( strcmp(token, "radar" ) == 0 ) return "radar ( cat, angle, focus, min, max, sens );";
@@ -467,7 +474,6 @@ const char* GetHelpText(const char *token)
if ( strcmp(token, "turn" ) == 0 ) return "turn ( angle );";
if ( strcmp(token, "goto" ) == 0 ) return "goto ( position, altitude );";
if ( strcmp(token, "grab" ) == 0 ) return "grab ( order );";
- if ( strcmp(token, "buildinfo" ) == 0 ) return "buildinfo ( category );";
if ( strcmp(token, "canbuild" ) == 0 ) return "canbuild ( category );";
if ( strcmp(token, "build" ) == 0 ) return "build ( category );";
if ( strcmp(token, "drop" ) == 0 ) return "drop ( order );";