aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
1 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 302c431..8ddd175 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -14511,19 +14511,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14511 ret.Add(new LSL_Integer(count)); 14511 ret.Add(new LSL_Integer(count));
14512 break; 14512 break;
14513 case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: 14513 case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
14514 List<SceneObjectGroup> invAttachments = av.GetAttachments(); 14514 if (Attachments == null)
14515 int invcount = 0; 14515 Attachments = av.GetAttachments();
14516 count = 0;
14516 try 14517 try
14517 { 14518 {
14518 foreach (SceneObjectGroup Attachment in invAttachments) 14519 foreach (SceneObjectGroup Attachment in Attachments)
14519 { 14520 {
14520 SceneObjectPart[] parts = Attachment.Parts; 14521 SceneObjectPart[] parts = Attachment.Parts;
14521 int nparts = parts.Count(); 14522 int nparts = parts.Count();
14522 for(int i = 0; i < nparts; i++) 14523 for(int i = 0; i < nparts; i++)
14523 invcount += parts[i].Inventory.Count; 14524 count += parts[i].Inventory.Count;
14524 } 14525 }
14525 } catch { }; 14526 } catch { };
14526 ret.Add(new LSL_Integer(invcount)); 14527 ret.Add(new LSL_Integer(count));
14527 break; 14528 break;
14528 case ScriptBaseClass.OBJECT_REZZER_KEY: 14529 case ScriptBaseClass.OBJECT_REZZER_KEY:
14529 ret.Add(new LSL_Key((string)id)); 14530 ret.Add(new LSL_Key((string)id));
@@ -14534,14 +14535,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14534 case ScriptBaseClass.OBJECT_TEMP_ATTACHED: 14535 case ScriptBaseClass.OBJECT_TEMP_ATTACHED:
14535 ret.Add(new LSL_Integer(0)); 14536 ret.Add(new LSL_Integer(0));
14536 break; 14537 break;
14538 case ScriptBaseClass.OBJECT_ATTACHED_SLOTS_AVAILABLE:
14539 if (Attachments == null)
14540 Attachments = av.GetAttachments();
14541 ret.Add(new LSL_Integer(38 - Attachments.Count));
14542 break;
14537 case ScriptBaseClass.OBJECT_CREATION_TIME: 14543 case ScriptBaseClass.OBJECT_CREATION_TIME:
14538 ret.Add(new LSL_String("")); 14544 ret.Add(new LSL_String(""));
14539 break; 14545 break;
14540 case ScriptBaseClass.OBJECT_SELECT_COUNT: 14546 case ScriptBaseClass.OBJECT_SELECT_COUNT:
14541 ret.Add(new LSL_String("")); 14547 ret.Add(new LSL_Integer(0));
14542 break; 14548 break;
14543 case ScriptBaseClass.OBJECT_SIT_COUNT: 14549 case ScriptBaseClass.OBJECT_SIT_COUNT:
14544 ret.Add(new LSL_String("")); 14550 ret.Add(new LSL_Integer(0));
14545 break; 14551 break;
14546 case ScriptBaseClass.OBJECT_ANIMATED_COUNT: 14552 case ScriptBaseClass.OBJECT_ANIMATED_COUNT:
14547 count = 0; 14553 count = 0;
@@ -14773,9 +14779,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14773 break; 14779 break;
14774 case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: 14780 case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
14775 SceneObjectPart[] parts = obj.ParentGroup.Parts; 14781 SceneObjectPart[] parts = obj.ParentGroup.Parts;
14776 int nparts = parts.Count();
14777 count = 0; 14782 count = 0;
14778 for(int i = 0; i < nparts; i++) 14783 for(int i = 0; i < parts.Count(); i++)
14779 count += parts[i].Inventory.Count; 14784 count += parts[i].Inventory.Count;
14780 ret.Add(new LSL_Integer(count)); 14785 ret.Add(new LSL_Integer(count));
14781 break; 14786 break;
@@ -14795,6 +14800,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14795 ret.Add(new LSL_Integer(0)); 14800 ret.Add(new LSL_Integer(0));
14796 } 14801 }
14797 break; 14802 break;
14803 case ScriptBaseClass.OBJECT_ATTACHED_SLOTS_AVAILABLE:
14804 ret.Add(new LSL_Integer(0));
14805 break;
14798 case ScriptBaseClass.OBJECT_CREATION_TIME: 14806 case ScriptBaseClass.OBJECT_CREATION_TIME:
14799 DateTime date = Util.ToDateTime(m_host.ParentGroup.RootPart.CreationDate); 14807 DateTime date = Util.ToDateTime(m_host.ParentGroup.RootPart.CreationDate);
14800 ret.Add(new LSL_String(date.ToString("yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture))); 14808 ret.Add(new LSL_String(date.ToString("yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture)));