The implementation of new flags = parameters for llGetObjectDetails - Part II Constant: integer OBJECT_TOTAL_INVENTORY_COUNT = 31 Constant: integer OBJECT_GROUP_TAG = 33

Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
melanie
Mandarinka Tasty 2016-11-28 05:05:36 +01:00 committed by UbitUmarov
parent af3f2717fd
commit 0bb959d8fd
2 changed files with 27 additions and 0 deletions

View File

@ -13772,6 +13772,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
AttachmentsPrimList.Add(new LSL_Integer(Attachment.PrimCount));
ret.Add(new LSL_Integer(AttachmentsPrimList.Sum()));
break;
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
LSL_List AttachmentsPrimsInventoryList = new LSL_List();
foreach (SceneObjectGroup Attachment in av.GetAttachments())
{
Attachment.ForEachPart(delegate(SceneObjectPart part)
{
AttachmentsPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count));
});
}
ret.Add(new LSL_Integer(AttachmentsPrimsInventoryList.Sum()));
break;
case ScriptBaseClass.OBJECT_GROUP_TAG:
ret.Add(new LSL_String(av.Grouptitle));
break;
default:
// Invalid or unhandled constant.
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
@ -13953,6 +13967,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ScriptBaseClass.OBJECT_PRIM_COUNT:
ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount));
break;
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
LSL_List ObjectPrimsInventoryList = new LSL_List();
obj.ParentGroup.ForEachPart(delegate(SceneObjectPart part)
{
ObjectPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count));
});
ret.Add(ObjectPrimsInventoryList.Sum());
break;
case ScriptBaseClass.OBJECT_GROUP_TAG:
ret.Add(new LSL_String(String.Empty));
break;
default:
// Invalid or unhandled constant.
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));

View File

@ -639,6 +639,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OBJECT_CLICK_ACTION = 28;
public const int OBJECT_OMEGA = 29;
public const int OBJECT_PRIM_COUNT = 30;
public const int OBJECT_TOTAL_INVENTORY_COUNT = 31;
public const int OBJECT_GROUP_TAG = 33;
// Pathfinding types
public const int OPT_OTHER = -1;