30 using OpenMetaverse.Assets;
31 using OpenSim.Framework;
32 using OpenSim.Region.Framework.Scenes;
33 using OpenSim.Services.Interfaces;
35 namespace OpenSim.Tests.Common
41 public static class TaskInventoryHelpers
57 assetService, part, itemName, TestHelpers.ParseStem(itemIDStem), TestHelpers.ParseStem(assetIDStem), text);
73 AssetNotecard nc =
new AssetNotecard();
78 = AssetHelpers.CreateAsset(assetID, AssetType.Notecard, nc.AssetData, UUID.Zero);
79 assetService.Store(ncAsset);
83 { Name = itemName, AssetID = assetID, ItemID = itemID,
84 Type = (int)AssetType.Notecard, InvType = (
int)InventoryType.Notecard };
85 part.Inventory.AddInventoryItem(ncItem,
true);
102 return AddScript(assetService, part,
"scriptItem",
"default { state_entry() { llSay(0, \"Hello World\"); } }");
120 return AddScript(assetService, part,
UUID.Random(), UUID.Random(), scriptName, scriptSource);
140 AssetScriptText ast =
new AssetScriptText();
141 ast.Source = scriptSource;
145 = AssetHelpers.CreateAsset(assetId, AssetType.LSLText, ast.AssetData, UUID.Zero);
146 assetService.Store(asset);
149 { Name = scriptName, AssetID = assetId, ItemID = itemId,
150 Type = (int)AssetType.LSLText, InvType = (
int)InventoryType.LSL };
151 part.Inventory.AddInventoryItem(item,
true);
173 AssetBase taskSceneObjectAsset = AssetHelpers.CreateAsset(soAssetId, soToAdd);
174 assetService.Store(taskSceneObjectAsset);
178 AssetID = taskSceneObjectAsset.FullID,
180 OwnerID = soToAdd.OwnerID,
181 Type = (int)AssetType.Object,
182 InvType = (
int)InventoryType.Object };
183 sop.Inventory.AddInventoryItem(taskSceneObjectItem,
true);
185 return taskSceneObjectItem;
204 SceneObjectGroup taskSceneObject = SceneHelpers.CreateSceneObject(1, userId);
206 return TaskInventoryHelpers.AddSceneObject(
207 assetService, sop, itemName, itemId, taskSceneObject, TestHelpers.ParseTail(0x10));
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
Represents an item in a task inventory
Asset class. All Assets are reference by this class or a class derived from this class ...