clockwerk-opensim – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 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 OpenSimulator 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.Runtime.Remoting.Lifetime;
30 using System.Threading;
31 using System.Reflection;
32 using System.Collections;
33 using System.Collections.Generic;
34 using OpenSim.Framework;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.ScriptEngine.Interfaces;
37 using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
38 using integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
39 using vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
40 using rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
41 using key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
42 using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
43 using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
44 using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
45 using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
46 using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
47  
48 namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
49 {
50 public partial class ScriptBaseClass : MarshalByRefObject
51 {
52 public IOSSL_Api m_OSSL_Functions;
53  
54 public void ApiTypeOSSL(IScriptApi api)
55 {
56 if (!(api is IOSSL_Api))
57 return;
58  
59 m_OSSL_Functions = (IOSSL_Api)api;
60  
61 Prim = new OSSLPrim(this);
62 }
63  
64 public void osSetRegionWaterHeight(double height)
65 {
66 m_OSSL_Functions.osSetRegionWaterHeight(height);
67 }
68  
69 public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
70 {
71 m_OSSL_Functions.osSetRegionSunSettings(useEstateSun, sunFixed, sunHour);
72 }
73  
74 public void osSetEstateSunSettings(bool sunFixed, double sunHour)
75 {
76 m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour);
77 }
78  
79 public double osGetCurrentSunHour()
80 {
81 return m_OSSL_Functions.osGetCurrentSunHour();
82 }
83  
84 public double osGetSunParam(string param)
85 {
86 return m_OSSL_Functions.osGetSunParam(param);
87 }
88 // Deprecated
89 public double osSunGetParam(string param)
90 {
91 return m_OSSL_Functions.osSunGetParam(param);
92 }
93  
94 public void osSetSunParam(string param, double value)
95 {
96 m_OSSL_Functions.osSetSunParam(param, value);
97 }
98 // Deprecated
99 public void osSunSetParam(string param, double value)
100 {
101 m_OSSL_Functions.osSunSetParam(param, value);
102 }
103  
104 public string osWindActiveModelPluginName()
105 {
106 return m_OSSL_Functions.osWindActiveModelPluginName();
107 }
108  
109 public void osSetWindParam(string plugin, string param, LSL_Float value)
110 {
111 m_OSSL_Functions.osSetWindParam(plugin, param, value);
112 }
113  
114 public LSL_Float osGetWindParam(string plugin, string param)
115 {
116 return m_OSSL_Functions.osGetWindParam(plugin, param);
117 }
118  
119 public void osParcelJoin(vector pos1, vector pos2)
120 {
121 m_OSSL_Functions.osParcelJoin(pos1,pos2);
122 }
123  
124 public void osParcelSubdivide(vector pos1, vector pos2)
125 {
126 m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
127 }
128  
129 public void osSetParcelDetails(vector pos, LSL_List rules)
130 {
131 m_OSSL_Functions.osSetParcelDetails(pos, rules);
132 }
133 // Deprecated
134 public void osParcelSetDetails(vector pos, LSL_List rules)
135 {
136 m_OSSL_Functions.osParcelSetDetails(pos,rules);
137 }
138  
139 public double osList2Double(LSL_Types.list src, int index)
140 {
141 return m_OSSL_Functions.osList2Double(src, index);
142 }
143  
144 public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams,
145 int timer)
146 {
147 return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
148 }
149  
150 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
151 int timer)
152 {
153 return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
154 }
155  
156 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
157 int timer, int alpha)
158 {
159 return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
160 }
161  
162 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
163 int timer, int alpha)
164 {
165 return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
166 }
167  
168 public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
169 bool blend, int disp, int timer, int alpha, int face)
170 {
171 return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
172 blend, disp, timer, alpha, face);
173 }
174  
175 public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
176 bool blend, int disp, int timer, int alpha, int face)
177 {
178 return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
179 blend, disp, timer, alpha, face);
180 }
181  
182 public LSL_Float osGetTerrainHeight(int x, int y)
183 {
184 return m_OSSL_Functions.osGetTerrainHeight(x, y);
185 }
186 // Deprecated
187 public LSL_Float osTerrainGetHeight(int x, int y)
188 {
189 return m_OSSL_Functions.osTerrainGetHeight(x, y);
190 }
191  
192 public LSL_Integer osSetTerrainHeight(int x, int y, double val)
193 {
194 return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
195 }
196 // Deprecated
197 public LSL_Integer osTerrainSetHeight(int x, int y, double val)
198 {
199 return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
200 }
201  
202 public void osTerrainFlush()
203 {
204 m_OSSL_Functions.osTerrainFlush();
205 }
206  
207 public int osRegionRestart(double seconds)
208 {
209 return m_OSSL_Functions.osRegionRestart(seconds);
210 }
211  
212 public void osRegionNotice(string msg)
213 {
214 m_OSSL_Functions.osRegionNotice(msg);
215 }
216  
217 public bool osConsoleCommand(string Command)
218 {
219 return m_OSSL_Functions.osConsoleCommand(Command);
220 }
221  
222 public void osSetParcelMediaURL(string url)
223 {
224 m_OSSL_Functions.osSetParcelMediaURL(url);
225 }
226  
227 public void osSetParcelSIPAddress(string SIPAddress)
228 {
229 m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
230 }
231  
232 public void osSetPrimFloatOnWater(int floatYN)
233 {
234 m_OSSL_Functions.osSetPrimFloatOnWater(floatYN);
235 }
236  
237 // Teleport Functions
238  
239 public void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
240 {
241 m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
242 }
243  
244 public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
245 {
246 m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat);
247 }
248  
249 public void osTeleportAgent(string agent, vector position, vector lookat)
250 {
251 m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
252 }
253  
254 public void osTeleportOwner(string regionName, vector position, vector lookat)
255 {
256 m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
257 }
258  
259 public void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
260 {
261 m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
262 }
263  
264 public void osTeleportOwner(vector position, vector lookat)
265 {
266 m_OSSL_Functions.osTeleportOwner(position, lookat);
267 }
268  
269 // Avatar info functions
270 public string osGetAgentIP(string agent)
271 {
272 return m_OSSL_Functions.osGetAgentIP(agent);
273 }
274  
275 public LSL_List osGetAgents()
276 {
277 return m_OSSL_Functions.osGetAgents();
278 }
279  
280 // Animation Functions
281  
282 public void osAvatarPlayAnimation(string avatar, string animation)
283 {
284 m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation);
285 }
286  
287 public void osAvatarStopAnimation(string avatar, string animation)
288 {
289 m_OSSL_Functions.osAvatarStopAnimation(avatar, animation);
290 }
291  
292 #region Attachment commands
293  
294 public void osForceAttachToAvatar(int attachmentPoint)
295 {
296 m_OSSL_Functions.osForceAttachToAvatar(attachmentPoint);
297 }
298  
299 public void osForceAttachToAvatarFromInventory(string itemName, int attachmentPoint)
300 {
301 m_OSSL_Functions.osForceAttachToAvatarFromInventory(itemName, attachmentPoint);
302 }
303  
304 public void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
305 {
306 m_OSSL_Functions.osForceAttachToOtherAvatarFromInventory(rawAvatarId, itemName, attachmentPoint);
307 }
308  
309 public void osForceDetachFromAvatar()
310 {
311 m_OSSL_Functions.osForceDetachFromAvatar();
312 }
313  
314 public LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
315 {
316 return m_OSSL_Functions.osGetNumberOfAttachments(avatar, attachmentPoints);
317 }
318  
319 public void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags)
320 {
321 m_OSSL_Functions.osMessageAttachments(avatar, message, attachmentPoints, flags);
322 }
323  
324 #endregion
325  
326 // Texture Draw functions
327  
328 public string osMovePen(string drawList, int x, int y)
329 {
330 return m_OSSL_Functions.osMovePen(drawList, x, y);
331 }
332  
333 public string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
334 {
335 return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
336 }
337  
338 public string osDrawLine(string drawList, int endX, int endY)
339 {
340 return m_OSSL_Functions.osDrawLine(drawList, endX, endY);
341 }
342  
343 public string osDrawText(string drawList, string text)
344 {
345 return m_OSSL_Functions.osDrawText(drawList, text);
346 }
347  
348 public string osDrawEllipse(string drawList, int width, int height)
349 {
350 return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
351 }
352  
353 public string osDrawRectangle(string drawList, int width, int height)
354 {
355 return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
356 }
357  
358 public string osDrawFilledRectangle(string drawList, int width, int height)
359 {
360 return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
361 }
362  
363 public string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
364 {
365 return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
366 }
367  
368 public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
369 {
370 return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
371 }
372  
373 public string osSetFontSize(string drawList, int fontSize)
374 {
375 return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
376 }
377  
378 public string osSetFontName(string drawList, string fontName)
379 {
380 return m_OSSL_Functions.osSetFontName(drawList, fontName);
381 }
382  
383 public string osSetPenSize(string drawList, int penSize)
384 {
385 return m_OSSL_Functions.osSetPenSize(drawList, penSize);
386 }
387  
388 public string osSetPenCap(string drawList, string direction, string type)
389 {
390 return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
391 }
392  
393 public string osSetPenColor(string drawList, string color)
394 {
395 return m_OSSL_Functions.osSetPenColor(drawList, color);
396 }
397 // Deprecated
398 public string osSetPenColour(string drawList, string colour)
399 {
400 return m_OSSL_Functions.osSetPenColour(drawList, colour);
401 }
402  
403 public string osDrawImage(string drawList, int width, int height, string imageUrl)
404 {
405 return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
406 }
407  
408 public vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
409 {
410 return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
411 }
412  
413 public void osSetStateEvents(int events)
414 {
415 m_OSSL_Functions.osSetStateEvents(events);
416 }
417  
418 public string osGetScriptEngineName()
419 {
420 return m_OSSL_Functions.osGetScriptEngineName();
421 }
422  
423 public string osGetPhysicsEngineType()
424 {
425 return m_OSSL_Functions.osGetPhysicsEngineType();
426 }
427  
428 public string osGetSimulatorVersion()
429 {
430 return m_OSSL_Functions.osGetSimulatorVersion();
431 }
432  
433 public Hashtable osParseJSON(string JSON)
434 {
435 return m_OSSL_Functions.osParseJSON(JSON);
436 }
437  
438 public Object osParseJSONNew(string JSON)
439 {
440 return m_OSSL_Functions.osParseJSONNew(JSON);
441 }
442  
443 public void osMessageObject(key objectUUID,string message)
444 {
445 m_OSSL_Functions.osMessageObject(objectUUID,message);
446 }
447  
448 public void osMakeNotecard(string notecardName, LSL_Types.list contents)
449 {
450 m_OSSL_Functions.osMakeNotecard(notecardName, contents);
451 }
452  
453 public string osGetNotecardLine(string name, int line)
454 {
455 return m_OSSL_Functions.osGetNotecardLine(name, line);
456 }
457  
458 public string osGetNotecard(string name)
459 {
460 return m_OSSL_Functions.osGetNotecard(name);
461 }
462  
463 public int osGetNumberOfNotecardLines(string name)
464 {
465 return m_OSSL_Functions.osGetNumberOfNotecardLines(name);
466 }
467  
468 public string osAvatarName2Key(string firstname, string lastname)
469 {
470 return m_OSSL_Functions.osAvatarName2Key(firstname, lastname);
471 }
472  
473 public string osKey2Name(string id)
474 {
475 return m_OSSL_Functions.osKey2Name(id);
476 }
477  
478 public string osGetGridNick()
479 {
480 return m_OSSL_Functions.osGetGridNick();
481 }
482  
483 public string osGetGridName()
484 {
485 return m_OSSL_Functions.osGetGridName();
486 }
487  
488 public string osGetGridLoginURI()
489 {
490 return m_OSSL_Functions.osGetGridLoginURI();
491 }
492  
493 public string osGetGridHomeURI()
494 {
495 return m_OSSL_Functions.osGetGridHomeURI();
496 }
497  
498 public string osGetGridGatekeeperURI()
499 {
500 return m_OSSL_Functions.osGetGridGatekeeperURI();
501 }
502  
503 public string osGetGridCustom(string key)
504 {
505 return m_OSSL_Functions.osGetGridCustom(key);
506 }
507  
508 public LSL_String osFormatString(string str, LSL_List strings)
509 {
510 return m_OSSL_Functions.osFormatString(str, strings);
511 }
512  
513 public LSL_List osMatchString(string src, string pattern, int start)
514 {
515 return m_OSSL_Functions.osMatchString(src, pattern, start);
516 }
517  
518 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
519 {
520 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
521 }
522  
523  
524 // Information about data loaded into the region
525 public string osLoadedCreationDate()
526 {
527 return m_OSSL_Functions.osLoadedCreationDate();
528 }
529  
530 public string osLoadedCreationTime()
531 {
532 return m_OSSL_Functions.osLoadedCreationTime();
533 }
534  
535 public string osLoadedCreationID()
536 {
537 return m_OSSL_Functions.osLoadedCreationID();
538 }
539  
540 public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
541 {
542 return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules);
543 }
544  
545 public void osForceCreateLink(string target, int parent)
546 {
547 m_OSSL_Functions.osForceCreateLink(target, parent);
548 }
549  
550 public void osForceBreakLink(int linknum)
551 {
552 m_OSSL_Functions.osForceBreakLink(linknum);
553 }
554  
555 public void osForceBreakAllLinks()
556 {
557 m_OSSL_Functions.osForceBreakAllLinks();
558 }
559  
560 public LSL_Integer osIsNpc(LSL_Key npc)
561 {
562 return m_OSSL_Functions.osIsNpc(npc);
563 }
564  
565 public key osNpcCreate(string user, string name, vector position, key cloneFrom)
566 {
567 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom);
568 }
569  
570 public key osNpcCreate(string user, string name, vector position, key cloneFrom, int options)
571 {
572 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom, options);
573 }
574  
575 public key osNpcSaveAppearance(key npc, string notecard)
576 {
577 return m_OSSL_Functions.osNpcSaveAppearance(npc, notecard);
578 }
579  
580 public void osNpcLoadAppearance(key npc, string notecard)
581 {
582 m_OSSL_Functions.osNpcLoadAppearance(npc, notecard);
583 }
584  
585 public LSL_Key osNpcGetOwner(LSL_Key npc)
586 {
587 return m_OSSL_Functions.osNpcGetOwner(npc);
588 }
589  
590 public vector osNpcGetPos(LSL_Key npc)
591 {
592 return m_OSSL_Functions.osNpcGetPos(npc);
593 }
594  
595 public void osNpcMoveTo(key npc, vector position)
596 {
597 m_OSSL_Functions.osNpcMoveTo(npc, position);
598 }
599  
600 public void osNpcMoveToTarget(key npc, vector target, int options)
601 {
602 m_OSSL_Functions.osNpcMoveToTarget(npc, target, options);
603 }
604  
605 public rotation osNpcGetRot(key npc)
606 {
607 return m_OSSL_Functions.osNpcGetRot(npc);
608 }
609  
610 public void osNpcSetRot(key npc, rotation rot)
611 {
612 m_OSSL_Functions.osNpcSetRot(npc, rot);
613 }
614  
615 public void osNpcStopMoveToTarget(LSL_Key npc)
616 {
617 m_OSSL_Functions.osNpcStopMoveToTarget(npc);
618 }
619  
620 public void osNpcSay(key npc, string message)
621 {
622 m_OSSL_Functions.osNpcSay(npc, message);
623 }
624  
625 public void osNpcSay(key npc, int channel, string message)
626 {
627 m_OSSL_Functions.osNpcSay(npc, channel, message);
628 }
629  
630  
631 public void osNpcShout(key npc, int channel, string message)
632 {
633 m_OSSL_Functions.osNpcShout(npc, channel, message);
634 }
635  
636 public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
637 {
638 m_OSSL_Functions.osNpcSit(npc, target, options);
639 }
640  
641 public void osNpcStand(LSL_Key npc)
642 {
643 m_OSSL_Functions.osNpcStand(npc);
644 }
645  
646 public void osNpcRemove(key npc)
647 {
648 m_OSSL_Functions.osNpcRemove(npc);
649 }
650  
651 public void osNpcPlayAnimation(LSL_Key npc, string animation)
652 {
653 m_OSSL_Functions.osNpcPlayAnimation(npc, animation);
654 }
655  
656 public void osNpcStopAnimation(LSL_Key npc, string animation)
657 {
658 m_OSSL_Functions.osNpcStopAnimation(npc, animation);
659 }
660  
661 public void osNpcWhisper(key npc, int channel, string message)
662 {
663 m_OSSL_Functions.osNpcWhisper(npc, channel, message);
664 }
665  
666 public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
667 {
668 m_OSSL_Functions.osNpcTouch(npcLSL_Key, object_key, link_num);
669 }
670  
671 public LSL_Key osOwnerSaveAppearance(string notecard)
672 {
673 return m_OSSL_Functions.osOwnerSaveAppearance(notecard);
674 }
675  
676 public LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
677 {
678 return m_OSSL_Functions.osAgentSaveAppearance(agentId, notecard);
679 }
680  
681 public OSSLPrim Prim;
682  
683 [Serializable]
684 public class OSSLPrim
685 {
686 internal ScriptBaseClass OSSL;
687 public OSSLPrim(ScriptBaseClass bc)
688 {
689 OSSL = bc;
690 Position = new OSSLPrim_Position(this);
691 Rotation = new OSSLPrim_Rotation(this);
692 }
693  
694 public OSSLPrim_Position Position;
695 public OSSLPrim_Rotation Rotation;
696 private TextStruct _text;
697 public TextStruct Text
698 {
699 get { return _text; }
700 set
701 {
702 _text = value;
703 OSSL.llSetText(_text.Text, _text.color, _text.alpha);
704 }
705 }
706  
707 [Serializable]
708 public struct TextStruct
709 {
710 public string Text;
711 public LSL_Types.Vector3 color;
712 public double alpha;
713 }
714 }
715  
716 [Serializable]
717 public class OSSLPrim_Position
718 {
719 private OSSLPrim prim;
720 private LSL_Types.Vector3 Position;
721 public OSSLPrim_Position(OSSLPrim _prim)
722 {
723 prim = _prim;
724 }
725 private void Load()
726 {
727 Position = prim.OSSL.llGetPos();
728 }
729 private void Save()
730 {
731 /* Remove temporarily until we have a handle to the region size
732 if (Position.x > ((int)Constants.RegionSize - 1))
733 Position.x = ((int)Constants.RegionSize - 1);
734 if (Position.y > ((int)Constants.RegionSize - 1))
735 Position.y = ((int)Constants.RegionSize - 1);
736 */
737 if (Position.z > Constants.RegionHeight)
738 Position.z = Constants.RegionHeight;
739 if (Position.x < 0)
740 Position.x = 0;
741 if (Position.y < 0)
742 Position.y = 0;
743 if (Position.z < 0)
744 Position.z = 0;
745 prim.OSSL.llSetPos(Position);
746 }
747  
748 public double x
749 {
750 get
751 {
752 Load();
753 return Position.x;
754 }
755 set
756 {
757 Load();
758 Position.x = value;
759 Save();
760 }
761 }
762 public double y
763 {
764 get
765 {
766 Load();
767 return Position.y;
768 }
769 set
770 {
771 Load();
772 Position.y = value;
773 Save();
774 }
775 }
776 public double z
777 {
778 get
779 {
780 Load();
781 return Position.z;
782 }
783 set
784 {
785 Load();
786 Position.z = value;
787 Save();
788 }
789 }
790 }
791  
792 [Serializable]
793 public class OSSLPrim_Rotation
794 {
795 private OSSLPrim prim;
796 private LSL_Types.Quaternion Rotation;
797 public OSSLPrim_Rotation(OSSLPrim _prim)
798 {
799 prim = _prim;
800 }
801 private void Load()
802 {
803 Rotation = prim.OSSL.llGetRot();
804 }
805 private void Save()
806 {
807 prim.OSSL.llSetRot(Rotation);
808 }
809  
810 public double x
811 {
812 get
813 {
814 Load();
815 return Rotation.x;
816 }
817 set
818 {
819 Load();
820 Rotation.x = value;
821 Save();
822 }
823 }
824 public double y
825 {
826 get
827 {
828 Load();
829 return Rotation.y;
830 }
831 set
832 {
833 Load();
834 Rotation.y = value;
835 Save();
836 }
837 }
838 public double z
839 {
840 get
841 {
842 Load();
843 return Rotation.z;
844 }
845 set
846 {
847 Load();
848 Rotation.z = value;
849 Save();
850 }
851 }
852 public double s
853 {
854 get
855 {
856 Load();
857 return Rotation.s;
858 }
859 set
860 {
861 Load();
862 Rotation.s = value;
863 Save();
864 }
865 }
866 }
867  
868 public key osGetMapTexture()
869 {
870 return m_OSSL_Functions.osGetMapTexture();
871 }
872  
873 public key osGetRegionMapTexture(string regionName)
874 {
875 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
876 }
877  
878 public LSL_List osGetRegionStats()
879 {
880 return m_OSSL_Functions.osGetRegionStats();
881 }
882  
883 public vector osGetRegionSize()
884 {
885 return m_OSSL_Functions.osGetRegionSize();
886 }
887  
888 /// <summary>
889 /// Returns the amount of memory in use by the Simulator Daemon.
890 /// Amount in bytes - if >= 4GB, returns 4GB. (LSL is not 64-bit aware)
891 /// </summary>
892 /// <returns></returns>
893 public LSL_Integer osGetSimulatorMemory()
894 {
895 return m_OSSL_Functions.osGetSimulatorMemory();
896 }
897  
898 public void osKickAvatar(string FirstName,string SurName,string alert)
899 {
900 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
901 }
902  
903 public void osSetSpeed(string UUID, LSL_Float SpeedModifier)
904 {
905 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
906 }
907  
908 public LSL_Float osGetHealth(string avatar)
909 {
910 return m_OSSL_Functions.osGetHealth(avatar);
911 }
912  
913 public void osCauseDamage(string avatar, double damage)
914 {
915 m_OSSL_Functions.osCauseDamage(avatar, damage);
916 }
917  
918 public void osCauseHealing(string avatar, double healing)
919 {
920 m_OSSL_Functions.osCauseHealing(avatar, healing);
921 }
922  
923 public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
924 {
925 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
926 }
927  
928 public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
929 {
930 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
931 }
932  
933 public void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
934 {
935 m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
936 }
937  
938 public void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
939 {
940 m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
941 }
942  
943 public LSL_List osGetAvatarList()
944 {
945 return m_OSSL_Functions.osGetAvatarList();
946 }
947  
948 public LSL_String osUnixTimeToTimestamp(long time)
949 {
950 return m_OSSL_Functions.osUnixTimeToTimestamp(time);
951 }
952  
953 public LSL_String osGetInventoryDesc(string item)
954 {
955 return m_OSSL_Functions.osGetInventoryDesc(item);
956 }
957  
958 public LSL_Integer osInviteToGroup(LSL_Key agentId)
959 {
960 return m_OSSL_Functions.osInviteToGroup(agentId);
961 }
962  
963 public LSL_Integer osEjectFromGroup(LSL_Key agentId)
964 {
965 return m_OSSL_Functions.osEjectFromGroup(agentId);
966 }
967  
968 public void osSetTerrainTexture(int level, LSL_Key texture)
969 {
970 m_OSSL_Functions.osSetTerrainTexture(level, texture);
971 }
972  
973 public void osSetTerrainTextureHeight(int corner, double low, double high)
974 {
975 m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
976 }
977  
978 public LSL_Integer osIsUUID(string thing)
979 {
980 return m_OSSL_Functions.osIsUUID(thing);
981 }
982  
983 public LSL_Float osMin(double a, double b)
984 {
985 return m_OSSL_Functions.osMin(a, b);
986 }
987  
988 public LSL_Float osMax(double a, double b)
989 {
990 return m_OSSL_Functions.osMax(a, b);
991 }
992  
993 public LSL_Key osGetRezzingObject()
994 {
995 return m_OSSL_Functions.osGetRezzingObject();
996 }
997  
998 public void osSetContentType(LSL_Key id, string type)
999 {
1000 m_OSSL_Functions.osSetContentType(id,type);
1001 }
1002  
1003 public void osDropAttachment()
1004 {
1005 m_OSSL_Functions.osDropAttachment();
1006 }
1007  
1008 public void osForceDropAttachment()
1009 {
1010 m_OSSL_Functions.osForceDropAttachment();
1011 }
1012  
1013 public void osDropAttachmentAt(vector pos, rotation rot)
1014 {
1015 m_OSSL_Functions.osDropAttachmentAt(pos, rot);
1016 }
1017  
1018 public void osForceDropAttachmentAt(vector pos, rotation rot)
1019 {
1020 m_OSSL_Functions.osForceDropAttachmentAt(pos, rot);
1021 }
1022  
1023 public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
1024 {
1025 return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield);
1026 }
1027  
1028 public LSL_Integer osRegexIsMatch(string input, string pattern)
1029 {
1030 return m_OSSL_Functions.osRegexIsMatch(input, pattern);
1031 }
1032 }
1033 }