47 std::string value = GetAfterEquals(
LineData, equals);
110 std::string str =
Calc(value);
121 std::string str1 = value.substr(0, value.find(
",", 0));
122 std::string str2 = value.substr(value.find(
",", 0) + 1);
135 int loc1 = value.find(
",", 0);
136 int loc2 = value.find(
",", loc1 + 1);
138 std::string str1 = value.substr(0, loc1);
139 std::string str2 = value.substr(loc1 + 1, loc2 - loc1 - 1);
140 std::string str3 = value.substr(loc2 + 1);
153 int loc1 = value.find(
",", 0);
154 int loc2 = value.find(
",", loc1 + 1);
156 std::string str1 = value.substr(0, loc1);
157 std::string str2 = value.substr(loc1 + 1, loc2 - loc1 - 1);
158 std::string str3 = value.substr(loc2 + 1);
177 int loc = value.find(
",", 0);
178 Real latitude, longitude;
179 std::string str1 = value.substr(0, loc);
180 std::string str2 = value.substr(loc + 1);
212 std::string str =
Calc(value);
222 int params = SplitAfterEquals(
LineData);
224 return ScriptError(
"Incorrect number of parameters");
227 for (
int i = 0; i <= 2; i++)
230 return ScriptError(
"Invalid value: " + tempdata[i]);
234 position.x =
ToFloat(tempdata[0]);
235 position.y =
ToFloat(tempdata[1]);
236 position.z =
ToFloat(tempdata[2]);
249 std::string str =
Calc(value);
259 int params = SplitAfterEquals(
LineData);
261 return ScriptError(
"Incorrect number of parameters");
264 for (
int i = 0; i <= 5; i++)
267 return ScriptError(
"Invalid value: " + tempdata[i]);
286 std::string str =
Calc(value);
296 bool enabled =
false;
void SetStartRotation(const Vector3 &rotation)
void SetStartDirection(const Vector3 &direction)
void EnableGravity(bool value)
void EnableCollisions(bool value)
virtual void Rotate(const Vector3 &vector, Real speed=1.0)
void EnableMap(bool value)
std::string BuildingLocation
std::string BuildingDesigner
void SetBounds(const Vector3 &area_min, const Vector3 &area_max)
std::string BuildingVersion
std::string BuildingDescription
void Move(Vector3 &position, bool move_children=false)
void Report(const std::string &message)
int Run(std::string &LineData)
GlobalsSection(ScriptProcessor *parent)
static const int sNextLine
static const int sContinue
std::string Calc(const std::string &expression)
void SetDateTime(double julian_date_time)
void SetLocation(Real latitude, Real longitude)
SkySystem * GetSkySystem()
bool StartsWithNoCase(const std::string &string, const std::string &check_string)
Real ToFloat(const std::string &string)
bool ToBool(std::string string)
bool IsNumeric(const wxString &string)