diff options
Diffstat (limited to '')
3 files changed, 0 insertions, 2586 deletions
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs deleted file mode 100644 index 353d59e..0000000 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.CodeDom.Compiler; | ||
30 | using System.IO; | ||
31 | using System.Reflection; | ||
32 | using Microsoft.CSharp; | ||
33 | |||
34 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | ||
35 | { | ||
36 | public class Compiler | ||
37 | { | ||
38 | private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); | ||
39 | private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); | ||
40 | private static UInt64 scriptCompileCounter = 0; | ||
41 | //private ICodeCompiler icc = codeProvider.CreateCompiler(); | ||
42 | public string CompileFromFile(string LSOFileName) | ||
43 | { | ||
44 | switch (Path.GetExtension(LSOFileName).ToLower()) | ||
45 | { | ||
46 | case ".txt": | ||
47 | case ".lsl": | ||
48 | Common.SendToDebug("Source code is LSL, converting to CS"); | ||
49 | return CompileFromLSLText(File.ReadAllText(LSOFileName)); | ||
50 | case ".cs": | ||
51 | Common.SendToDebug("Source code is CS"); | ||
52 | return CompileFromCSText(File.ReadAllText(LSOFileName)); | ||
53 | default: | ||
54 | throw new Exception("Unknown script type."); | ||
55 | } | ||
56 | } | ||
57 | |||
58 | /// <summary> | ||
59 | /// Converts script from LSL to CS and calls CompileFromCSText | ||
60 | /// </summary> | ||
61 | /// <param name="Script">LSL script</param> | ||
62 | /// <returns>Filename to .dll assembly</returns> | ||
63 | public string CompileFromLSLText(string Script) | ||
64 | { | ||
65 | if (Script.Substring(0, 4).ToLower() == "//c#") | ||
66 | { | ||
67 | return CompileFromCSText(Script); | ||
68 | } | ||
69 | else | ||
70 | { | ||
71 | return CompileFromCSText(LSL_Converter.Convert(Script)); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | /// <summary> | ||
76 | /// Compile CS script to .Net assembly (.dll) | ||
77 | /// </summary> | ||
78 | /// <param name="Script">CS script</param> | ||
79 | /// <returns>Filename to .dll assembly</returns> | ||
80 | public string CompileFromCSText(string Script) | ||
81 | { | ||
82 | // Output assembly name | ||
83 | scriptCompileCounter++; | ||
84 | string OutFile = Path.Combine("ScriptEngines", "Script_" + scriptCompileCounter + ".dll"); | ||
85 | try | ||
86 | { | ||
87 | File.Delete(OutFile); | ||
88 | } | ||
89 | catch (Exception e) | ||
90 | { | ||
91 | Console.WriteLine("Exception attempting to delete old compiled script: " + e.ToString()); | ||
92 | } | ||
93 | //string OutFile = Path.Combine("ScriptEngines", "SecondLife.Script.dll"); | ||
94 | |||
95 | // DEBUG - write source to disk | ||
96 | try | ||
97 | { | ||
98 | File.WriteAllText( | ||
99 | Path.Combine("ScriptEngines", "debug_" + Path.GetFileNameWithoutExtension(OutFile) + ".cs"), Script); | ||
100 | } | ||
101 | catch | ||
102 | { | ||
103 | } | ||
104 | |||
105 | // Do actual compile | ||
106 | CompilerParameters parameters = new CompilerParameters(); | ||
107 | parameters.IncludeDebugInformation = true; | ||
108 | // Add all available assemblies | ||
109 | foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) | ||
110 | { | ||
111 | //Console.WriteLine("Adding assembly: " + asm.Location); | ||
112 | //parameters.ReferencedAssemblies.Add(asm.Location); | ||
113 | } | ||
114 | |||
115 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); | ||
116 | string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); | ||
117 | //Console.WriteLine("Assembly location: " + rootPath); | ||
118 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Common.dll")); | ||
119 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPathSE, "OpenSim.Grid.ScriptEngine.DotNetEngine.dll")); | ||
120 | |||
121 | //parameters.ReferencedAssemblies.Add("OpenSim.Region.Environment"); | ||
122 | parameters.GenerateExecutable = false; | ||
123 | parameters.OutputAssembly = OutFile; | ||
124 | parameters.IncludeDebugInformation = false; | ||
125 | CompilerResults results = codeProvider.CompileAssemblyFromSource(parameters, Script); | ||
126 | |||
127 | // Go through errors | ||
128 | // TODO: Return errors to user somehow | ||
129 | if (results.Errors.Count > 0) | ||
130 | { | ||
131 | string errtext = ""; | ||
132 | foreach (CompilerError CompErr in results.Errors) | ||
133 | { | ||
134 | errtext += "Line number " + (CompErr.Line - 1) + | ||
135 | ", Error Number: " + CompErr.ErrorNumber + | ||
136 | ", '" + CompErr.ErrorText + "'\r\n"; | ||
137 | } | ||
138 | throw new Exception(errtext); | ||
139 | } | ||
140 | |||
141 | return OutFile; | ||
142 | } | ||
143 | } | ||
144 | } | ||
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs deleted file mode 100644 index 639cd54..0000000 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ /dev/null | |||
@@ -1,314 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Collections.Generic; | ||
29 | using System.Text.RegularExpressions; | ||
30 | |||
31 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | ||
32 | { | ||
33 | public class LSL2CSConverter | ||
34 | { | ||
35 | //private Regex rnw = new Regex(@"[a-zA-Z0-9_\-]", RegexOptions.Compiled); | ||
36 | private Dictionary<string, string> dataTypes = new Dictionary<string, string>(); | ||
37 | private Dictionary<string, string> quotes = new Dictionary<string, string>(); | ||
38 | |||
39 | public LSL2CSConverter() | ||
40 | { | ||
41 | // Only the types we need to convert | ||
42 | dataTypes.Add("void", "void"); | ||
43 | dataTypes.Add("integer", "int"); | ||
44 | dataTypes.Add("float", "double"); | ||
45 | dataTypes.Add("string", "string"); | ||
46 | dataTypes.Add("key", "string"); | ||
47 | dataTypes.Add("vector", "LSL_Types.Vector3"); | ||
48 | dataTypes.Add("rotation", "LSL_Types.Quaternion"); | ||
49 | dataTypes.Add("list", "list"); | ||
50 | dataTypes.Add("null", "null"); | ||
51 | } | ||
52 | |||
53 | public string Convert(string Script) | ||
54 | { | ||
55 | string Return = ""; | ||
56 | Script = " \r\n" + Script; | ||
57 | |||
58 | // | ||
59 | // Prepare script for processing | ||
60 | // | ||
61 | |||
62 | // Clean up linebreaks | ||
63 | Script = Regex.Replace(Script, @"\r\n", "\n"); | ||
64 | Script = Regex.Replace(Script, @"\n", "\r\n"); | ||
65 | |||
66 | |||
67 | // QUOTE REPLACEMENT | ||
68 | // temporarily replace quotes so we can work our magic on the script without | ||
69 | // always considering if we are inside our outside ""'s | ||
70 | string _Script = ""; | ||
71 | string C; | ||
72 | bool in_quote = false; | ||
73 | bool quote_replaced = false; | ||
74 | string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; | ||
75 | string quote = ""; | ||
76 | bool last_was_escape = false; | ||
77 | int quote_replaced_count = 0; | ||
78 | for (int p = 0; p < Script.Length; p++) | ||
79 | { | ||
80 | C = Script.Substring(p, 1); | ||
81 | while (true) | ||
82 | { | ||
83 | // found " and last was not \ so this is not an escaped \" | ||
84 | if (C == "\"" && last_was_escape == false) | ||
85 | { | ||
86 | // Toggle inside/outside quote | ||
87 | in_quote = !in_quote; | ||
88 | if (in_quote) | ||
89 | { | ||
90 | quote_replaced_count++; | ||
91 | } | ||
92 | else | ||
93 | { | ||
94 | if (quote == "") | ||
95 | { | ||
96 | // We didn't replace quote, probably because of empty string? | ||
97 | _Script += quote_replacement_string + | ||
98 | quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]); | ||
99 | } | ||
100 | // We just left a quote | ||
101 | quotes.Add( | ||
102 | quote_replacement_string + | ||
103 | quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); | ||
104 | quote = ""; | ||
105 | } | ||
106 | break; | ||
107 | } | ||
108 | |||
109 | if (!in_quote) | ||
110 | { | ||
111 | // We are not inside a quote | ||
112 | quote_replaced = false; | ||
113 | } | ||
114 | else | ||
115 | { | ||
116 | // We are inside a quote | ||
117 | if (!quote_replaced) | ||
118 | { | ||
119 | // Replace quote | ||
120 | _Script += quote_replacement_string + | ||
121 | quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]); | ||
122 | quote_replaced = true; | ||
123 | } | ||
124 | quote += C; | ||
125 | break; | ||
126 | } | ||
127 | _Script += C; | ||
128 | break; | ||
129 | } | ||
130 | last_was_escape = false; | ||
131 | if (C == @"\") | ||
132 | { | ||
133 | last_was_escape = true; | ||
134 | } | ||
135 | } | ||
136 | Script = _Script; | ||
137 | // | ||
138 | // END OF QUOTE REPLACEMENT | ||
139 | // | ||
140 | |||
141 | // | ||
142 | // PROCESS STATES | ||
143 | // Remove state definitions and add state names to start of each event within state | ||
144 | // | ||
145 | int ilevel = 0; | ||
146 | int lastlevel = 0; | ||
147 | string ret = ""; | ||
148 | string cache = ""; | ||
149 | bool in_state = false; | ||
150 | string current_statename = ""; | ||
151 | for (int p = 0; p < Script.Length; p++) | ||
152 | { | ||
153 | C = Script.Substring(p, 1); | ||
154 | while (true) | ||
155 | { | ||
156 | // inc / dec level | ||
157 | if (C == @"{") | ||
158 | ilevel++; | ||
159 | if (C == @"}") | ||
160 | ilevel--; | ||
161 | if (ilevel < 0) | ||
162 | ilevel = 0; | ||
163 | cache += C; | ||
164 | |||
165 | // if level == 0, add to return | ||
166 | if (ilevel == 1 && lastlevel == 0) | ||
167 | { | ||
168 | // 0 => 1: Get last | ||
169 | Match m = | ||
170 | Regex.Match(cache, @"(?![a-zA-Z_]+)\s*([a-zA-Z_]+)[^a-zA-Z_\(\)]*{", | ||
171 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
172 | |||
173 | in_state = false; | ||
174 | if (m.Success) | ||
175 | { | ||
176 | // Go back to level 0, this is not a state | ||
177 | in_state = true; | ||
178 | current_statename = m.Groups[1].Captures[0].Value; | ||
179 | //Console.WriteLine("Current statename: " + current_statename); | ||
180 | cache = | ||
181 | Regex.Replace(cache, | ||
182 | @"(?<s1>(?![a-zA-Z_]+)\s*)" + @"([a-zA-Z_]+)(?<s2>[^a-zA-Z_\(\)]*){", | ||
183 | "${s1}${s2}", | ||
184 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
185 | } | ||
186 | ret += cache; | ||
187 | cache = ""; | ||
188 | } | ||
189 | if (ilevel == 0 && lastlevel == 1) | ||
190 | { | ||
191 | // 1 => 0: Remove last } | ||
192 | if (in_state == true) | ||
193 | { | ||
194 | cache = cache.Remove(cache.Length - 1, 1); | ||
195 | //cache = Regex.Replace(cache, "}$", "", RegexOptions.Multiline | RegexOptions.Singleline); | ||
196 | |||
197 | //Replace function names | ||
198 | // void dataserver(key query_id, string data) { | ||
199 | //cache = Regex.Replace(cache, @"([^a-zA-Z_]\s*)((?!if|switch|for)[a-zA-Z_]+\s*\([^\)]*\)[^{]*{)", "$1" + "<STATE>" + "$2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
200 | //Console.WriteLine("Replacing using statename: " + current_statename); | ||
201 | cache = | ||
202 | Regex.Replace(cache, | ||
203 | @"^(\s*)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", | ||
204 | @"$1public " + current_statename + "_event_$2", | ||
205 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
206 | } | ||
207 | |||
208 | ret += cache; | ||
209 | cache = ""; | ||
210 | in_state = true; | ||
211 | current_statename = ""; | ||
212 | } | ||
213 | |||
214 | break; | ||
215 | } | ||
216 | lastlevel = ilevel; | ||
217 | } | ||
218 | ret += cache; | ||
219 | cache = ""; | ||
220 | |||
221 | Script = ret; | ||
222 | ret = ""; | ||
223 | |||
224 | |||
225 | foreach (string key in dataTypes.Keys) | ||
226 | { | ||
227 | string val; | ||
228 | dataTypes.TryGetValue(key, out val); | ||
229 | |||
230 | // Replace CAST - (integer) with (int) | ||
231 | Script = | ||
232 | Regex.Replace(Script, @"\(" + key + @"\)", @"(" + val + ")", | ||
233 | RegexOptions.Compiled | RegexOptions.Multiline); | ||
234 | // Replace return types and function variables - integer a() and f(integer a, integer a) | ||
235 | Script = | ||
236 | Regex.Replace(Script, @"(^|;|}|[\(,])(\s*)" + key + @"(\s*)", @"$1$2" + val + "$3", | ||
237 | RegexOptions.Compiled | RegexOptions.Multiline); | ||
238 | } | ||
239 | |||
240 | // Add "void" in front of functions that needs it | ||
241 | Script = | ||
242 | Regex.Replace(Script, | ||
243 | @"^(\s*public\s+)((?!(if|switch|for)[^a-zA-Z0-9_])[a-zA-Z0-9_]*\s*\([^\)]*\)[^;]*\{)", | ||
244 | @"$1void $2", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
245 | |||
246 | // Replace <x,y,z> and <x,y,z,r> | ||
247 | Script = | ||
248 | Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Quaternion($1)", | ||
249 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
250 | Script = | ||
251 | Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Vector3($1)", | ||
252 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
253 | |||
254 | // Replace List []'s | ||
255 | Script = | ||
256 | Regex.Replace(Script, @"\[([^\]]*)\]", @"List.Parse($1)", | ||
257 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
258 | |||
259 | |||
260 | // Replace (string) to .ToString() // | ||
261 | Script = | ||
262 | Regex.Replace(Script, @"\(string\)\s*([a-zA-Z0-9_]+(\s*\([^\)]*\))?)", @"$1.ToString()", | ||
263 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
264 | Script = | ||
265 | Regex.Replace(Script, @"\((float|int)\)\s*([a-zA-Z0-9_]+(\s*\([^\)]*\))?)", @"$1.Parse($2)", | ||
266 | RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); | ||
267 | |||
268 | |||
269 | // REPLACE BACK QUOTES | ||
270 | foreach (string key in quotes.Keys) | ||
271 | { | ||
272 | string val; | ||
273 | quotes.TryGetValue(key, out val); | ||
274 | Script = Script.Replace(key, "\"" + val + "\""); | ||
275 | } | ||
276 | |||
277 | |||
278 | // Add namespace, class name and inheritance | ||
279 | |||
280 | Return = "" + | ||
281 | "using OpenSim.Region.ScriptEngine.Common;"; | ||
282 | //"using System; " + | ||
283 | //"using System.Collections.Generic; " + | ||
284 | //"using System.Text; " + | ||
285 | //"using OpenSim.Region.ScriptEngine.Common; " + | ||
286 | //"using integer = System.Int32; " + | ||
287 | //"using key = System.String; "; | ||
288 | |||
289 | //// Make a Using out of DataTypes | ||
290 | //// Using integer = System.Int32; | ||
291 | //string _val; | ||
292 | //foreach (string key in DataTypes.Keys) | ||
293 | //{ | ||
294 | // DataTypes.TryGetValue(key, out _val); | ||
295 | // if (key != _val) | ||
296 | // { | ||
297 | // Return += "using " + key + " = " + _val + "; "; | ||
298 | // } | ||
299 | //} | ||
300 | |||
301 | |||
302 | Return += "" + | ||
303 | "namespace SecondLife { "; | ||
304 | Return += "" + | ||
305 | //"[Serializable] " + | ||
306 | "public class Script : OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass { "; | ||
307 | Return += @"public Script() { } "; | ||
308 | Return += Script; | ||
309 | Return += "} }\r\n"; | ||
310 | |||
311 | return Return; | ||
312 | } | ||
313 | } | ||
314 | } | ||
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs deleted file mode 100644 index be22484..0000000 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ /dev/null | |||
@@ -1,2128 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Runtime.Remoting.Lifetime; | ||
31 | using System.Threading; | ||
32 | using OpenSim.Region.ScriptEngine.Common; | ||
33 | using integer = System.Int32; | ||
34 | using key = System.String; | ||
35 | using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; | ||
36 | using rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion; | ||
37 | |||
38 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | ||
39 | { | ||
40 | //[Serializable] | ||
41 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript | ||
42 | { | ||
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
45 | // Object never expires | ||
46 | public override Object InitializeLifetimeService() | ||
47 | { | ||
48 | //Console.WriteLine("LSL_BaseClass: InitializeLifetimeService()"); | ||
49 | // return null; | ||
50 | ILease lease = (ILease) base.InitializeLifetimeService(); | ||
51 | |||
52 | if (lease.CurrentState == LeaseState.Initial) | ||
53 | { | ||
54 | lease.InitialLeaseTime = TimeSpan.Zero; // TimeSpan.FromMinutes(1); | ||
55 | //lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); | ||
56 | //lease.RenewOnCallTime = TimeSpan.FromSeconds(2); | ||
57 | } | ||
58 | return lease; | ||
59 | } | ||
60 | |||
61 | |||
62 | private Executor m_Exec; | ||
63 | |||
64 | public Executor Exec | ||
65 | { | ||
66 | get | ||
67 | { | ||
68 | if (m_Exec == null) | ||
69 | m_Exec = new Executor(this); | ||
70 | return m_Exec; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | public LSL_BuiltIn_Commands_Interface m_LSL_Functions; | ||
75 | public string SourceCode = ""; | ||
76 | |||
77 | public LSL_BaseClass() | ||
78 | { | ||
79 | } | ||
80 | |||
81 | public string State() | ||
82 | { | ||
83 | return m_LSL_Functions.State(); | ||
84 | } | ||
85 | |||
86 | |||
87 | public void Start(LSL_BuiltIn_Commands_Interface LSL_Functions) | ||
88 | { | ||
89 | m_LSL_Functions = LSL_Functions; | ||
90 | |||
91 | //m_log.Info("[ScriptEngine]: LSL_BaseClass.Start() called."); | ||
92 | |||
93 | // Get this AppDomain's settings and display some of them. | ||
94 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; | ||
95 | Console.WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}", | ||
96 | ads.ApplicationName, | ||
97 | ads.ApplicationBase, | ||
98 | ads.ConfigurationFile | ||
99 | ); | ||
100 | |||
101 | // Display the name of the calling AppDomain and the name | ||
102 | // of the second domain. | ||
103 | // NOTE: The application's thread has transitioned between | ||
104 | // AppDomains. | ||
105 | Console.WriteLine("Calling to '{0}'.", | ||
106 | Thread.GetDomain().FriendlyName | ||
107 | ); | ||
108 | |||
109 | return; | ||
110 | } | ||
111 | |||
112 | |||
113 | // | ||
114 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
115 | // | ||
116 | // They are only forwarders to LSL_BuiltIn_Commands.cs | ||
117 | // | ||
118 | public double llSin(double f) | ||
119 | { | ||
120 | return m_LSL_Functions.llSin(f); | ||
121 | } | ||
122 | |||
123 | public double llCos(double f) | ||
124 | { | ||
125 | return m_LSL_Functions.llCos(f); | ||
126 | } | ||
127 | |||
128 | public double llTan(double f) | ||
129 | { | ||
130 | return m_LSL_Functions.llTan(f); | ||
131 | } | ||
132 | |||
133 | public double llAtan2(double x, double y) | ||
134 | { | ||
135 | return m_LSL_Functions.llAtan2(x, y); | ||
136 | } | ||
137 | |||
138 | public double llSqrt(double f) | ||
139 | { | ||
140 | return m_LSL_Functions.llSqrt(f); | ||
141 | } | ||
142 | |||
143 | public double llPow(double fbase, double fexponent) | ||
144 | { | ||
145 | return m_LSL_Functions.llPow(fbase, fexponent); | ||
146 | } | ||
147 | |||
148 | public int llAbs(int i) | ||
149 | { | ||
150 | return m_LSL_Functions.llAbs(i); | ||
151 | } | ||
152 | |||
153 | public double llFabs(double f) | ||
154 | { | ||
155 | return m_LSL_Functions.llFabs(f); | ||
156 | } | ||
157 | |||
158 | public double llFrand(double mag) | ||
159 | { | ||
160 | return m_LSL_Functions.llFrand(mag); | ||
161 | } | ||
162 | |||
163 | public int llFloor(double f) | ||
164 | { | ||
165 | return m_LSL_Functions.llFloor(f); | ||
166 | } | ||
167 | |||
168 | public int llCeil(double f) | ||
169 | { | ||
170 | return m_LSL_Functions.llCeil(f); | ||
171 | } | ||
172 | |||
173 | public int llRound(double f) | ||
174 | { | ||
175 | return m_LSL_Functions.llRound(f); | ||
176 | } | ||
177 | |||
178 | public double llVecMag(vector v) | ||
179 | { | ||
180 | return m_LSL_Functions.llVecMag(v); | ||
181 | } | ||
182 | |||
183 | public vector llVecNorm(vector v) | ||
184 | { | ||
185 | return m_LSL_Functions.llVecNorm(v); | ||
186 | } | ||
187 | |||
188 | public double llVecDist(vector a, vector b) | ||
189 | { | ||
190 | return m_LSL_Functions.llVecDist(a, b); | ||
191 | } | ||
192 | |||
193 | public vector llRot2Euler(rotation r) | ||
194 | { | ||
195 | return m_LSL_Functions.llRot2Euler(r); | ||
196 | } | ||
197 | |||
198 | public rotation llEuler2Rot(vector v) | ||
199 | { | ||
200 | return m_LSL_Functions.llEuler2Rot(v); | ||
201 | } | ||
202 | |||
203 | public rotation llAxes2Rot(vector fwd, vector left, vector up) | ||
204 | { | ||
205 | return m_LSL_Functions.llAxes2Rot(fwd, left, up); | ||
206 | } | ||
207 | |||
208 | public vector llRot2Fwd(rotation r) | ||
209 | { | ||
210 | return m_LSL_Functions.llRot2Fwd(r); | ||
211 | } | ||
212 | |||
213 | public vector llRot2Left(rotation r) | ||
214 | { | ||
215 | return m_LSL_Functions.llRot2Left(r); | ||
216 | } | ||
217 | |||
218 | public vector llRot2Up(rotation r) | ||
219 | { | ||
220 | return m_LSL_Functions.llRot2Up(r); | ||
221 | } | ||
222 | |||
223 | public rotation llRotBetween(vector start, vector end) | ||
224 | { | ||
225 | return m_LSL_Functions.llRotBetween(start, end); | ||
226 | } | ||
227 | |||
228 | public void llWhisper(int channelID, string text) | ||
229 | { | ||
230 | m_LSL_Functions.llWhisper(channelID, text); | ||
231 | } | ||
232 | |||
233 | public void llSay(int channelID, string text) | ||
234 | { | ||
235 | m_LSL_Functions.llSay(channelID, text); | ||
236 | } | ||
237 | |||
238 | // | ||
239 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
240 | // | ||
241 | public void llShout(int channelID, string text) | ||
242 | { | ||
243 | m_LSL_Functions.llShout(channelID, text); | ||
244 | } | ||
245 | |||
246 | public void llOwnerSay(string msg) | ||
247 | { | ||
248 | m_LSL_Functions.llOwnerSay(msg); | ||
249 | } | ||
250 | |||
251 | public int llListen(int channelID, string name, string ID, string msg) | ||
252 | { | ||
253 | return m_LSL_Functions.llListen(channelID, name, ID, msg); | ||
254 | } | ||
255 | |||
256 | public void llListenControl(int number, int active) | ||
257 | { | ||
258 | m_LSL_Functions.llListenControl(number, active); | ||
259 | } | ||
260 | |||
261 | public void llListenRemove(int number) | ||
262 | { | ||
263 | m_LSL_Functions.llListenRemove(number); | ||
264 | } | ||
265 | |||
266 | public void llSensor(string name, string id, int type, double range, double arc) | ||
267 | { | ||
268 | m_LSL_Functions.llSensor(name, id, type, range, arc); | ||
269 | } | ||
270 | |||
271 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | ||
272 | { | ||
273 | m_LSL_Functions.llSensorRepeat(name, id, type, range, arc, rate); | ||
274 | } | ||
275 | |||
276 | public void llSensorRemove() | ||
277 | { | ||
278 | m_LSL_Functions.llSensorRemove(); | ||
279 | } | ||
280 | |||
281 | public string llDetectedName(int number) | ||
282 | { | ||
283 | return m_LSL_Functions.llDetectedName(number); | ||
284 | } | ||
285 | |||
286 | public string llDetectedKey(int number) | ||
287 | { | ||
288 | return m_LSL_Functions.llDetectedKey(number); | ||
289 | } | ||
290 | |||
291 | public string llDetectedOwner(int number) | ||
292 | { | ||
293 | return m_LSL_Functions.llDetectedOwner(number); | ||
294 | } | ||
295 | |||
296 | public int llDetectedType(int number) | ||
297 | { | ||
298 | return m_LSL_Functions.llDetectedType(number); | ||
299 | } | ||
300 | |||
301 | public vector llDetectedPos(int number) | ||
302 | { | ||
303 | return m_LSL_Functions.llDetectedPos(number); | ||
304 | } | ||
305 | |||
306 | public vector llDetectedVel(int number) | ||
307 | { | ||
308 | return m_LSL_Functions.llDetectedVel(number); | ||
309 | } | ||
310 | |||
311 | public vector llDetectedGrab(int number) | ||
312 | { | ||
313 | return m_LSL_Functions.llDetectedGrab(number); | ||
314 | } | ||
315 | |||
316 | public rotation llDetectedRot(int number) | ||
317 | { | ||
318 | return m_LSL_Functions.llDetectedRot(number); | ||
319 | } | ||
320 | |||
321 | public int llDetectedGroup(int number) | ||
322 | { | ||
323 | return m_LSL_Functions.llDetectedGroup(number); | ||
324 | } | ||
325 | |||
326 | public int llDetectedLinkNumber(int number) | ||
327 | { | ||
328 | return m_LSL_Functions.llDetectedLinkNumber(number); | ||
329 | } | ||
330 | |||
331 | // | ||
332 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
333 | // | ||
334 | public void llDie() | ||
335 | { | ||
336 | m_LSL_Functions.llDie(); | ||
337 | } | ||
338 | |||
339 | public double llGround(vector offset) | ||
340 | { | ||
341 | return m_LSL_Functions.llGround(offset); | ||
342 | } | ||
343 | |||
344 | public double llCloud(vector offset) | ||
345 | { | ||
346 | return m_LSL_Functions.llCloud(offset); | ||
347 | } | ||
348 | |||
349 | public vector llWind(vector offset) | ||
350 | { | ||
351 | return m_LSL_Functions.llWind(offset); | ||
352 | } | ||
353 | |||
354 | public void llSetStatus(int status, int value) | ||
355 | { | ||
356 | m_LSL_Functions.llSetStatus(status, value); | ||
357 | } | ||
358 | |||
359 | public int llGetStatus(int status) | ||
360 | { | ||
361 | return m_LSL_Functions.llGetStatus(status); | ||
362 | } | ||
363 | |||
364 | public void llSetScale(vector scale) | ||
365 | { | ||
366 | m_LSL_Functions.llSetScale(scale); | ||
367 | } | ||
368 | |||
369 | public vector llGetScale() | ||
370 | { | ||
371 | return m_LSL_Functions.llGetScale(); | ||
372 | } | ||
373 | |||
374 | public void llSetColor(vector color, int face) | ||
375 | { | ||
376 | m_LSL_Functions.llSetColor(color, face); | ||
377 | } | ||
378 | |||
379 | public double llGetAlpha(int face) | ||
380 | { | ||
381 | return m_LSL_Functions.llGetAlpha(face); | ||
382 | } | ||
383 | |||
384 | public void llSetAlpha(double alpha, int face) | ||
385 | { | ||
386 | m_LSL_Functions.llSetAlpha(alpha, face); | ||
387 | } | ||
388 | |||
389 | public vector llGetColor(int face) | ||
390 | { | ||
391 | return m_LSL_Functions.llGetColor(face); | ||
392 | } | ||
393 | |||
394 | public void llSetTexture(string texture, int face) | ||
395 | { | ||
396 | m_LSL_Functions.llSetTexture(texture, face); | ||
397 | } | ||
398 | |||
399 | public void llScaleTexture(double u, double v, int face) | ||
400 | { | ||
401 | m_LSL_Functions.llScaleTexture(u, v, face); | ||
402 | } | ||
403 | |||
404 | public void llOffsetTexture(double u, double v, int face) | ||
405 | { | ||
406 | m_LSL_Functions.llOffsetTexture(u, v, face); | ||
407 | } | ||
408 | |||
409 | public void llRotateTexture(double rotation, int face) | ||
410 | { | ||
411 | m_LSL_Functions.llRotateTexture(rotation, face); | ||
412 | } | ||
413 | |||
414 | public string llGetTexture(int face) | ||
415 | { | ||
416 | return m_LSL_Functions.llGetTexture(face); | ||
417 | } | ||
418 | |||
419 | // | ||
420 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
421 | // | ||
422 | public void llSetPos(vector pos) | ||
423 | { | ||
424 | m_LSL_Functions.llSetPos(pos); | ||
425 | } | ||
426 | |||
427 | public vector llGetPos() | ||
428 | { | ||
429 | return m_LSL_Functions.llGetPos(); | ||
430 | } | ||
431 | |||
432 | public vector llGetLocalPos() | ||
433 | { | ||
434 | return m_LSL_Functions.llGetLocalPos(); | ||
435 | } | ||
436 | |||
437 | public void llSetRot(rotation rot) | ||
438 | { | ||
439 | m_LSL_Functions.llSetRot(rot); | ||
440 | } | ||
441 | |||
442 | public rotation llGetRot() | ||
443 | { | ||
444 | return m_LSL_Functions.llGetRot(); | ||
445 | } | ||
446 | |||
447 | public rotation llGetLocalRot() | ||
448 | { | ||
449 | return m_LSL_Functions.llGetLocalRot(); | ||
450 | } | ||
451 | |||
452 | public void llSetForce(vector force, int local) | ||
453 | { | ||
454 | m_LSL_Functions.llSetForce(force, local); | ||
455 | } | ||
456 | |||
457 | public vector llGetForce() | ||
458 | { | ||
459 | return m_LSL_Functions.llGetForce(); | ||
460 | } | ||
461 | |||
462 | public int llTarget(vector position, double range) | ||
463 | { | ||
464 | return m_LSL_Functions.llTarget(position, range); | ||
465 | } | ||
466 | |||
467 | public void llTargetRemove(int number) | ||
468 | { | ||
469 | m_LSL_Functions.llTargetRemove(number); | ||
470 | } | ||
471 | |||
472 | public int llRotTarget(rotation rot, double error) | ||
473 | { | ||
474 | return m_LSL_Functions.llRotTarget(rot, error); | ||
475 | } | ||
476 | |||
477 | public void llRotTargetRemove(int number) | ||
478 | { | ||
479 | m_LSL_Functions.llRotTargetRemove(number); | ||
480 | } | ||
481 | |||
482 | public void llMoveToTarget(vector target, double tau) | ||
483 | { | ||
484 | m_LSL_Functions.llMoveToTarget(target, tau); | ||
485 | } | ||
486 | |||
487 | public void llStopMoveToTarget() | ||
488 | { | ||
489 | m_LSL_Functions.llStopMoveToTarget(); | ||
490 | } | ||
491 | |||
492 | public void llApplyImpulse(vector force, int local) | ||
493 | { | ||
494 | m_LSL_Functions.llApplyImpulse(force, local); | ||
495 | } | ||
496 | |||
497 | // | ||
498 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
499 | // | ||
500 | public void llApplyRotationalImpulse(vector force, int local) | ||
501 | { | ||
502 | m_LSL_Functions.llApplyRotationalImpulse(force, local); | ||
503 | } | ||
504 | |||
505 | public void llSetTorque(vector torque, int local) | ||
506 | { | ||
507 | m_LSL_Functions.llSetTorque(torque, local); | ||
508 | } | ||
509 | |||
510 | public vector llGetTorque() | ||
511 | { | ||
512 | return m_LSL_Functions.llGetTorque(); | ||
513 | } | ||
514 | |||
515 | public void llSetForceAndTorque(vector force, vector torque, int local) | ||
516 | { | ||
517 | m_LSL_Functions.llSetForceAndTorque(force, torque, local); | ||
518 | } | ||
519 | |||
520 | public vector llGetVel() | ||
521 | { | ||
522 | return m_LSL_Functions.llGetVel(); | ||
523 | } | ||
524 | |||
525 | public vector llGetAccel() | ||
526 | { | ||
527 | return m_LSL_Functions.llGetAccel(); | ||
528 | } | ||
529 | |||
530 | public vector llGetOmega() | ||
531 | { | ||
532 | return m_LSL_Functions.llGetOmega(); | ||
533 | } | ||
534 | |||
535 | public double llGetTimeOfDay() | ||
536 | { | ||
537 | return m_LSL_Functions.llGetTimeOfDay(); | ||
538 | } | ||
539 | |||
540 | public double llGetWallclock() | ||
541 | { | ||
542 | return m_LSL_Functions.llGetWallclock(); | ||
543 | } | ||
544 | |||
545 | public double llGetTime() | ||
546 | { | ||
547 | return m_LSL_Functions.llGetTime(); | ||
548 | } | ||
549 | |||
550 | public void llResetTime() | ||
551 | { | ||
552 | m_LSL_Functions.llResetTime(); | ||
553 | } | ||
554 | |||
555 | public double llGetAndResetTime() | ||
556 | { | ||
557 | return m_LSL_Functions.llGetAndResetTime(); | ||
558 | } | ||
559 | |||
560 | public void llSound() | ||
561 | { | ||
562 | m_LSL_Functions.llSound(); | ||
563 | } | ||
564 | |||
565 | public void llPlaySound(string sound, double volume) | ||
566 | { | ||
567 | m_LSL_Functions.llPlaySound(sound, volume); | ||
568 | } | ||
569 | |||
570 | public void llLoopSound(string sound, double volume) | ||
571 | { | ||
572 | m_LSL_Functions.llLoopSound(sound, volume); | ||
573 | } | ||
574 | |||
575 | public void llLoopSoundMaster(string sound, double volume) | ||
576 | { | ||
577 | m_LSL_Functions.llLoopSoundMaster(sound, volume); | ||
578 | } | ||
579 | |||
580 | public void llLoopSoundSlave(string sound, double volume) | ||
581 | { | ||
582 | m_LSL_Functions.llLoopSoundSlave(sound, volume); | ||
583 | } | ||
584 | |||
585 | public void llPlaySoundSlave(string sound, double volume) | ||
586 | { | ||
587 | m_LSL_Functions.llPlaySoundSlave(sound, volume); | ||
588 | } | ||
589 | |||
590 | // | ||
591 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
592 | // | ||
593 | public void llTriggerSound(string sound, double volume) | ||
594 | { | ||
595 | m_LSL_Functions.llTriggerSound(sound, volume); | ||
596 | } | ||
597 | |||
598 | public void llStopSound() | ||
599 | { | ||
600 | m_LSL_Functions.llStopSound(); | ||
601 | } | ||
602 | |||
603 | public void llPreloadSound(string sound) | ||
604 | { | ||
605 | m_LSL_Functions.llPreloadSound(sound); | ||
606 | } | ||
607 | |||
608 | public string llGetSubString(string src, int start, int end) | ||
609 | { | ||
610 | return m_LSL_Functions.llGetSubString(src, start, end); | ||
611 | } | ||
612 | |||
613 | public string llDeleteSubString(string src, int start, int end) | ||
614 | { | ||
615 | return m_LSL_Functions.llDeleteSubString(src, start, end); | ||
616 | } | ||
617 | |||
618 | public string llInsertString(string dst, int position, string src) | ||
619 | { | ||
620 | return m_LSL_Functions.llInsertString(dst, position, src); | ||
621 | } | ||
622 | |||
623 | public string llToUpper(string source) | ||
624 | { | ||
625 | return m_LSL_Functions.llToUpper(source); | ||
626 | } | ||
627 | |||
628 | public string llToLower(string source) | ||
629 | { | ||
630 | return m_LSL_Functions.llToLower(source); | ||
631 | } | ||
632 | |||
633 | public int llGiveMoney(string destination, int amount) | ||
634 | { | ||
635 | return m_LSL_Functions.llGiveMoney(destination, amount); | ||
636 | } | ||
637 | |||
638 | public void llMakeExplosion() | ||
639 | { | ||
640 | m_LSL_Functions.llMakeExplosion(); | ||
641 | } | ||
642 | |||
643 | public void llMakeFountain() | ||
644 | { | ||
645 | m_LSL_Functions.llMakeFountain(); | ||
646 | } | ||
647 | |||
648 | public void llMakeSmoke() | ||
649 | { | ||
650 | m_LSL_Functions.llMakeSmoke(); | ||
651 | } | ||
652 | |||
653 | public void llMakeFire() | ||
654 | { | ||
655 | m_LSL_Functions.llMakeFire(); | ||
656 | } | ||
657 | |||
658 | public void llRezObject(string inventory, vector pos, rotation rot, int param) | ||
659 | { | ||
660 | m_LSL_Functions.llRezObject(inventory, pos, rot, param); | ||
661 | } | ||
662 | |||
663 | public void llLookAt(vector target, double strength, double damping) | ||
664 | { | ||
665 | m_LSL_Functions.llLookAt(target, strength, damping); | ||
666 | } | ||
667 | |||
668 | public void llStopLookAt() | ||
669 | { | ||
670 | m_LSL_Functions.llStopLookAt(); | ||
671 | } | ||
672 | |||
673 | public void llSetTimerEvent(double sec) | ||
674 | { | ||
675 | m_LSL_Functions.llSetTimerEvent(sec); | ||
676 | } | ||
677 | |||
678 | public void llSleep(double sec) | ||
679 | { | ||
680 | m_LSL_Functions.llSleep(sec); | ||
681 | } | ||
682 | |||
683 | // | ||
684 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
685 | // | ||
686 | public double llGetMass() | ||
687 | { | ||
688 | return m_LSL_Functions.llGetMass(); | ||
689 | } | ||
690 | |||
691 | public void llCollisionFilter(string name, string id, int accept) | ||
692 | { | ||
693 | m_LSL_Functions.llCollisionFilter(name, id, accept); | ||
694 | } | ||
695 | |||
696 | public void llTakeControls(int controls, int accept, int pass_on) | ||
697 | { | ||
698 | m_LSL_Functions.llTakeControls(controls, accept, pass_on); | ||
699 | } | ||
700 | |||
701 | public void llReleaseControls() | ||
702 | { | ||
703 | m_LSL_Functions.llReleaseControls(); | ||
704 | } | ||
705 | |||
706 | public void llAttachToAvatar(int attachment) | ||
707 | { | ||
708 | m_LSL_Functions.llAttachToAvatar(attachment); | ||
709 | } | ||
710 | |||
711 | public void llDetachFromAvatar() | ||
712 | { | ||
713 | m_LSL_Functions.llDetachFromAvatar(); | ||
714 | } | ||
715 | |||
716 | public void llTakeCamera() | ||
717 | { | ||
718 | m_LSL_Functions.llTakeCamera(); | ||
719 | } | ||
720 | |||
721 | public void llReleaseCamera() | ||
722 | { | ||
723 | m_LSL_Functions.llReleaseCamera(); | ||
724 | } | ||
725 | |||
726 | public string llGetOwner() | ||
727 | { | ||
728 | return m_LSL_Functions.llGetOwner(); | ||
729 | } | ||
730 | |||
731 | public void llInstantMessage(string user, string message) | ||
732 | { | ||
733 | m_LSL_Functions.llInstantMessage(user, message); | ||
734 | } | ||
735 | |||
736 | public void llEmail(string address, string subject, string message) | ||
737 | { | ||
738 | m_LSL_Functions.llEmail(address, subject, message); | ||
739 | } | ||
740 | |||
741 | public void llGetNextEmail(string address, string subject) | ||
742 | { | ||
743 | m_LSL_Functions.llGetNextEmail(address, subject); | ||
744 | } | ||
745 | |||
746 | public string llGetKey() | ||
747 | { | ||
748 | return m_LSL_Functions.llGetKey(); | ||
749 | } | ||
750 | |||
751 | public void llSetBuoyancy(double buoyancy) | ||
752 | { | ||
753 | m_LSL_Functions.llSetBuoyancy(buoyancy); | ||
754 | } | ||
755 | |||
756 | public void llSetHoverHeight(double height, int water, double tau) | ||
757 | { | ||
758 | m_LSL_Functions.llSetHoverHeight(height, water, tau); | ||
759 | } | ||
760 | |||
761 | public void llStopHover() | ||
762 | { | ||
763 | m_LSL_Functions.llStopHover(); | ||
764 | } | ||
765 | |||
766 | public void llMinEventDelay(double delay) | ||
767 | { | ||
768 | m_LSL_Functions.llMinEventDelay(delay); | ||
769 | } | ||
770 | |||
771 | public void llSoundPreload() | ||
772 | { | ||
773 | m_LSL_Functions.llSoundPreload(); | ||
774 | } | ||
775 | |||
776 | public void llRotLookAt(rotation target, double strength, double damping) | ||
777 | { | ||
778 | m_LSL_Functions.llRotLookAt(target, strength, damping); | ||
779 | } | ||
780 | |||
781 | // | ||
782 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
783 | // | ||
784 | public int llStringLength(string str) | ||
785 | { | ||
786 | return m_LSL_Functions.llStringLength(str); | ||
787 | } | ||
788 | |||
789 | public void llStartAnimation(string anim) | ||
790 | { | ||
791 | m_LSL_Functions.llStartAnimation(anim); | ||
792 | } | ||
793 | |||
794 | public void llStopAnimation(string anim) | ||
795 | { | ||
796 | m_LSL_Functions.llStopAnimation(anim); | ||
797 | } | ||
798 | |||
799 | public void llPointAt() | ||
800 | { | ||
801 | m_LSL_Functions.llPointAt(); | ||
802 | } | ||
803 | |||
804 | public void llStopPointAt() | ||
805 | { | ||
806 | m_LSL_Functions.llStopPointAt(); | ||
807 | } | ||
808 | |||
809 | public void llTargetOmega(vector axis, double spinrate, double gain) | ||
810 | { | ||
811 | m_LSL_Functions.llTargetOmega(axis, spinrate, gain); | ||
812 | } | ||
813 | |||
814 | public int llGetStartParameter() | ||
815 | { | ||
816 | return m_LSL_Functions.llGetStartParameter(); | ||
817 | } | ||
818 | |||
819 | public void llGodLikeRezObject(string inventory, vector pos) | ||
820 | { | ||
821 | m_LSL_Functions.llGodLikeRezObject(inventory, pos); | ||
822 | } | ||
823 | |||
824 | public void llRequestPermissions(string agent, int perm) | ||
825 | { | ||
826 | m_LSL_Functions.llRequestPermissions(agent, perm); | ||
827 | } | ||
828 | |||
829 | public string llGetPermissionsKey() | ||
830 | { | ||
831 | return m_LSL_Functions.llGetPermissionsKey(); | ||
832 | } | ||
833 | |||
834 | public int llGetPermissions() | ||
835 | { | ||
836 | return m_LSL_Functions.llGetPermissions(); | ||
837 | } | ||
838 | |||
839 | public int llGetLinkNumber() | ||
840 | { | ||
841 | return m_LSL_Functions.llGetLinkNumber(); | ||
842 | } | ||
843 | |||
844 | public void llSetLinkColor(int linknumber, vector color, int face) | ||
845 | { | ||
846 | m_LSL_Functions.llSetLinkColor(linknumber, color, face); | ||
847 | } | ||
848 | |||
849 | public void llCreateLink(string target, int parent) | ||
850 | { | ||
851 | m_LSL_Functions.llCreateLink(target, parent); | ||
852 | } | ||
853 | |||
854 | public void llBreakLink(int linknum) | ||
855 | { | ||
856 | m_LSL_Functions.llBreakLink(linknum); | ||
857 | } | ||
858 | |||
859 | public void llBreakAllLinks() | ||
860 | { | ||
861 | m_LSL_Functions.llBreakAllLinks(); | ||
862 | } | ||
863 | |||
864 | public string llGetLinkKey(int linknum) | ||
865 | { | ||
866 | return m_LSL_Functions.llGetLinkKey(linknum); | ||
867 | } | ||
868 | |||
869 | public void llGetLinkName(int linknum) | ||
870 | { | ||
871 | m_LSL_Functions.llGetLinkName(linknum); | ||
872 | } | ||
873 | |||
874 | public int llGetInventoryNumber(int type) | ||
875 | { | ||
876 | return m_LSL_Functions.llGetInventoryNumber(type); | ||
877 | } | ||
878 | |||
879 | public string llGetInventoryName(int type, int number) | ||
880 | { | ||
881 | return m_LSL_Functions.llGetInventoryName(type, number); | ||
882 | } | ||
883 | |||
884 | // | ||
885 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
886 | // | ||
887 | public void llSetScriptState(string name, int run) | ||
888 | { | ||
889 | m_LSL_Functions.llSetScriptState(name, run); | ||
890 | } | ||
891 | |||
892 | public double llGetEnergy() | ||
893 | { | ||
894 | return m_LSL_Functions.llGetEnergy(); | ||
895 | } | ||
896 | |||
897 | public void llGiveInventory(string destination, string inventory) | ||
898 | { | ||
899 | m_LSL_Functions.llGiveInventory(destination, inventory); | ||
900 | } | ||
901 | |||
902 | public void llRemoveInventory(string item) | ||
903 | { | ||
904 | m_LSL_Functions.llRemoveInventory(item); | ||
905 | } | ||
906 | |||
907 | public void llSetText(string text, vector color, double alpha) | ||
908 | { | ||
909 | m_LSL_Functions.llSetText(text, color, alpha); | ||
910 | } | ||
911 | |||
912 | public double llWater(vector offset) | ||
913 | { | ||
914 | return m_LSL_Functions.llWater(offset); | ||
915 | } | ||
916 | |||
917 | public void llPassTouches(int pass) | ||
918 | { | ||
919 | m_LSL_Functions.llPassTouches(pass); | ||
920 | } | ||
921 | |||
922 | public string llRequestAgentData(string id, int data) | ||
923 | { | ||
924 | return m_LSL_Functions.llRequestAgentData(id, data); | ||
925 | } | ||
926 | |||
927 | public string llRequestInventoryData(string name) | ||
928 | { | ||
929 | return m_LSL_Functions.llRequestInventoryData(name); | ||
930 | } | ||
931 | |||
932 | public void llSetDamage(double damage) | ||
933 | { | ||
934 | m_LSL_Functions.llSetDamage(damage); | ||
935 | } | ||
936 | |||
937 | public void llTeleportAgentHome(string agent) | ||
938 | { | ||
939 | m_LSL_Functions.llTeleportAgentHome(agent); | ||
940 | } | ||
941 | |||
942 | public void llModifyLand(int action, int brush) | ||
943 | { | ||
944 | m_LSL_Functions.llModifyLand(action, brush); | ||
945 | } | ||
946 | |||
947 | public void llCollisionSound(string impact_sound, double impact_volume) | ||
948 | { | ||
949 | m_LSL_Functions.llCollisionSound(impact_sound, impact_volume); | ||
950 | } | ||
951 | |||
952 | public void llCollisionSprite(string impact_sprite) | ||
953 | { | ||
954 | m_LSL_Functions.llCollisionSprite(impact_sprite); | ||
955 | } | ||
956 | |||
957 | public string llGetAnimation(string id) | ||
958 | { | ||
959 | return m_LSL_Functions.llGetAnimation(id); | ||
960 | } | ||
961 | |||
962 | public void llResetScript() | ||
963 | { | ||
964 | m_LSL_Functions.llResetScript(); | ||
965 | } | ||
966 | |||
967 | public void llMessageLinked(int linknum, int num, string str, string id) | ||
968 | { | ||
969 | m_LSL_Functions.llMessageLinked(linknum, num, str, id); | ||
970 | } | ||
971 | |||
972 | public void llPushObject(string target, vector impulse, vector ang_impulse, int local) | ||
973 | { | ||
974 | m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); | ||
975 | } | ||
976 | |||
977 | public void llPassCollisions(int pass) | ||
978 | { | ||
979 | m_LSL_Functions.llPassCollisions(pass); | ||
980 | } | ||
981 | |||
982 | public string llGetScriptName() | ||
983 | { | ||
984 | return m_LSL_Functions.llGetScriptName(); | ||
985 | } | ||
986 | |||
987 | public int llGetNumberOfSides() | ||
988 | { | ||
989 | return m_LSL_Functions.llGetNumberOfSides(); | ||
990 | } | ||
991 | |||
992 | // | ||
993 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
994 | // | ||
995 | public rotation llAxisAngle2Rot(vector axis, double angle) | ||
996 | { | ||
997 | return m_LSL_Functions.llAxisAngle2Rot(axis, angle); | ||
998 | } | ||
999 | |||
1000 | public vector llRot2Axis(rotation rot) | ||
1001 | { | ||
1002 | return m_LSL_Functions.llRot2Axis(rot); | ||
1003 | } | ||
1004 | |||
1005 | public void llRot2Angle() | ||
1006 | { | ||
1007 | m_LSL_Functions.llRot2Angle(); | ||
1008 | } | ||
1009 | |||
1010 | public double llAcos(double val) | ||
1011 | { | ||
1012 | return m_LSL_Functions.llAcos(val); | ||
1013 | } | ||
1014 | |||
1015 | public double llAsin(double val) | ||
1016 | { | ||
1017 | return m_LSL_Functions.llAsin(val); | ||
1018 | } | ||
1019 | |||
1020 | public double llAngleBetween(rotation a, rotation b) | ||
1021 | { | ||
1022 | return m_LSL_Functions.llAngleBetween(a, b); | ||
1023 | } | ||
1024 | |||
1025 | public string llGetInventoryKey(string name) | ||
1026 | { | ||
1027 | return m_LSL_Functions.llGetInventoryKey(name); | ||
1028 | } | ||
1029 | |||
1030 | public void llAllowInventoryDrop(int add) | ||
1031 | { | ||
1032 | m_LSL_Functions.llAllowInventoryDrop(add); | ||
1033 | } | ||
1034 | |||
1035 | public vector llGetSunDirection() | ||
1036 | { | ||
1037 | return m_LSL_Functions.llGetSunDirection(); | ||
1038 | } | ||
1039 | |||
1040 | public vector llGetTextureOffset(int face) | ||
1041 | { | ||
1042 | return m_LSL_Functions.llGetTextureOffset(face); | ||
1043 | } | ||
1044 | |||
1045 | public vector llGetTextureScale(int side) | ||
1046 | { | ||
1047 | return m_LSL_Functions.llGetTextureScale(side); | ||
1048 | } | ||
1049 | |||
1050 | public double llGetTextureRot(int side) | ||
1051 | { | ||
1052 | return m_LSL_Functions.llGetTextureRot(side); | ||
1053 | } | ||
1054 | |||
1055 | public int llSubStringIndex(string source, string pattern) | ||
1056 | { | ||
1057 | return m_LSL_Functions.llSubStringIndex(source, pattern); | ||
1058 | } | ||
1059 | |||
1060 | public string llGetOwnerKey(string id) | ||
1061 | { | ||
1062 | return m_LSL_Functions.llGetOwnerKey(id); | ||
1063 | } | ||
1064 | |||
1065 | public vector llGetCenterOfMass() | ||
1066 | { | ||
1067 | return m_LSL_Functions.llGetCenterOfMass(); | ||
1068 | } | ||
1069 | |||
1070 | public List<string> llListSort(List<string> src, int stride, int ascending) | ||
1071 | { | ||
1072 | return m_LSL_Functions.llListSort(src, stride, ascending); | ||
1073 | } | ||
1074 | |||
1075 | public int llGetListLength(List<string> src) | ||
1076 | { | ||
1077 | return m_LSL_Functions.llGetListLength(src); | ||
1078 | } | ||
1079 | |||
1080 | // | ||
1081 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1082 | // | ||
1083 | public int llList2Integer(List<string> src, int index) | ||
1084 | { | ||
1085 | return m_LSL_Functions.llList2Integer(src, index); | ||
1086 | } | ||
1087 | |||
1088 | public double llList2double(List<string> src, int index) | ||
1089 | { | ||
1090 | return m_LSL_Functions.llList2double(src, index); | ||
1091 | } | ||
1092 | |||
1093 | public string llList2String(List<string> src, int index) | ||
1094 | { | ||
1095 | return m_LSL_Functions.llList2String(src, index); | ||
1096 | } | ||
1097 | |||
1098 | public string llList2Key(List<string> src, int index) | ||
1099 | { | ||
1100 | return m_LSL_Functions.llList2Key(src, index); | ||
1101 | } | ||
1102 | |||
1103 | public vector llList2Vector(List<string> src, int index) | ||
1104 | { | ||
1105 | return m_LSL_Functions.llList2Vector(src, index); | ||
1106 | } | ||
1107 | |||
1108 | public rotation llList2Rot(List<string> src, int index) | ||
1109 | { | ||
1110 | return m_LSL_Functions.llList2Rot(src, index); | ||
1111 | } | ||
1112 | |||
1113 | public List<string> llList2List(List<string> src, int start, int end) | ||
1114 | { | ||
1115 | return m_LSL_Functions.llList2List(src, start, end); | ||
1116 | } | ||
1117 | |||
1118 | public List<string> llDeleteSubList(List<string> src, int start, int end) | ||
1119 | { | ||
1120 | return m_LSL_Functions.llDeleteSubList(src, start, end); | ||
1121 | } | ||
1122 | |||
1123 | public int llGetListEntryType(List<string> src, int index) | ||
1124 | { | ||
1125 | return m_LSL_Functions.llGetListEntryType(src, index); | ||
1126 | } | ||
1127 | |||
1128 | public string llList2CSV(List<string> src) | ||
1129 | { | ||
1130 | return m_LSL_Functions.llList2CSV(src); | ||
1131 | } | ||
1132 | |||
1133 | public List<string> llCSV2List(string src) | ||
1134 | { | ||
1135 | return m_LSL_Functions.llCSV2List(src); | ||
1136 | } | ||
1137 | |||
1138 | public List<string> llListRandomize(List<string> src, int stride) | ||
1139 | { | ||
1140 | return m_LSL_Functions.llListRandomize(src, stride); | ||
1141 | } | ||
1142 | |||
1143 | public List<string> llList2ListStrided(List<string> src, int start, int end, int stride) | ||
1144 | { | ||
1145 | return m_LSL_Functions.llList2ListStrided(src, start, end, stride); | ||
1146 | } | ||
1147 | |||
1148 | public vector llGetRegionCorner() | ||
1149 | { | ||
1150 | return m_LSL_Functions.llGetRegionCorner(); | ||
1151 | } | ||
1152 | |||
1153 | public List<string> llListInsertList(List<string> dest, List<string> src, int start) | ||
1154 | { | ||
1155 | return m_LSL_Functions.llListInsertList(dest, src, start); | ||
1156 | } | ||
1157 | |||
1158 | public int llListFindList(List<string> src, List<string> test) | ||
1159 | { | ||
1160 | return m_LSL_Functions.llListFindList(src, test); | ||
1161 | } | ||
1162 | |||
1163 | public string llGetObjectName() | ||
1164 | { | ||
1165 | return m_LSL_Functions.llGetObjectName(); | ||
1166 | } | ||
1167 | |||
1168 | public void llSetObjectName(string name) | ||
1169 | { | ||
1170 | m_LSL_Functions.llSetObjectName(name); | ||
1171 | } | ||
1172 | |||
1173 | public string llGetDate() | ||
1174 | { | ||
1175 | return m_LSL_Functions.llGetDate(); | ||
1176 | } | ||
1177 | |||
1178 | public int llEdgeOfWorld(vector pos, vector dir) | ||
1179 | { | ||
1180 | return m_LSL_Functions.llEdgeOfWorld(pos, dir); | ||
1181 | } | ||
1182 | |||
1183 | public int llGetAgentInfo(string id) | ||
1184 | { | ||
1185 | return m_LSL_Functions.llGetAgentInfo(id); | ||
1186 | } | ||
1187 | |||
1188 | // | ||
1189 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1190 | // | ||
1191 | public void llAdjustSoundVolume(double volume) | ||
1192 | { | ||
1193 | m_LSL_Functions.llAdjustSoundVolume(volume); | ||
1194 | } | ||
1195 | |||
1196 | public void llSetSoundQueueing(int queue) | ||
1197 | { | ||
1198 | m_LSL_Functions.llSetSoundQueueing(queue); | ||
1199 | } | ||
1200 | |||
1201 | public void llSetSoundRadius(double radius) | ||
1202 | { | ||
1203 | m_LSL_Functions.llSetSoundRadius(radius); | ||
1204 | } | ||
1205 | |||
1206 | public string llKey2Name(string id) | ||
1207 | { | ||
1208 | return m_LSL_Functions.llKey2Name(id); | ||
1209 | } | ||
1210 | |||
1211 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | ||
1212 | { | ||
1213 | m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate); | ||
1214 | } | ||
1215 | |||
1216 | public void llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) | ||
1217 | { | ||
1218 | m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west); | ||
1219 | } | ||
1220 | |||
1221 | public void llEjectFromLand(string pest) | ||
1222 | { | ||
1223 | m_LSL_Functions.llEjectFromLand(pest); | ||
1224 | } | ||
1225 | |||
1226 | public void llParseString2List() | ||
1227 | { | ||
1228 | m_LSL_Functions.llParseString2List(); | ||
1229 | } | ||
1230 | |||
1231 | public int llOverMyLand(string id) | ||
1232 | { | ||
1233 | return m_LSL_Functions.llOverMyLand(id); | ||
1234 | } | ||
1235 | |||
1236 | public string llGetLandOwnerAt(vector pos) | ||
1237 | { | ||
1238 | return m_LSL_Functions.llGetLandOwnerAt(pos); | ||
1239 | } | ||
1240 | |||
1241 | public string llGetNotecardLine(string name, int line) | ||
1242 | { | ||
1243 | return m_LSL_Functions.llGetNotecardLine(name, line); | ||
1244 | } | ||
1245 | |||
1246 | public vector llGetAgentSize(string id) | ||
1247 | { | ||
1248 | return m_LSL_Functions.llGetAgentSize(id); | ||
1249 | } | ||
1250 | |||
1251 | public int llSameGroup(string agent) | ||
1252 | { | ||
1253 | return m_LSL_Functions.llSameGroup(agent); | ||
1254 | } | ||
1255 | |||
1256 | public void llUnSit(string id) | ||
1257 | { | ||
1258 | m_LSL_Functions.llUnSit(id); | ||
1259 | } | ||
1260 | |||
1261 | public vector llGroundSlope(vector offset) | ||
1262 | { | ||
1263 | return m_LSL_Functions.llGroundSlope(offset); | ||
1264 | } | ||
1265 | |||
1266 | public vector llGroundNormal(vector offset) | ||
1267 | { | ||
1268 | return m_LSL_Functions.llGroundNormal(offset); | ||
1269 | } | ||
1270 | |||
1271 | public vector llGroundContour(vector offset) | ||
1272 | { | ||
1273 | return m_LSL_Functions.llGroundContour(offset); | ||
1274 | } | ||
1275 | |||
1276 | public int llGetAttached() | ||
1277 | { | ||
1278 | return m_LSL_Functions.llGetAttached(); | ||
1279 | } | ||
1280 | |||
1281 | public int llGetFreeMemory() | ||
1282 | { | ||
1283 | return m_LSL_Functions.llGetFreeMemory(); | ||
1284 | } | ||
1285 | |||
1286 | public string llGetRegionName() | ||
1287 | { | ||
1288 | return m_LSL_Functions.llGetRegionName(); | ||
1289 | } | ||
1290 | |||
1291 | public double llGetRegionTimeDilation() | ||
1292 | { | ||
1293 | return m_LSL_Functions.llGetRegionTimeDilation(); | ||
1294 | } | ||
1295 | |||
1296 | public double llGetRegionFPS() | ||
1297 | { | ||
1298 | return m_LSL_Functions.llGetRegionFPS(); | ||
1299 | } | ||
1300 | |||
1301 | // | ||
1302 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1303 | // | ||
1304 | public void llParticleSystem(List<Object> rules) | ||
1305 | { | ||
1306 | m_LSL_Functions.llParticleSystem(rules); | ||
1307 | } | ||
1308 | |||
1309 | public void llGroundRepel(double height, int water, double tau) | ||
1310 | { | ||
1311 | m_LSL_Functions.llGroundRepel(height, water, tau); | ||
1312 | } | ||
1313 | |||
1314 | public void llGiveInventoryList() | ||
1315 | { | ||
1316 | m_LSL_Functions.llGiveInventoryList(); | ||
1317 | } | ||
1318 | |||
1319 | public void llSetVehicleType(int type) | ||
1320 | { | ||
1321 | m_LSL_Functions.llSetVehicleType(type); | ||
1322 | } | ||
1323 | |||
1324 | public void llSetVehicledoubleParam(int param, double value) | ||
1325 | { | ||
1326 | m_LSL_Functions.llSetVehicledoubleParam(param, value); | ||
1327 | } | ||
1328 | |||
1329 | public void llSetVehicleVectorParam(int param, vector vec) | ||
1330 | { | ||
1331 | m_LSL_Functions.llSetVehicleVectorParam(param, vec); | ||
1332 | } | ||
1333 | |||
1334 | public void llSetVehicleRotationParam(int param, rotation rot) | ||
1335 | { | ||
1336 | m_LSL_Functions.llSetVehicleRotationParam(param, rot); | ||
1337 | } | ||
1338 | |||
1339 | public void llSetVehicleFlags(int flags) | ||
1340 | { | ||
1341 | m_LSL_Functions.llSetVehicleFlags(flags); | ||
1342 | } | ||
1343 | |||
1344 | public void llRemoveVehicleFlags(int flags) | ||
1345 | { | ||
1346 | m_LSL_Functions.llRemoveVehicleFlags(flags); | ||
1347 | } | ||
1348 | |||
1349 | public void llSitTarget(vector offset, rotation rot) | ||
1350 | { | ||
1351 | m_LSL_Functions.llSitTarget(offset, rot); | ||
1352 | } | ||
1353 | |||
1354 | public string llAvatarOnSitTarget() | ||
1355 | { | ||
1356 | return m_LSL_Functions.llAvatarOnSitTarget(); | ||
1357 | } | ||
1358 | |||
1359 | public void llAddToLandPassList(string avatar, double hours) | ||
1360 | { | ||
1361 | m_LSL_Functions.llAddToLandPassList(avatar, hours); | ||
1362 | } | ||
1363 | |||
1364 | public void llSetTouchText(string text) | ||
1365 | { | ||
1366 | m_LSL_Functions.llSetTouchText(text); | ||
1367 | } | ||
1368 | |||
1369 | public void llSetSitText(string text) | ||
1370 | { | ||
1371 | m_LSL_Functions.llSetSitText(text); | ||
1372 | } | ||
1373 | |||
1374 | public void llSetCameraEyeOffset(vector offset) | ||
1375 | { | ||
1376 | m_LSL_Functions.llSetCameraEyeOffset(offset); | ||
1377 | } | ||
1378 | |||
1379 | public void llSetCameraAtOffset(vector offset) | ||
1380 | { | ||
1381 | m_LSL_Functions.llSetCameraAtOffset(offset); | ||
1382 | } | ||
1383 | |||
1384 | public void llDumpList2String() | ||
1385 | { | ||
1386 | m_LSL_Functions.llDumpList2String(); | ||
1387 | } | ||
1388 | |||
1389 | public void llScriptDanger(vector pos) | ||
1390 | { | ||
1391 | m_LSL_Functions.llScriptDanger(pos); | ||
1392 | } | ||
1393 | |||
1394 | public void llDialog(string avatar, string message, List<string> buttons, int chat_channel) | ||
1395 | { | ||
1396 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | ||
1397 | } | ||
1398 | |||
1399 | public void llVolumeDetect(int detect) | ||
1400 | { | ||
1401 | m_LSL_Functions.llVolumeDetect(detect); | ||
1402 | } | ||
1403 | |||
1404 | public void llResetOtherScript(string name) | ||
1405 | { | ||
1406 | m_LSL_Functions.llResetOtherScript(name); | ||
1407 | } | ||
1408 | |||
1409 | public int llGetScriptState(string name) | ||
1410 | { | ||
1411 | return m_LSL_Functions.llGetScriptState(name); | ||
1412 | } | ||
1413 | |||
1414 | public void llRemoteLoadScript() | ||
1415 | { | ||
1416 | m_LSL_Functions.llRemoteLoadScript(); | ||
1417 | } | ||
1418 | |||
1419 | public void llSetRemoteScriptAccessPin(int pin) | ||
1420 | { | ||
1421 | m_LSL_Functions.llSetRemoteScriptAccessPin(pin); | ||
1422 | } | ||
1423 | |||
1424 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | ||
1425 | { | ||
1426 | m_LSL_Functions.llRemoteLoadScriptPin(target, name, pin, running, start_param); | ||
1427 | } | ||
1428 | |||
1429 | // | ||
1430 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1431 | // | ||
1432 | public void llOpenRemoteDataChannel() | ||
1433 | { | ||
1434 | m_LSL_Functions.llOpenRemoteDataChannel(); | ||
1435 | } | ||
1436 | |||
1437 | public string llSendRemoteData(string channel, string dest, int idata, string sdata) | ||
1438 | { | ||
1439 | return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); | ||
1440 | } | ||
1441 | |||
1442 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) | ||
1443 | { | ||
1444 | m_LSL_Functions.llRemoteDataReply(channel, message_id, sdata, idata); | ||
1445 | } | ||
1446 | |||
1447 | public void llCloseRemoteDataChannel(string channel) | ||
1448 | { | ||
1449 | m_LSL_Functions.llCloseRemoteDataChannel(channel); | ||
1450 | } | ||
1451 | |||
1452 | public string llMD5String(string src, int nonce) | ||
1453 | { | ||
1454 | return m_LSL_Functions.llMD5String(src, nonce); | ||
1455 | } | ||
1456 | |||
1457 | public void llSetPrimitiveParams(List<string> rules) | ||
1458 | { | ||
1459 | m_LSL_Functions.llSetPrimitiveParams(rules); | ||
1460 | } | ||
1461 | |||
1462 | public string llStringToBase64(string str) | ||
1463 | { | ||
1464 | return m_LSL_Functions.llStringToBase64(str); | ||
1465 | } | ||
1466 | |||
1467 | public string llBase64ToString(string str) | ||
1468 | { | ||
1469 | return m_LSL_Functions.llBase64ToString(str); | ||
1470 | } | ||
1471 | |||
1472 | public void llXorBase64Strings() | ||
1473 | { | ||
1474 | m_LSL_Functions.llXorBase64Strings(); | ||
1475 | } | ||
1476 | |||
1477 | public void llRemoteDataSetRegion() | ||
1478 | { | ||
1479 | m_LSL_Functions.llRemoteDataSetRegion(); | ||
1480 | } | ||
1481 | |||
1482 | public double llLog10(double val) | ||
1483 | { | ||
1484 | return m_LSL_Functions.llLog10(val); | ||
1485 | } | ||
1486 | |||
1487 | public double llLog(double val) | ||
1488 | { | ||
1489 | return m_LSL_Functions.llLog(val); | ||
1490 | } | ||
1491 | |||
1492 | public List<string> llGetAnimationList(string id) | ||
1493 | { | ||
1494 | return m_LSL_Functions.llGetAnimationList(id); | ||
1495 | } | ||
1496 | |||
1497 | public void llSetParcelMusicURL(string url) | ||
1498 | { | ||
1499 | m_LSL_Functions.llSetParcelMusicURL(url); | ||
1500 | } | ||
1501 | |||
1502 | public vector llGetRootPosition() | ||
1503 | { | ||
1504 | return m_LSL_Functions.llGetRootPosition(); | ||
1505 | } | ||
1506 | |||
1507 | public rotation llGetRootRotation() | ||
1508 | { | ||
1509 | return m_LSL_Functions.llGetRootRotation(); | ||
1510 | } | ||
1511 | |||
1512 | public string llGetObjectDesc() | ||
1513 | { | ||
1514 | return m_LSL_Functions.llGetObjectDesc(); | ||
1515 | } | ||
1516 | |||
1517 | public void llSetObjectDesc(string desc) | ||
1518 | { | ||
1519 | m_LSL_Functions.llSetObjectDesc(desc); | ||
1520 | } | ||
1521 | |||
1522 | public string llGetCreator() | ||
1523 | { | ||
1524 | return m_LSL_Functions.llGetCreator(); | ||
1525 | } | ||
1526 | |||
1527 | public string llGetTimestamp() | ||
1528 | { | ||
1529 | return m_LSL_Functions.llGetTimestamp(); | ||
1530 | } | ||
1531 | |||
1532 | public void llSetLinkAlpha(int linknumber, double alpha, int face) | ||
1533 | { | ||
1534 | m_LSL_Functions.llSetLinkAlpha(linknumber, alpha, face); | ||
1535 | } | ||
1536 | |||
1537 | public int llGetNumberOfPrims() | ||
1538 | { | ||
1539 | return m_LSL_Functions.llGetNumberOfPrims(); | ||
1540 | } | ||
1541 | |||
1542 | public string llGetNumberOfNotecardLines(string name) | ||
1543 | { | ||
1544 | return m_LSL_Functions.llGetNumberOfNotecardLines(name); | ||
1545 | } | ||
1546 | |||
1547 | public List<string> llGetBoundingBox(string obj) | ||
1548 | { | ||
1549 | return m_LSL_Functions.llGetBoundingBox(obj); | ||
1550 | } | ||
1551 | |||
1552 | public vector llGetGeometricCenter() | ||
1553 | { | ||
1554 | return m_LSL_Functions.llGetGeometricCenter(); | ||
1555 | } | ||
1556 | |||
1557 | public void llGetPrimitiveParams() | ||
1558 | { | ||
1559 | m_LSL_Functions.llGetPrimitiveParams(); | ||
1560 | } | ||
1561 | |||
1562 | // | ||
1563 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1564 | // | ||
1565 | public string llIntegerToBase64(int number) | ||
1566 | { | ||
1567 | return m_LSL_Functions.llIntegerToBase64(number); | ||
1568 | } | ||
1569 | |||
1570 | public int llBase64ToInteger(string str) | ||
1571 | { | ||
1572 | return m_LSL_Functions.llBase64ToInteger(str); | ||
1573 | } | ||
1574 | |||
1575 | public double llGetGMTclock() | ||
1576 | { | ||
1577 | return m_LSL_Functions.llGetGMTclock(); | ||
1578 | } | ||
1579 | |||
1580 | public string llGetSimulatorHostname() | ||
1581 | { | ||
1582 | return m_LSL_Functions.llGetSimulatorHostname(); | ||
1583 | } | ||
1584 | |||
1585 | public void llSetLocalRot(rotation rot) | ||
1586 | { | ||
1587 | m_LSL_Functions.llSetLocalRot(rot); | ||
1588 | } | ||
1589 | |||
1590 | public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) | ||
1591 | { | ||
1592 | return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers); | ||
1593 | } | ||
1594 | |||
1595 | public void llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, int param) | ||
1596 | { | ||
1597 | m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param); | ||
1598 | } | ||
1599 | |||
1600 | public int llGetObjectPermMask(int mask) | ||
1601 | { | ||
1602 | return m_LSL_Functions.llGetObjectPermMask(mask); | ||
1603 | } | ||
1604 | |||
1605 | public void llSetObjectPermMask(int mask, int value) | ||
1606 | { | ||
1607 | m_LSL_Functions.llSetObjectPermMask(mask, value); | ||
1608 | } | ||
1609 | |||
1610 | public void llGetInventoryPermMask(string item, int mask) | ||
1611 | { | ||
1612 | m_LSL_Functions.llGetInventoryPermMask(item, mask); | ||
1613 | } | ||
1614 | |||
1615 | public void llSetInventoryPermMask(string item, int mask, int value) | ||
1616 | { | ||
1617 | m_LSL_Functions.llSetInventoryPermMask(item, mask, value); | ||
1618 | } | ||
1619 | |||
1620 | public string llGetInventoryCreator(string item) | ||
1621 | { | ||
1622 | return m_LSL_Functions.llGetInventoryCreator(item); | ||
1623 | } | ||
1624 | |||
1625 | public void llRequestSimulatorData(string simulator, int data) | ||
1626 | { | ||
1627 | m_LSL_Functions.llRequestSimulatorData(simulator, data); | ||
1628 | } | ||
1629 | |||
1630 | public void llForceMouselook(int mouselook) | ||
1631 | { | ||
1632 | m_LSL_Functions.llForceMouselook(mouselook); | ||
1633 | } | ||
1634 | |||
1635 | public double llGetObjectMass(string id) | ||
1636 | { | ||
1637 | return m_LSL_Functions.llGetObjectMass(id); | ||
1638 | } | ||
1639 | |||
1640 | public void llListReplaceList() | ||
1641 | { | ||
1642 | m_LSL_Functions.llListReplaceList(); | ||
1643 | } | ||
1644 | |||
1645 | public void llLoadURL(string avatar_id, string message, string url) | ||
1646 | { | ||
1647 | m_LSL_Functions.llLoadURL(avatar_id, message, url); | ||
1648 | } | ||
1649 | |||
1650 | public void llParcelMediaCommandList(List<string> commandList) | ||
1651 | { | ||
1652 | m_LSL_Functions.llParcelMediaCommandList(commandList); | ||
1653 | } | ||
1654 | |||
1655 | public void llParcelMediaQuery() | ||
1656 | { | ||
1657 | m_LSL_Functions.llParcelMediaQuery(); | ||
1658 | } | ||
1659 | |||
1660 | public int llModPow(int a, int b, int c) | ||
1661 | { | ||
1662 | return m_LSL_Functions.llModPow(a, b, c); | ||
1663 | } | ||
1664 | |||
1665 | // | ||
1666 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1667 | // | ||
1668 | public int llGetInventoryType(string name) | ||
1669 | { | ||
1670 | return m_LSL_Functions.llGetInventoryType(name); | ||
1671 | } | ||
1672 | |||
1673 | public void llSetPayPrice(int price, List<string> quick_pay_buttons) | ||
1674 | { | ||
1675 | m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons); | ||
1676 | } | ||
1677 | |||
1678 | public vector llGetCameraPos() | ||
1679 | { | ||
1680 | return m_LSL_Functions.llGetCameraPos(); | ||
1681 | } | ||
1682 | |||
1683 | public rotation llGetCameraRot() | ||
1684 | { | ||
1685 | return m_LSL_Functions.llGetCameraRot(); | ||
1686 | } | ||
1687 | |||
1688 | public void llSetPrimURL() | ||
1689 | { | ||
1690 | m_LSL_Functions.llSetPrimURL(); | ||
1691 | } | ||
1692 | |||
1693 | public void llRefreshPrimURL() | ||
1694 | { | ||
1695 | m_LSL_Functions.llRefreshPrimURL(); | ||
1696 | } | ||
1697 | |||
1698 | public string llEscapeURL(string url) | ||
1699 | { | ||
1700 | return m_LSL_Functions.llEscapeURL(url); | ||
1701 | } | ||
1702 | |||
1703 | public string llUnescapeURL(string url) | ||
1704 | { | ||
1705 | return m_LSL_Functions.llUnescapeURL(url); | ||
1706 | } | ||
1707 | |||
1708 | public void llMapDestination(string simname, vector pos, vector look_at) | ||
1709 | { | ||
1710 | m_LSL_Functions.llMapDestination(simname, pos, look_at); | ||
1711 | } | ||
1712 | |||
1713 | public void llAddToLandBanList(string avatar, double hours) | ||
1714 | { | ||
1715 | m_LSL_Functions.llAddToLandBanList(avatar, hours); | ||
1716 | } | ||
1717 | |||
1718 | public void llRemoveFromLandPassList(string avatar) | ||
1719 | { | ||
1720 | m_LSL_Functions.llRemoveFromLandPassList(avatar); | ||
1721 | } | ||
1722 | |||
1723 | public void llRemoveFromLandBanList(string avatar) | ||
1724 | { | ||
1725 | m_LSL_Functions.llRemoveFromLandBanList(avatar); | ||
1726 | } | ||
1727 | |||
1728 | public void llSetCameraParams(List<string> rules) | ||
1729 | { | ||
1730 | m_LSL_Functions.llSetCameraParams(rules); | ||
1731 | } | ||
1732 | |||
1733 | public void llClearCameraParams() | ||
1734 | { | ||
1735 | m_LSL_Functions.llClearCameraParams(); | ||
1736 | } | ||
1737 | |||
1738 | public double llListStatistics(int operation, List<string> src) | ||
1739 | { | ||
1740 | return m_LSL_Functions.llListStatistics(operation, src); | ||
1741 | } | ||
1742 | |||
1743 | public int llGetUnixTime() | ||
1744 | { | ||
1745 | return m_LSL_Functions.llGetUnixTime(); | ||
1746 | } | ||
1747 | |||
1748 | public int llGetParcelFlags(vector pos) | ||
1749 | { | ||
1750 | return m_LSL_Functions.llGetParcelFlags(pos); | ||
1751 | } | ||
1752 | |||
1753 | public int llGetRegionFlags() | ||
1754 | { | ||
1755 | return m_LSL_Functions.llGetRegionFlags(); | ||
1756 | } | ||
1757 | |||
1758 | public string llXorBase64StringsCorrect(string str1, string str2) | ||
1759 | { | ||
1760 | return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); | ||
1761 | } | ||
1762 | |||
1763 | public void llHTTPRequest(string url, List<string> parameters, string body) | ||
1764 | { | ||
1765 | m_LSL_Functions.llHTTPRequest(url, parameters, body); | ||
1766 | } | ||
1767 | |||
1768 | public void llResetLandBanList() | ||
1769 | { | ||
1770 | m_LSL_Functions.llResetLandBanList(); | ||
1771 | } | ||
1772 | |||
1773 | public void llResetLandPassList() | ||
1774 | { | ||
1775 | m_LSL_Functions.llResetLandPassList(); | ||
1776 | } | ||
1777 | |||
1778 | public int llGetParcelPrimCount(vector pos, int category, int sim_wide) | ||
1779 | { | ||
1780 | return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); | ||
1781 | } | ||
1782 | |||
1783 | public List<string> llGetParcelPrimOwners(vector pos) | ||
1784 | { | ||
1785 | return m_LSL_Functions.llGetParcelPrimOwners(pos); | ||
1786 | } | ||
1787 | |||
1788 | public int llGetObjectPrimCount(string object_id) | ||
1789 | { | ||
1790 | return m_LSL_Functions.llGetObjectPrimCount(object_id); | ||
1791 | } | ||
1792 | |||
1793 | // | ||
1794 | // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs | ||
1795 | // | ||
1796 | public int llGetParcelMaxPrims(vector pos, int sim_wide) | ||
1797 | { | ||
1798 | return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); | ||
1799 | } | ||
1800 | |||
1801 | public List<string> llGetParcelDetails(vector pos, List<string> param) | ||
1802 | { | ||
1803 | return m_LSL_Functions.llGetParcelDetails(pos, param); | ||
1804 | } | ||
1805 | |||
1806 | // | ||
1807 | // OpenSim Functions | ||
1808 | // | ||
1809 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | ||
1810 | int timer) | ||
1811 | { | ||
1812 | return m_LSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer); | ||
1813 | } | ||
1814 | |||
1815 | // LSL CONSTANTS | ||
1816 | public const int TRUE = 1; | ||
1817 | public const int FALSE = 0; | ||
1818 | public const int STATUS_PHYSICS = 1; | ||
1819 | public const int STATUS_ROTATE_X = 2; | ||
1820 | public const int STATUS_ROTATE_Y = 4; | ||
1821 | public const int STATUS_ROTATE_Z = 8; | ||
1822 | public const int STATUS_PHANTOM = 16; | ||
1823 | public const int STATUS_SANDBOX = 32; | ||
1824 | public const int STATUS_BLOCK_GRAB = 64; | ||
1825 | public const int STATUS_DIE_AT_EDGE = 128; | ||
1826 | public const int STATUS_RETURN_AT_EDGE = 256; | ||
1827 | public const int AGENT = 1; | ||
1828 | public const int ACTIVE = 2; | ||
1829 | public const int PASSIVE = 4; | ||
1830 | public const int SCRIPTED = 8; | ||
1831 | public const int CONTROL_FWD = 1; | ||
1832 | public const int CONTROL_BACK = 2; | ||
1833 | public const int CONTROL_LEFT = 4; | ||
1834 | public const int CONTROL_RIGHT = 8; | ||
1835 | public const int CONTROL_UP = 16; | ||
1836 | public const int CONTROL_DOWN = 32; | ||
1837 | public const int CONTROL_ROT_LEFT = 256; | ||
1838 | public const int CONTROL_ROT_RIGHT = 512; | ||
1839 | public const int CONTROL_LBUTTON = 268435456; | ||
1840 | public const int CONTROL_ML_LBUTTON = 1073741824; | ||
1841 | public const int PERMISSION_DEBIT = 2; | ||
1842 | public const int PERMISSION_TAKE_CONTROLS = 4; | ||
1843 | public const int PERMISSION_REMAP_CONTROLS = 8; | ||
1844 | public const int PERMISSION_TRIGGER_ANIMATION = 16; | ||
1845 | public const int PERMISSION_ATTACH = 32; | ||
1846 | public const int PERMISSION_RELEASE_OWNERSHIP = 64; | ||
1847 | public const int PERMISSION_CHANGE_LINKS = 128; | ||
1848 | public const int PERMISSION_CHANGE_JOINTS = 256; | ||
1849 | public const int PERMISSION_CHANGE_PERMISSIONS = 512; | ||
1850 | public const int PERMISSION_TRACK_CAMERA = 1024; | ||
1851 | public const int PERMISSION_CONTROL_CAMERA = 2048; | ||
1852 | public const int AGENT_FLYING = 1; | ||
1853 | public const int AGENT_ATTACHMENTS = 2; | ||
1854 | public const int AGENT_SCRIPTED = 4; | ||
1855 | public const int AGENT_MOUSELOOK = 8; | ||
1856 | public const int AGENT_SITTING = 16; | ||
1857 | public const int AGENT_ON_OBJECT = 32; | ||
1858 | public const int AGENT_AWAY = 64; | ||
1859 | public const int AGENT_WALKING = 128; | ||
1860 | public const int AGENT_IN_AIR = 256; | ||
1861 | public const int AGENT_TYPING = 512; | ||
1862 | public const int AGENT_CROUCHING = 1024; | ||
1863 | public const int AGENT_BUSY = 2048; | ||
1864 | public const int AGENT_ALWAYS_RUN = 4096; | ||
1865 | public const int PSYS_PART_INTERP_COLOR_MASK = 1; | ||
1866 | public const int PSYS_PART_INTERP_SCALE_MASK = 2; | ||
1867 | public const int PSYS_PART_BOUNCE_MASK = 4; | ||
1868 | public const int PSYS_PART_WIND_MASK = 8; | ||
1869 | public const int PSYS_PART_FOLLOW_SRC_MASK = 16; | ||
1870 | public const int PSYS_PART_FOLLOW_VELOCITY_MASK = 32; | ||
1871 | public const int PSYS_PART_TARGET_POS_MASK = 64; | ||
1872 | public const int PSYS_PART_TARGET_LINEAR_MASK = 128; | ||
1873 | public const int PSYS_PART_EMISSIVE_MASK = 256; | ||
1874 | public const int PSYS_PART_FLAGS = 0; | ||
1875 | public const int PSYS_PART_START_COLOR = 1; | ||
1876 | public const int PSYS_PART_START_ALPHA = 2; | ||
1877 | public const int PSYS_PART_END_COLOR = 3; | ||
1878 | public const int PSYS_PART_END_ALPHA = 4; | ||
1879 | public const int PSYS_PART_START_SCALE = 5; | ||
1880 | public const int PSYS_PART_END_SCALE = 6; | ||
1881 | public const int PSYS_PART_MAX_AGE = 7; | ||
1882 | public const int PSYS_SRC_ACCEL = 8; | ||
1883 | public const int PSYS_SRC_PATTERN = 9; | ||
1884 | public const int PSYS_SRC_INNERANGLE = 10; | ||
1885 | public const int PSYS_SRC_OUTERANGLE = 11; | ||
1886 | public const int PSYS_SRC_TEXTURE = 12; | ||
1887 | public const int PSYS_SRC_BURST_RATE = 13; | ||
1888 | public const int PSYS_SRC_BURST_PART_COUNT = 15; | ||
1889 | public const int PSYS_SRC_BURST_RADIUS = 16; | ||
1890 | public const int PSYS_SRC_BURST_SPEED_MIN = 17; | ||
1891 | public const int PSYS_SRC_BURST_SPEED_MAX = 18; | ||
1892 | public const int PSYS_SRC_MAX_AGE = 19; | ||
1893 | public const int PSYS_SRC_TARGET_KEY = 20; | ||
1894 | public const int PSYS_SRC_OMEGA = 21; | ||
1895 | public const int PSYS_SRC_ANGLE_BEGIN = 22; | ||
1896 | public const int PSYS_SRC_ANGLE_END = 23; | ||
1897 | public const int PSYS_SRC_PATTERN_DROP = 1; | ||
1898 | public const int PSYS_SRC_PATTERN_EXPLODE = 2; | ||
1899 | public const int PSYS_SRC_PATTERN_ANGLE = 4; | ||
1900 | public const int PSYS_SRC_PATTERN_ANGLE_CONE = 8; | ||
1901 | public const int PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY = 16; | ||
1902 | public const int VEHICLE_TYPE_NONE = 0; | ||
1903 | public const int VEHICLE_TYPE_SLED = 1; | ||
1904 | public const int VEHICLE_TYPE_CAR = 2; | ||
1905 | public const int VEHICLE_TYPE_BOAT = 3; | ||
1906 | public const int VEHICLE_TYPE_AIRPLANE = 4; | ||
1907 | public const int VEHICLE_TYPE_BALLOON = 5; | ||
1908 | public const int VEHICLE_LINEAR_FRICTION_TIMESCALE = 16; | ||
1909 | public const int VEHICLE_ANGULAR_FRICTION_TIMESCALE = 17; | ||
1910 | public const int VEHICLE_LINEAR_MOTOR_DIRECTION = 18; | ||
1911 | public const int VEHICLE_LINEAR_MOTOR_OFFSET = 20; | ||
1912 | public const int VEHICLE_ANGULAR_MOTOR_DIRECTION = 19; | ||
1913 | public const int VEHICLE_HOVER_HEIGHT = 24; | ||
1914 | public const int VEHICLE_HOVER_EFFICIENCY = 25; | ||
1915 | public const int VEHICLE_HOVER_TIMESCALE = 26; | ||
1916 | public const int VEHICLE_BUOYANCY = 27; | ||
1917 | public const int VEHICLE_LINEAR_DEFLECTION_EFFICIENCY = 28; | ||
1918 | public const int VEHICLE_LINEAR_DEFLECTION_TIMESCALE = 29; | ||
1919 | public const int VEHICLE_LINEAR_MOTOR_TIMESCALE = 30; | ||
1920 | public const int VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE = 31; | ||
1921 | public const int VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY = 32; | ||
1922 | public const int VEHICLE_ANGULAR_DEFLECTION_TIMESCALE = 33; | ||
1923 | public const int VEHICLE_ANGULAR_MOTOR_TIMESCALE = 34; | ||
1924 | public const int VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE = 35; | ||
1925 | public const int VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY = 36; | ||
1926 | public const int VEHICLE_VERTICAL_ATTRACTION_TIMESCALE = 37; | ||
1927 | public const int VEHICLE_BANKING_EFFICIENCY = 38; | ||
1928 | public const int VEHICLE_BANKING_MIX = 39; | ||
1929 | public const int VEHICLE_BANKING_TIMESCALE = 40; | ||
1930 | public const int VEHICLE_REFERENCE_FRAME = 44; | ||
1931 | public const int VEHICLE_FLAG_NO_DEFLECTION_UP = 1; | ||
1932 | public const int VEHICLE_FLAG_LIMIT_ROLL_ONLY = 2; | ||
1933 | public const int VEHICLE_FLAG_HOVER_WATER_ONLY = 4; | ||
1934 | public const int VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 8; | ||
1935 | public const int VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT = 16; | ||
1936 | public const int VEHICLE_FLAG_HOVER_UP_ONLY = 32; | ||
1937 | public const int VEHICLE_FLAG_LIMIT_MOTOR_UP = 64; | ||
1938 | public const int VEHICLE_FLAG_MOUSELOOK_STEER = 128; | ||
1939 | public const int VEHICLE_FLAG_MOUSELOOK_BANK = 256; | ||
1940 | public const int VEHICLE_FLAG_CAMERA_DECOUPLED = 512; | ||
1941 | public const int INVENTORY_ALL = -1; | ||
1942 | public const int INVENTORY_NONE = -1; | ||
1943 | public const int INVENTORY_TEXTURE = 0; | ||
1944 | public const int INVENTORY_SOUND = 1; | ||
1945 | public const int INVENTORY_LANDMARK = 3; | ||
1946 | public const int INVENTORY_CLOTHING = 5; | ||
1947 | public const int INVENTORY_OBJECT = 6; | ||
1948 | public const int INVENTORY_NOTECARD = 7; | ||
1949 | public const int INVENTORY_SCRIPT = 10; | ||
1950 | public const int INVENTORY_BODYPART = 13; | ||
1951 | public const int INVENTORY_ANIMATION = 20; | ||
1952 | public const int INVENTORY_GESTURE = 21; | ||
1953 | public const int ATTACH_CHEST = 1; | ||
1954 | public const int ATTACH_HEAD = 2; | ||
1955 | public const int ATTACH_LSHOULDER = 3; | ||
1956 | public const int ATTACH_RSHOULDER = 4; | ||
1957 | public const int ATTACH_LHAND = 5; | ||
1958 | public const int ATTACH_RHAND = 6; | ||
1959 | public const int ATTACH_LFOOT = 7; | ||
1960 | public const int ATTACH_RFOOT = 8; | ||
1961 | public const int ATTACH_BACK = 9; | ||
1962 | public const int ATTACH_PELVIS = 10; | ||
1963 | public const int ATTACH_MOUTH = 11; | ||
1964 | public const int ATTACH_CHIN = 12; | ||
1965 | public const int ATTACH_LEAR = 13; | ||
1966 | public const int ATTACH_REAR = 14; | ||
1967 | public const int ATTACH_LEYE = 15; | ||
1968 | public const int ATTACH_REYE = 16; | ||
1969 | public const int ATTACH_NOSE = 17; | ||
1970 | public const int ATTACH_RUARM = 18; | ||
1971 | public const int ATTACH_RLARM = 19; | ||
1972 | public const int ATTACH_LUARM = 20; | ||
1973 | public const int ATTACH_LLARM = 21; | ||
1974 | public const int ATTACH_RHIP = 22; | ||
1975 | public const int ATTACH_RULEG = 23; | ||
1976 | public const int ATTACH_RLLEG = 24; | ||
1977 | public const int ATTACH_LHIP = 25; | ||
1978 | public const int ATTACH_LULEG = 26; | ||
1979 | public const int ATTACH_LLLEG = 27; | ||
1980 | public const int ATTACH_BELLY = 28; | ||
1981 | public const int ATTACH_RPEC = 29; | ||
1982 | public const int ATTACH_LPEC = 30; | ||
1983 | public const int LAND_LEVEL = 0; | ||
1984 | public const int LAND_RAISE = 1; | ||
1985 | public const int LAND_LOWER = 2; | ||
1986 | public const int LAND_SMOOTH = 3; | ||
1987 | public const int LAND_NOISE = 4; | ||
1988 | public const int LAND_REVERT = 5; | ||
1989 | public const int LAND_SMALL_BRUSH = 1; | ||
1990 | public const int LAND_MEDIUM_BRUSH = 2; | ||
1991 | public const int LAND_LARGE_BRUSH = 3; | ||
1992 | public const int DATA_ONLINE = 1; | ||
1993 | public const int DATA_NAME = 2; | ||
1994 | public const int DATA_BORN = 3; | ||
1995 | public const int DATA_RATING = 4; | ||
1996 | public const int DATA_SIM_POS = 5; | ||
1997 | public const int DATA_SIM_STATUS = 6; | ||
1998 | public const int DATA_SIM_RATING = 7; | ||
1999 | public const int ANIM_ON = 1; | ||
2000 | public const int LOOP = 2; | ||
2001 | public const int REVERSE = 4; | ||
2002 | public const int PING_PONG = 8; | ||
2003 | public const int SMOOTH = 16; | ||
2004 | public const int ROTATE = 32; | ||
2005 | public const int SCALE = 64; | ||
2006 | public const int ALL_SIDES = -1; | ||
2007 | public const int LINK_SET = -1; | ||
2008 | public const int LINK_ROOT = 1; | ||
2009 | public const int LINK_ALL_OTHERS = -2; | ||
2010 | public const int LINK_ALL_CHILDREN = -3; | ||
2011 | public const int LINK_THIS = -4; | ||
2012 | public const int CHANGED_INVENTORY = 1; | ||
2013 | public const int CHANGED_COLOR = 2; | ||
2014 | public const int CHANGED_SHAPE = 4; | ||
2015 | public const int CHANGED_SCALE = 8; | ||
2016 | public const int CHANGED_TEXTURE = 16; | ||
2017 | public const int CHANGED_LINK = 32; | ||
2018 | public const int CHANGED_ALLOWED_DROP = 64; | ||
2019 | public const int CHANGED_OWNER = 128; | ||
2020 | public const int CHANGED_REGION_RESTART = 256; | ||
2021 | public const int CHANGED_REGION = 512; | ||
2022 | public const int CHANGED_TELEPORT = 1024; | ||
2023 | public const int TYPE_INVALID = 0; | ||
2024 | public const int TYPE_INTEGER = 1; | ||
2025 | public const int TYPE_double = 2; | ||
2026 | public const int TYPE_STRING = 3; | ||
2027 | public const int TYPE_KEY = 4; | ||
2028 | public const int TYPE_VECTOR = 5; | ||
2029 | public const int TYPE_ROTATION = 6; | ||
2030 | public const int REMOTE_DATA_CHANNEL = 1; | ||
2031 | public const int REMOTE_DATA_REQUEST = 2; | ||
2032 | public const int REMOTE_DATA_REPLY = 3; | ||
2033 | //public const int PRIM_TYPE = 1; | ||
2034 | public const int PRIM_MATERIAL = 2; | ||
2035 | public const int PRIM_PHYSICS = 3; | ||
2036 | public const int PRIM_TEMP_ON_REZ = 4; | ||
2037 | public const int PRIM_PHANTOM = 5; | ||
2038 | public const int PRIM_POSITION = 6; | ||
2039 | public const int PRIM_SIZE = 7; | ||
2040 | public const int PRIM_ROTATION = 8; | ||
2041 | public const int PRIM_TYPE = 9; | ||
2042 | public const int PRIM_TEXTURE = 17; | ||
2043 | public const int PRIM_COLOR = 18; | ||
2044 | public const int PRIM_BUMP_SHINY = 19; | ||
2045 | public const int PRIM_FULLBRIGHT = 20; | ||
2046 | public const int PRIM_FLEXIBLE = 21; | ||
2047 | public const int PRIM_TEXGEN = 22; | ||
2048 | public const int PRIM_TEXGEN_DEFAULT = 0; | ||
2049 | public const int PRIM_TEXGEN_PLANAR = 1; | ||
2050 | public const int PRIM_TYPE_BOX = 0; | ||
2051 | public const int PRIM_TYPE_CYLINDER = 1; | ||
2052 | public const int PRIM_TYPE_PRISM = 2; | ||
2053 | public const int PRIM_TYPE_SPHERE = 3; | ||
2054 | public const int PRIM_TYPE_TORUS = 4; | ||
2055 | public const int PRIM_TYPE_TUBE = 5; | ||
2056 | public const int PRIM_TYPE_RING = 6; | ||
2057 | public const int PRIM_HOLE_DEFAULT = 0; | ||
2058 | public const int PRIM_HOLE_CIRCLE = 16; | ||
2059 | public const int PRIM_HOLE_SQUARE = 32; | ||
2060 | public const int PRIM_HOLE_TRIANGLE = 48; | ||
2061 | public const int PRIM_MATERIAL_STONE = 0; | ||
2062 | public const int PRIM_MATERIAL_METAL = 1; | ||
2063 | public const int PRIM_MATERIAL_GLASS = 2; | ||
2064 | public const int PRIM_MATERIAL_WOOD = 3; | ||
2065 | public const int PRIM_MATERIAL_FLESH = 4; | ||
2066 | public const int PRIM_MATERIAL_PLASTIC = 5; | ||
2067 | public const int PRIM_MATERIAL_RUBBER = 6; | ||
2068 | public const int PRIM_MATERIAL_LIGHT = 7; | ||
2069 | public const int PRIM_SHINY_NONE = 0; | ||
2070 | public const int PRIM_SHINY_LOW = 1; | ||
2071 | public const int PRIM_SHINY_MEDIUM = 2; | ||
2072 | public const int PRIM_SHINY_HIGH = 3; | ||
2073 | public const int PRIM_BUMP_NONE = 0; | ||
2074 | public const int PRIM_BUMP_BRIGHT = 1; | ||
2075 | public const int PRIM_BUMP_DARK = 2; | ||
2076 | public const int PRIM_BUMP_WOOD = 3; | ||
2077 | public const int PRIM_BUMP_BARK = 4; | ||
2078 | public const int PRIM_BUMP_BRICKS = 5; | ||
2079 | public const int PRIM_BUMP_CHECKER = 6; | ||
2080 | public const int PRIM_BUMP_CONCRETE = 7; | ||
2081 | public const int PRIM_BUMP_TILE = 8; | ||
2082 | public const int PRIM_BUMP_STONE = 9; | ||
2083 | public const int PRIM_BUMP_DISKS = 10; | ||
2084 | public const int PRIM_BUMP_GRAVEL = 11; | ||
2085 | public const int PRIM_BUMP_BLOBS = 12; | ||
2086 | public const int PRIM_BUMP_SIDING = 13; | ||
2087 | public const int PRIM_BUMP_LARGETILE = 14; | ||
2088 | public const int PRIM_BUMP_STUCCO = 15; | ||
2089 | public const int PRIM_BUMP_SUCTION = 16; | ||
2090 | public const int PRIM_BUMP_WEAVE = 17; | ||
2091 | public const int MASK_BASE = 0; | ||
2092 | public const int MASK_OWNER = 1; | ||
2093 | public const int MASK_GROUP = 2; | ||
2094 | public const int MASK_EVERYONE = 3; | ||
2095 | public const int MASK_NEXT = 4; | ||
2096 | public const int PERM_TRANSFER = 8192; | ||
2097 | public const int PERM_MODIFY = 16384; | ||
2098 | public const int PERM_COPY = 32768; | ||
2099 | public const int PERM_MOVE = 524288; | ||
2100 | public const int PERM_ALL = 2147483647; | ||
2101 | public const int PARCEL_MEDIA_COMMAND_STOP = 0; | ||
2102 | public const int PARCEL_MEDIA_COMMAND_PAUSE = 1; | ||
2103 | public const int PARCEL_MEDIA_COMMAND_PLAY = 2; | ||
2104 | public const int PARCEL_MEDIA_COMMAND_LOOP = 3; | ||
2105 | public const int PARCEL_MEDIA_COMMAND_TEXTURE = 4; | ||
2106 | public const int PARCEL_MEDIA_COMMAND_URL = 5; | ||
2107 | public const int PARCEL_MEDIA_COMMAND_TIME = 6; | ||
2108 | public const int PARCEL_MEDIA_COMMAND_AGENT = 7; | ||
2109 | public const int PARCEL_MEDIA_COMMAND_UNLOAD = 8; | ||
2110 | public const int PARCEL_MEDIA_COMMAND_AUTO_ALIGN = 9; | ||
2111 | public const int PAY_HIDE = -1; | ||
2112 | public const int PAY_DEFAULT = -2; | ||
2113 | public const string NULL_KEY = "00000000-0000-0000-0000-000000000000"; | ||
2114 | public const string EOF = "\n\n\n"; | ||
2115 | public const double PI = 3.14159274f; | ||
2116 | public const double TWO_PI = 6.28318548f; | ||
2117 | public const double PI_BY_TWO = 1.57079637f; | ||
2118 | public const double DEG_TO_RAD = 0.01745329238f; | ||
2119 | public const double RAD_TO_DEG = 57.29578f; | ||
2120 | public const double SQRT2 = 1.414213538f; | ||
2121 | public const int DEBUG_CHANNEL 0x7FFFFFFF; | ||
2122 | public const int PUBLIC_CHANNEL 0x00000000 | ||
2123 | |||
2124 | // Can not be public const? | ||
2125 | public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); | ||
2126 | public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0.0, 0.0, 1.0); | ||
2127 | } | ||
2128 | } | ||