diff options
author | Brian McBee | 2007-08-23 05:26:02 +0000 |
---|---|---|
committer | Brian McBee | 2007-08-23 05:26:02 +0000 |
commit | 107469ed938247bc4eadd48c5716939709ab28f8 (patch) | |
tree | 276011f608419178a69c37870f0fe135dd75d64c /OpenSim/Region/ScriptEngine/DotNetEngine | |
parent | setup test tables function which lets us make sure that everything (diff) | |
download | opensim-SC-107469ed938247bc4eadd48c5716939709ab28f8.zip opensim-SC-107469ed938247bc4eadd48c5716939709ab28f8.tar.gz opensim-SC-107469ed938247bc4eadd48c5716939709ab28f8.tar.bz2 opensim-SC-107469ed938247bc4eadd48c5716939709ab28f8.tar.xz |
More lsl functions (thanks to ldviopeng and wjordan!)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 49 |
1 files changed, 40 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 03f9462..de1385c 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
223 | public LSL_Types.Vector3 llGetAccel() { return new LSL_Types.Vector3(); } | 223 | public LSL_Types.Vector3 llGetAccel() { return new LSL_Types.Vector3(); } |
224 | public LSL_Types.Vector3 llGetOmega() { return new LSL_Types.Vector3(); } | 224 | public LSL_Types.Vector3 llGetOmega() { return new LSL_Types.Vector3(); } |
225 | public double llGetTimeOfDay() { return 0; } | 225 | public double llGetTimeOfDay() { return 0; } |
226 | public double llGetWallclock() { return 0; } | 226 | public double llGetWallclock() { return DateTime.Now.TimeOfDay.TotalSeconds; } |
227 | public double llGetTime() { return 0; } | 227 | public double llGetTime() { return 0; } |
228 | public void llResetTime() { } | 228 | public void llResetTime() { } |
229 | public double llGetAndResetTime() { return 0; } | 229 | public double llGetAndResetTime() { return 0; } |
@@ -237,7 +237,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
237 | public void llStopSound() { } | 237 | public void llStopSound() { } |
238 | public void llPreloadSound(string sound) { } | 238 | public void llPreloadSound(string sound) { } |
239 | public string llGetSubString(string src, int start, int end) { return src.Substring(start, end); } | 239 | public string llGetSubString(string src, int start, int end) { return src.Substring(start, end); } |
240 | public string llDeleteSubString(string src, int start, int end) { return ""; } | 240 | public string llDeleteSubString(string src, int start, int end) {return "";} |
241 | public string llInsertString(string dst, int position, string src) { return ""; } | 241 | public string llInsertString(string dst, int position, string src) { return ""; } |
242 | public string llToUpper(string src) { return src.ToUpper(); } | 242 | public string llToUpper(string src) { return src.ToUpper(); } |
243 | public string llToLower(string src) { return src.ToLower(); } | 243 | public string llToLower(string src) { return src.ToLower(); } |
@@ -263,7 +263,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
263 | public void llInstantMessage(string user, string message) { } | 263 | public void llInstantMessage(string user, string message) { } |
264 | public void llEmail(string address, string subject, string message) { } | 264 | public void llEmail(string address, string subject, string message) { } |
265 | public void llGetNextEmail(string address, string subject) { } | 265 | public void llGetNextEmail(string address, string subject) { } |
266 | public string llGetKey() { return ""; } | 266 | public string llGetKey() |
267 | { | ||
268 | return m_host.UUID.ToStringHyphenated(); | ||
269 | } | ||
267 | public void llSetBuoyancy(double buoyancy) { } | 270 | public void llSetBuoyancy(double buoyancy) { } |
268 | public void llSetHoverHeight(double height, int water, double tau) { } | 271 | public void llSetHoverHeight(double height, int water, double tau) { } |
269 | public void llStopHover() { } | 272 | public void llStopHover() { } |
@@ -341,7 +344,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
341 | public LSL_Types.Vector3 llGetTextureOffset(int face) { return new LSL_Types.Vector3(); } | 344 | public LSL_Types.Vector3 llGetTextureOffset(int face) { return new LSL_Types.Vector3(); } |
342 | public LSL_Types.Vector3 llGetTextureScale(int side) { return new LSL_Types.Vector3(); } | 345 | public LSL_Types.Vector3 llGetTextureScale(int side) { return new LSL_Types.Vector3(); } |
343 | public double llGetTextureRot(int side) { return 0; } | 346 | public double llGetTextureRot(int side) { return 0; } |
344 | public int llSubStringIndex(string source, string pattern) { return 0; } | 347 | public int llSubStringIndex(string source, string pattern) |
348 | { | ||
349 | return source.IndexOf(pattern); | ||
350 | } | ||
345 | public string llGetOwnerKey(string id) { return ""; } | 351 | public string llGetOwnerKey(string id) { return ""; } |
346 | public LSL_Types.Vector3 llGetCenterOfMass() { return new LSL_Types.Vector3(); } | 352 | public LSL_Types.Vector3 llGetCenterOfMass() { return new LSL_Types.Vector3(); } |
347 | public List<string> llListSort(List<string> src, int stride, int ascending) | 353 | public List<string> llListSort(List<string> src, int stride, int ascending) |
@@ -374,7 +380,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
374 | public int llListFindList(List<string> src, List<string> test) { return 0; } | 380 | public int llListFindList(List<string> src, List<string> test) { return 0; } |
375 | public string llGetObjectName() { return ""; } | 381 | public string llGetObjectName() { return ""; } |
376 | public void llSetObjectName(string name) { } | 382 | public void llSetObjectName(string name) { } |
377 | public string llGetDate() { return ""; } | 383 | public string llGetDate() |
384 | { | ||
385 | DateTime date = DateTime.Now.ToUniversalTime(); | ||
386 | string result = date.ToString("yyyy-MM-dd"); | ||
387 | return result; | ||
388 | } | ||
378 | public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { return 0; } | 389 | public int llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) { return 0; } |
379 | public int llGetAgentInfo(string id) { return 0; } | 390 | public int llGetAgentInfo(string id) { return 0; } |
380 | public void llAdjustSoundVolume(double volume) { } | 391 | public void llAdjustSoundVolume(double volume) { } |
@@ -470,8 +481,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
470 | public void llGetPrimitiveParams() { } | 481 | public void llGetPrimitiveParams() { } |
471 | public string llIntegerToBase64(int number) { return ""; } | 482 | public string llIntegerToBase64(int number) { return ""; } |
472 | public int llBase64ToInteger(string str) { return 0; } | 483 | public int llBase64ToInteger(string str) { return 0; } |
473 | public double llGetGMTclock() { return 0; } | 484 | public double llGetGMTclock() { return DateTime.UtcNow.TimeOfDay.TotalSeconds; } |
474 | public string llGetSimulatorHostname() { return ""; } | 485 | public string llGetSimulatorHostname() { return System.Environment.MachineName; } |
475 | public void llSetLocalRot(LSL_Types.Quaternion rot) { } | 486 | public void llSetLocalRot(LSL_Types.Quaternion rot) { } |
476 | public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) | 487 | public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) |
477 | { return new List<string>(); } | 488 | { return new List<string>(); } |
@@ -503,8 +514,28 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
503 | public LSL_Types.Quaternion llGetCameraRot() { return new LSL_Types.Quaternion(); } | 514 | public LSL_Types.Quaternion llGetCameraRot() { return new LSL_Types.Quaternion(); } |
504 | public void llSetPrimURL() { } | 515 | public void llSetPrimURL() { } |
505 | public void llRefreshPrimURL() { } | 516 | public void llRefreshPrimURL() { } |
506 | public string llEscapeURL(string url) { return ""; } | 517 | public string llEscapeURL(string url) |
507 | public string llUnescapeURL(string url) { return ""; } | 518 | { |
519 | try | ||
520 | { | ||
521 | return Uri.EscapeUriString(url); | ||
522 | } | ||
523 | catch (Exception ex) | ||
524 | { | ||
525 | return "llEscapeURL: " + ex.ToString(); | ||
526 | } | ||
527 | } | ||
528 | public string llUnescapeURL(string url) | ||
529 | { | ||
530 | try | ||
531 | { | ||
532 | return Uri.UnescapeDataString(url); | ||
533 | } | ||
534 | catch (Exception ex) | ||
535 | { | ||
536 | return "llUnescapeURL: " + ex.ToString(); | ||
537 | } | ||
538 | } | ||
508 | public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { } | 539 | public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) { } |
509 | public void llAddToLandBanList(string avatar, double hours) { } | 540 | public void llAddToLandBanList(string avatar, double hours) { } |
510 | public void llRemoveFromLandPassList(string avatar) { } | 541 | public void llRemoveFromLandPassList(string avatar) { } |