Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
script
scriptfunc.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Colobot: Gold Edition source code
3
* Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
4
* http://epsitec.ch; http://colobot.info; http://github.com/colobot
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
* See the GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see http://gnu.org/licenses
18
*/
19
25
#pragma once
26
27
#include "
CBot/CBot.h
"
28
29
#include "common/error.h"
30
31
#include <string>
32
#include <unordered_map>
33
#include <memory>
34
35
class
CObject
;
36
class
CScript
;
37
class
CExchangePost
;
38
namespace
CBot
39
{
40
class
CBotVar;
41
}
42
43
44
class
CScriptFunctions
45
{
46
public
:
47
static
void
Init();
48
49
static
CBot::CBotVar
* CreateObjectVar(
CObject
* obj);
50
static
void
DestroyObjectVar(
CBot::CBotVar
* botVar,
bool
permanent);
51
52
static
bool
CheckOpenFiles();
53
54
private
:
55
static
CBot::CBotTypResult
cEndMission(
CBot::CBotVar
* &var,
void
* user);
56
static
CBot::CBotTypResult
cPlayMusic(
CBot::CBotVar
* &var,
void
* user);
57
static
CBot::CBotTypResult
cGetObject(
CBot::CBotVar
* &var,
void
* user);
58
static
CBot::CBotTypResult
cDelete(
CBot::CBotVar
* &var,
void
* user);
59
static
CBot::CBotTypResult
cSearch(
CBot::CBotVar
* &var,
void
* user);
60
static
CBot::CBotTypResult
cRadar(
CBot::CBotVar
* &var,
void
* user);
61
static
CBot::CBotTypResult
cRadarAll(
CBot::CBotVar
* &var,
void
* user);
62
static
CBot::CBotTypResult
cDetect(
CBot::CBotVar
* &var,
void
* user);
63
static
CBot::CBotTypResult
cDirection(
CBot::CBotVar
* &var,
void
* user);
64
static
CBot::CBotTypResult
cProduce(
CBot::CBotVar
* &var,
void
* user);
65
static
CBot::CBotTypResult
cDistance(
CBot::CBotVar
* &var,
void
* user);
66
static
CBot::CBotTypResult
cSpace(
CBot::CBotVar
* &var,
void
* user);
67
static
CBot::CBotTypResult
cFlatSpace(
CBot::CBotVar
* &var,
void
* user);
68
static
CBot::CBotTypResult
cFlatGround(
CBot::CBotVar
* &var,
void
* user);
69
static
CBot::CBotTypResult
cGoto(
CBot::CBotVar
* &var,
void
* user);
70
static
CBot::CBotTypResult
cGrabDrop(
CBot::CBotVar
* &var,
void
* user);
71
static
CBot::CBotTypResult
cReceive(
CBot::CBotVar
* &var,
void
* user);
72
static
CBot::CBotTypResult
cSend(
CBot::CBotVar
* &var,
void
* user);
73
static
CBot::CBotTypResult
cDeleteInfo(
CBot::CBotVar
* &var,
void
* user);
74
static
CBot::CBotTypResult
cTestInfo(
CBot::CBotVar
* &var,
void
* user);
75
static
CBot::CBotTypResult
cShield(
CBot::CBotVar
* &var,
void
* user);
76
static
CBot::CBotTypResult
cFire(
CBot::CBotVar
* &var,
void
* user);
77
static
CBot::CBotTypResult
cAim(
CBot::CBotVar
* &var,
void
* user);
78
static
CBot::CBotTypResult
cMotor(
CBot::CBotVar
* &var,
void
* user);
79
static
CBot::CBotTypResult
cTopo(
CBot::CBotVar
* &var,
void
* user);
80
static
CBot::CBotTypResult
cMessage(
CBot::CBotVar
* &var,
void
* user);
81
static
CBot::CBotTypResult
cPenDown(
CBot::CBotVar
* &var,
void
* user);
82
83
static
CBot::CBotTypResult
cOnePoint(
CBot::CBotVar
* &var,
void
* user);
84
static
CBot::CBotTypResult
cPoint(
CBot::CBotVar
* &var,
void
* user);
85
static
CBot::CBotTypResult
cOneObject(
CBot::CBotVar
* &var,
void
* user);
86
87
static
bool
rEndMission(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
88
static
bool
rPlayMusic(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
89
static
bool
rStopMusic(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
90
static
bool
rGetBuild(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
91
static
bool
rGetResearchEnable(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
92
static
bool
rGetResearchDone(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
93
static
bool
rSetBuild(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
94
static
bool
rSetResearchEnable(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
95
static
bool
rSetResearchDone(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
96
static
bool
rGetObjectById(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
97
static
bool
rGetObject(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
98
static
bool
rDelete(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
99
static
bool
rSearch(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
100
static
bool
rRadar(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
101
static
bool
rRadarAll(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
102
static
bool
rDetect(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
103
static
bool
rDirection(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
104
static
bool
rCanBuild(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
105
static
bool
rCanResearch(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
106
static
bool
rResearched(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
107
static
bool
rBuildingEnabled(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
108
static
bool
rBuild(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
109
static
bool
rProduce(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
110
static
bool
rDistance(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
111
static
bool
rDistance2d(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
112
static
bool
rSpace(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
113
static
bool
rFlatSpace(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
114
static
bool
rFlatGround(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
115
static
bool
rWait(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
116
static
bool
rMove(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
117
static
bool
rTurn(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
118
static
bool
rGoto(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
119
static
bool
rGrab(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
120
static
bool
rDrop(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
121
static
bool
rSniff(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
122
static
bool
rReceive(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
123
static
bool
rSend(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
124
static
bool
rDeleteInfo(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
125
static
bool
rTestInfo(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
126
static
bool
rThump(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
127
static
bool
rRecycle(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
128
static
bool
rShield(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
129
static
bool
rFire(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
130
static
bool
rAim(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
131
static
bool
rMotor(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
132
static
bool
rJet(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
133
static
bool
rTopo(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
134
static
bool
rMessage(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
135
static
bool
rCmdline(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
136
static
bool
rIsMovie(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
137
static
bool
rErrMode(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
138
static
bool
rIPF(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
139
static
bool
rAbsTime(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
140
static
bool
rPenDown(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
141
static
bool
rPenUp(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
142
static
bool
rPenColor(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
143
static
bool
rPenWidth(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
144
static
bool
rCameraFocus(
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
145
146
147
static
CBot::CBotTypResult
cBusy(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* &var);
148
static
CBot::CBotTypResult
cFactory(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* &var);
149
static
CBot::CBotTypResult
cClassNull(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* &var);
150
static
CBot::CBotTypResult
cClassOneFloat(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* &var);
151
152
static
bool
rBusy(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
153
static
bool
rFactory(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
154
static
bool
rResearch(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
155
static
bool
rTakeOff(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
156
static
bool
rDestroy(
CBot::CBotVar
* thisclass,
CBot::CBotVar
* var,
CBot::CBotVar
* result,
int
& exception,
void
* user);
157
158
static
CBot::CBotTypResult
cPointConstructor(
CBot::CBotVar
* pThis,
CBot::CBotVar
* &var);
159
static
bool
rPointConstructor(
CBot::CBotVar
* pThis,
CBot::CBotVar
* var,
CBot::CBotVar
* pResult,
int
& Exception,
void
* user);
160
161
static
void
uObject(
CBot::CBotVar
* botThis,
void
* user);
162
163
private
:
164
static
bool
WaitForForegroundTask(
CScript
* script,
CBot::CBotVar
* result,
int
&exception);
165
static
bool
WaitForBackgroundTask(
CScript
* script,
CBot::CBotVar
* result,
int
&exception);
166
static
bool
ShouldTaskStop(Error err,
int
errMode);
167
static
CExchangePost
* FindExchangePost(
CObject
*
object
,
float
power);
168
};
CBot.h
Public interface of CBot language interpreter. CBot.h is the only file that should be included by any...
CExchangePost
Definition:
exchange_post.h:46
CBot::CBotVar
A CBot variable.
Definition:
CBotVar.h:42
CScriptFunctions
Definition:
scriptfunc.h:44
CScript
Definition:
script.h:58
CBot::CBotTypResult
Class to define the complete type of a variable.
Definition:
CBotTypResult.h:47
CBot
CBot engine.
Definition:
CBotCallMethode.cpp:28
CObject
Base class for all 3D in-game objects.
Definition:
object.h:63
Generated by
1.8.11