diff options
Diffstat (limited to 'OpenSim')
9 files changed, 83 insertions, 72 deletions
diff --git a/OpenSim/Framework/AgentInventory.cs b/OpenSim/Framework/AgentInventory.cs index 61e8636..e3f078b 100644 --- a/OpenSim/Framework/AgentInventory.cs +++ b/OpenSim/Framework/AgentInventory.cs | |||
@@ -157,31 +157,32 @@ namespace OpenSim.Framework | |||
157 | return true; | 157 | return true; |
158 | } | 158 | } |
159 | 159 | ||
160 | public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) | 160 | // FIXME: Unused, pending possible cleanup for this whole class. |
161 | { | 161 | // public LLUUID AddToInventory(LLUUID folderID, AssetBase asset) |
162 | if (InventoryFolders.ContainsKey(folderID)) | 162 | // { |
163 | { | 163 | // if (InventoryFolders.ContainsKey(folderID)) |
164 | LLUUID NewItemID = LLUUID.Random(); | 164 | // { |
165 | 165 | // LLUUID NewItemID = LLUUID.Random(); | |
166 | InventoryItem Item = new InventoryItem(); | 166 | // |
167 | Item.FolderID = folderID; | 167 | // InventoryItem Item = new InventoryItem(); |
168 | Item.OwnerID = AgentID; | 168 | // Item.FolderID = folderID; |
169 | Item.AssetID = asset.FullID; | 169 | // Item.OwnerID = AgentID; |
170 | Item.ItemID = NewItemID; | 170 | // Item.AssetID = asset.FullID; |
171 | Item.Type = asset.Type; | 171 | // Item.ItemID = NewItemID; |
172 | Item.Name = asset.Name; | 172 | // Item.Type = asset.Type; |
173 | Item.Description = asset.Description; | 173 | // Item.Name = asset.Name; |
174 | Item.InvType = asset.InvType; | 174 | // Item.Description = asset.Description; |
175 | InventoryItems.Add(Item.ItemID, Item); | 175 | // Item.InvType = asset.InvType; |
176 | InventoryFolder Folder = InventoryFolders[Item.FolderID]; | 176 | // InventoryItems.Add(Item.ItemID, Item); |
177 | Folder.Items.Add(Item); | 177 | // InventoryFolder Folder = InventoryFolders[Item.FolderID]; |
178 | return (Item.ItemID); | 178 | // Folder.Items.Add(Item); |
179 | } | 179 | // return (Item.ItemID); |
180 | else | 180 | // } |
181 | { | 181 | // else |
182 | return (null); | 182 | // { |
183 | } | 183 | // return (null); |
184 | } | 184 | // } |
185 | // } | ||
185 | 186 | ||
186 | public bool DeleteFromInventory(LLUUID itemID) | 187 | public bool DeleteFromInventory(LLUUID itemID) |
187 | { | 188 | { |
@@ -252,4 +253,4 @@ namespace OpenSim.Framework | |||
252 | return result; | 253 | return result; |
253 | } | 254 | } |
254 | } | 255 | } |
255 | } \ No newline at end of file | 256 | } |
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 29d996b..5435a43 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -106,4 +106,4 @@ namespace OpenSim.Framework | |||
106 | set { _temporary = value; } | 106 | set { _temporary = value; } |
107 | } | 107 | } |
108 | } | 108 | } |
109 | } \ No newline at end of file | 109 | } |
diff --git a/OpenSim/Framework/AssetLandmark.cs b/OpenSim/Framework/AssetLandmark.cs index de3028b..004e472 100644 --- a/OpenSim/Framework/AssetLandmark.cs +++ b/OpenSim/Framework/AssetLandmark.cs | |||
@@ -42,7 +42,6 @@ namespace OpenSim.Framework | |||
42 | Data = a.Data; | 42 | Data = a.Data; |
43 | FullID = a.FullID; | 43 | FullID = a.FullID; |
44 | Type = a.Type; | 44 | Type = a.Type; |
45 | InvType = a.InvType; | ||
46 | Name = a.Name; | 45 | Name = a.Name; |
47 | Description = a.Description; | 46 | Description = a.Description; |
48 | InternData(); | 47 | InternData(); |
@@ -58,4 +57,4 @@ namespace OpenSim.Framework | |||
58 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); | 57 | ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle); |
59 | } | 58 | } |
60 | } | 59 | } |
61 | } \ No newline at end of file | 60 | } |
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs index 7adcb4a..ba23d82 100644 --- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs +++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs | |||
@@ -137,13 +137,11 @@ namespace OpenSim.Framework.AssetLoader.Filesystem | |||
137 | string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); | 137 | string assetIdStr = source.Configs[i].GetString("assetID", LLUUID.Random().ToString()); |
138 | string name = source.Configs[i].GetString("name", String.Empty); | 138 | string name = source.Configs[i].GetString("name", String.Empty); |
139 | sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); | 139 | sbyte type = (sbyte) source.Configs[i].GetInt("assetType", 0); |
140 | sbyte invType = (sbyte) source.Configs[i].GetInt("inventoryType", 0); | ||
141 | string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); | 140 | string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty)); |
142 | 141 | ||
143 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); | 142 | AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, false); |
144 | 143 | ||
145 | newAsset.Type = type; | 144 | newAsset.Type = type; |
146 | newAsset.InvType = invType; | ||
147 | assets.Add(newAsset); | 145 | assets.Add(newAsset); |
148 | } | 146 | } |
149 | } | 147 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs index 4f4a3c3..8b4708c 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs | |||
@@ -96,7 +96,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
96 | xtw.WriteElementString("name", asset.Name); | 96 | xtw.WriteElementString("name", asset.Name); |
97 | xtw.WriteElementString("description", asset.Description); | 97 | xtw.WriteElementString("description", asset.Description); |
98 | xtw.WriteElementString("asset-type", asset.Type.ToString()); | 98 | xtw.WriteElementString("asset-type", asset.Type.ToString()); |
99 | xtw.WriteElementString("inventory-type", asset.InvType.ToString()); | ||
100 | 99 | ||
101 | xtw.WriteEndElement(); | 100 | xtw.WriteEndElement(); |
102 | } | 101 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs index 98364d3..527d544 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs | |||
@@ -109,7 +109,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
109 | metadata.Name = reader.ReadElementString("name"); | 109 | metadata.Name = reader.ReadElementString("name"); |
110 | metadata.Description = reader.ReadElementString("description"); | 110 | metadata.Description = reader.ReadElementString("description"); |
111 | metadata.AssetType = Convert.ToSByte(reader.ReadElementString("asset-type")); | 111 | metadata.AssetType = Convert.ToSByte(reader.ReadElementString("asset-type")); |
112 | metadata.AssetType = Convert.ToSByte(reader.ReadElementString("inventory-type")); | ||
113 | 112 | ||
114 | m_metadata[filename] = metadata; | 113 | m_metadata[filename] = metadata; |
115 | 114 | ||
@@ -161,7 +160,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
161 | AssetBase asset = new AssetBase(new LLUUID(filename), metadata.Name); | 160 | AssetBase asset = new AssetBase(new LLUUID(filename), metadata.Name); |
162 | asset.Description = metadata.Description; | 161 | asset.Description = metadata.Description; |
163 | asset.Type = metadata.AssetType; | 162 | asset.Type = metadata.AssetType; |
164 | asset.InvType = metadata.InventoryType; | ||
165 | asset.Data = data; | 163 | asset.Data = data; |
166 | 164 | ||
167 | m_cache.AddAsset(asset); | 165 | m_cache.AddAsset(asset); |
@@ -182,7 +180,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
182 | public string Name; | 180 | public string Name; |
183 | public string Description; | 181 | public string Description; |
184 | public sbyte AssetType; | 182 | public sbyte AssetType; |
185 | public sbyte InventoryType; | ||
186 | } | 183 | } |
187 | } | 184 | } |
188 | } | 185 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 7529d77..c0edaba 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -433,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
433 | SceneObjectGroup group = (SceneObjectGroup)obj; | 433 | SceneObjectGroup group = (SceneObjectGroup)obj; |
434 | group.DetachToInventoryPrep(); | 434 | group.DetachToInventoryPrep(); |
435 | m_log.Debug("[DETACH]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString()); | 435 | m_log.Debug("[DETACH]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString()); |
436 | m_parentScene.updateKnownAsset(remoteClient, group, group.GetFromAssetID(),group.OwnerID); | 436 | m_parentScene.updateKnownAsset(remoteClient, group, group.GetFromAssetID(), group.OwnerID); |
437 | m_parentScene.DeleteSceneObject(group); | 437 | m_parentScene.DeleteSceneObject(group); |
438 | } | 438 | } |
439 | } | 439 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index ff62a3b..e6bae4c 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -164,8 +164,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
164 | if (item != null) | 164 | if (item != null) |
165 | { | 165 | { |
166 | AssetBase asset = | 166 | AssetBase asset = |
167 | CreateAsset(item.Name, item.Description, (sbyte) item.InvType, | 167 | CreateAsset(item.Name, item.Description, (sbyte)item.AssetType, data); |
168 | (sbyte) item.AssetType, data); | ||
169 | AssetCache.AddAsset(asset); | 168 | AssetCache.AddAsset(asset); |
170 | 169 | ||
171 | item.AssetID = asset.FullID; | 170 | item.AssetID = asset.FullID; |
@@ -241,10 +240,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
241 | return; | 240 | return; |
242 | } | 241 | } |
243 | 242 | ||
244 | // Create new asset | 243 | AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); |
245 | // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this | ||
246 | // There may well be one in libsecondlife | ||
247 | AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data); | ||
248 | AssetCache.AddAsset(asset); | 244 | AssetCache.AddAsset(asset); |
249 | 245 | ||
250 | // Update item with new asset | 246 | // Update item with new asset |
@@ -521,12 +517,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
521 | if (remoteClient.AgentId == oldAgentID) | 517 | if (remoteClient.AgentId == oldAgentID) |
522 | { | 518 | { |
523 | CreateNewInventoryItem( | 519 | CreateNewInventoryItem( |
524 | remoteClient, newFolderID, callbackID, asset, item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); | 520 | remoteClient, newFolderID, callbackID, asset, (sbyte)item.InvType, |
521 | item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions); | ||
525 | } | 522 | } |
526 | else | 523 | else |
527 | { | 524 | { |
528 | CreateNewInventoryItem( | 525 | CreateNewInventoryItem( |
529 | remoteClient, newFolderID, callbackID, asset, item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); | 526 | remoteClient, newFolderID, callbackID, asset, (sbyte)item.InvType, |
527 | item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions); | ||
530 | } | 528 | } |
531 | } | 529 | } |
532 | else | 530 | else |
@@ -537,15 +535,24 @@ namespace OpenSim.Region.Environment.Scenes | |||
537 | } | 535 | } |
538 | } | 536 | } |
539 | 537 | ||
540 | private AssetBase CreateAsset(string name, string description, sbyte invType, sbyte assetType, byte[] data) | 538 | /// <summary> |
539 | /// Create a new asset data structure. | ||
540 | /// </summary> | ||
541 | /// <param name="name"></param> | ||
542 | /// <param name="description"></param> | ||
543 | /// <param name="invType"></param> | ||
544 | /// <param name="assetType"></param> | ||
545 | /// <param name="data"></param> | ||
546 | /// <returns></returns> | ||
547 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) | ||
541 | { | 548 | { |
542 | AssetBase asset = new AssetBase(); | 549 | AssetBase asset = new AssetBase(); |
543 | asset.Name = name; | 550 | asset.Name = name; |
544 | asset.Description = description; | 551 | asset.Description = description; |
545 | asset.InvType = invType; | ||
546 | asset.Type = assetType; | 552 | asset.Type = assetType; |
547 | asset.FullID = LLUUID.Random(); | 553 | asset.FullID = LLUUID.Random(); |
548 | asset.Data = (data == null) ? new byte[1] : data; | 554 | asset.Data = (data == null) ? new byte[1] : data; |
555 | |||
549 | return asset; | 556 | return asset; |
550 | } | 557 | } |
551 | 558 | ||
@@ -603,10 +610,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
603 | } | 610 | } |
604 | } | 611 | } |
605 | 612 | ||
613 | /// <summary> | ||
614 | /// Create a new inventory item. | ||
615 | /// </summary> | ||
616 | /// <param name="remoteClient"></param> | ||
617 | /// <param name="folderID"></param> | ||
618 | /// <param name="callbackID"></param> | ||
619 | /// <param name="asset"></param> | ||
620 | /// <param name="invType"></param> | ||
621 | /// <param name="nextOwnerMask"></param> | ||
606 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, | 622 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, |
607 | AssetBase asset, uint nextOwnerMask) | 623 | AssetBase asset, sbyte invType, uint nextOwnerMask) |
608 | { | 624 | { |
609 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask); | 625 | CreateNewInventoryItem( |
626 | remoteClient, folderID, callbackID, asset, invType, | ||
627 | (uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask); | ||
610 | } | 628 | } |
611 | 629 | ||
612 | /// <summary> | 630 | /// <summary> |
@@ -616,9 +634,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
616 | /// <param name="folderID"></param> | 634 | /// <param name="folderID"></param> |
617 | /// <param name="callbackID"></param> | 635 | /// <param name="callbackID"></param> |
618 | /// <param name="asset"></param> | 636 | /// <param name="asset"></param> |
637 | /// <param name="invType"></param> | ||
619 | /// <param name="nextOwnerMask"></param> | 638 | /// <param name="nextOwnerMask"></param> |
620 | private void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID folderID, uint callbackID, | 639 | private void CreateNewInventoryItem( |
621 | AssetBase asset, uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) | 640 | IClientAPI remoteClient, LLUUID folderID, uint callbackID, AssetBase asset, sbyte invType, |
641 | uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask) | ||
622 | { | 642 | { |
623 | CachedUserInfo userInfo | 643 | CachedUserInfo userInfo |
624 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 644 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
@@ -633,7 +653,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
633 | item.Description = asset.Description; | 653 | item.Description = asset.Description; |
634 | item.Name = asset.Name; | 654 | item.Name = asset.Name; |
635 | item.AssetType = asset.Type; | 655 | item.AssetType = asset.Type; |
636 | item.InvType = asset.InvType; | 656 | item.InvType = invType; |
637 | item.Folder = folderID; | 657 | item.Folder = folderID; |
638 | item.CurrentPermissions = currentMask; | 658 | item.CurrentPermissions = currentMask; |
639 | item.NextPermissions = nextOwnerMask; | 659 | item.NextPermissions = nextOwnerMask; |
@@ -692,10 +712,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
692 | data=Encoding.ASCII.GetBytes(strdata); | 712 | data=Encoding.ASCII.GetBytes(strdata); |
693 | } | 713 | } |
694 | 714 | ||
695 | AssetBase asset = CreateAsset(name, description, invType, assetType, data); | 715 | AssetBase asset = CreateAsset(name, description, assetType, data); |
696 | AssetCache.AddAsset(asset); | 716 | AssetCache.AddAsset(asset); |
697 | 717 | ||
698 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); | 718 | CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, invType, nextOwnerMask); |
699 | } | 719 | } |
700 | else | 720 | else |
701 | { | 721 | { |
@@ -926,8 +946,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
926 | public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo, | 946 | public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo, |
927 | uint primLocalID) | 947 | uint primLocalID) |
928 | { | 948 | { |
929 | LLUUID itemID=itemInfo.ItemID; | 949 | LLUUID itemID = itemInfo.ItemID; |
930 | LLUUID folderID=itemInfo.ParentID; | ||
931 | 950 | ||
932 | // Find the prim we're dealing with | 951 | // Find the prim we're dealing with |
933 | SceneObjectPart part = GetSceneObjectPart(primLocalID); | 952 | SceneObjectPart part = GetSceneObjectPart(primLocalID); |
@@ -1057,7 +1076,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1057 | if (part == null) | 1076 | if (part == null) |
1058 | return; | 1077 | return; |
1059 | 1078 | ||
1060 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.InvType, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); | 1079 | AssetBase asset = CreateAsset(itemBase.Name, itemBase.Description, (sbyte)itemBase.AssetType, Encoding.ASCII.GetBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}")); |
1061 | AssetCache.AddAsset(asset); | 1080 | AssetCache.AddAsset(asset); |
1062 | 1081 | ||
1063 | TaskInventoryItem taskItem=new TaskInventoryItem(); | 1082 | TaskInventoryItem taskItem=new TaskInventoryItem(); |
@@ -1084,6 +1103,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1084 | 1103 | ||
1085 | part.AddInventoryItem(taskItem); | 1104 | part.AddInventoryItem(taskItem); |
1086 | part.GetProperties(remoteClient); | 1105 | part.GetProperties(remoteClient); |
1106 | |||
1087 | if (ExternalChecks.ExternalChecksCanRunScript(taskItem.AssetID, part.UUID, remoteClient.AgentId)) | 1107 | if (ExternalChecks.ExternalChecksCanRunScript(taskItem.AssetID, part.UUID, remoteClient.AgentId)) |
1088 | { | 1108 | { |
1089 | part.StartScript(taskItem); | 1109 | part.StartScript(taskItem); |
@@ -1160,12 +1180,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1160 | CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 1180 | CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
1161 | if (userInfo != null) | 1181 | if (userInfo != null) |
1162 | { | 1182 | { |
1163 | string searchFolder = ""; | 1183 | // string searchFolder = ""; |
1164 | 1184 | ||
1165 | if (DeRezPacket.AgentBlock.Destination == 6) | 1185 | // if (DeRezPacket.AgentBlock.Destination == 6) |
1166 | searchFolder = "Trash"; | 1186 | // searchFolder = "Trash"; |
1167 | else if (DeRezPacket.AgentBlock.Destination == 9) | 1187 | // else if (DeRezPacket.AgentBlock.Destination == 9) |
1168 | searchFolder = "Lost And Found"; | 1188 | // searchFolder = "Lost And Found"; |
1169 | 1189 | ||
1170 | // If we're deleting someone else's item, it goes back to their deleted items folder | 1190 | // If we're deleting someone else's item, it goes back to their deleted items folder |
1171 | // If we're returning someone's item, it goes back to the owner's Lost And Found folder. | 1191 | // If we're returning someone's item, it goes back to the owner's Lost And Found folder. |
@@ -1196,8 +1216,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1196 | AssetBase asset = CreateAsset( | 1216 | AssetBase asset = CreateAsset( |
1197 | ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), | 1217 | ((SceneObjectGroup) selectedEnt).GetPartName(selectedEnt.LocalId), |
1198 | ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), | 1218 | ((SceneObjectGroup) selectedEnt).GetPartDescription(selectedEnt.LocalId), |
1199 | (sbyte) InventoryType.Object, | 1219 | (sbyte)AssetType.Object, |
1200 | (sbyte) AssetType.Object, | ||
1201 | Helpers.StringToField(sceneObjectXml)); | 1220 | Helpers.StringToField(sceneObjectXml)); |
1202 | AssetCache.AddAsset(asset); | 1221 | AssetCache.AddAsset(asset); |
1203 | 1222 | ||
@@ -1214,7 +1233,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1214 | item.Description = asset.Description; | 1233 | item.Description = asset.Description; |
1215 | item.Name = asset.Name; | 1234 | item.Name = asset.Name; |
1216 | item.AssetType = asset.Type; | 1235 | item.AssetType = asset.Type; |
1217 | item.InvType = asset.InvType; | 1236 | item.InvType = (int)InventoryType.Object; |
1218 | item.Folder = folderID; | 1237 | item.Folder = folderID; |
1219 | if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) | 1238 | if ((remoteClient.AgentId != objectGroup.RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) |
1220 | { | 1239 | { |
@@ -1286,7 +1305,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1286 | // search through folders to find the asset. | 1305 | // search through folders to find the asset. |
1287 | while (searchfolders.Count > 0) | 1306 | while (searchfolders.Count > 0) |
1288 | { | 1307 | { |
1289 | |||
1290 | InventoryFolderImpl fld = searchfolders.Dequeue(); | 1308 | InventoryFolderImpl fld = searchfolders.Dequeue(); |
1291 | lock (fld) | 1309 | lock (fld) |
1292 | { | 1310 | { |
@@ -1308,10 +1326,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1308 | } | 1326 | } |
1309 | } | 1327 | } |
1310 | } | 1328 | } |
1329 | |||
1311 | AssetBase asset = CreateAsset( | 1330 | AssetBase asset = CreateAsset( |
1312 | objectGroup.GetPartName(objectGroup.LocalId), | 1331 | objectGroup.GetPartName(objectGroup.LocalId), |
1313 | objectGroup.GetPartDescription(objectGroup.LocalId), | 1332 | objectGroup.GetPartDescription(objectGroup.LocalId), |
1314 | (sbyte)InventoryType.Object, | ||
1315 | (sbyte)AssetType.Object, | 1333 | (sbyte)AssetType.Object, |
1316 | Helpers.StringToField(sceneObjectXml)); | 1334 | Helpers.StringToField(sceneObjectXml)); |
1317 | AssetCache.AddAsset(asset); | 1335 | AssetCache.AddAsset(asset); |
@@ -1324,7 +1342,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1324 | item.Description = asset.Description; | 1342 | item.Description = asset.Description; |
1325 | item.Name = asset.Name; | 1343 | item.Name = asset.Name; |
1326 | item.AssetType = asset.Type; | 1344 | item.AssetType = asset.Type; |
1327 | item.InvType = asset.InvType; | 1345 | item.InvType = (int)InventoryType.Object; |
1328 | 1346 | ||
1329 | // Sticking it in root folder for now.. objects folder later? | 1347 | // Sticking it in root folder for now.. objects folder later? |
1330 | 1348 | ||
@@ -1369,7 +1387,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1369 | AssetBase asset = CreateAsset( | 1387 | AssetBase asset = CreateAsset( |
1370 | objectGroup.GetPartName(objectGroup.LocalId), | 1388 | objectGroup.GetPartName(objectGroup.LocalId), |
1371 | objectGroup.GetPartDescription(objectGroup.LocalId), | 1389 | objectGroup.GetPartDescription(objectGroup.LocalId), |
1372 | (sbyte)InventoryType.Object, | ||
1373 | (sbyte)AssetType.Object, | 1390 | (sbyte)AssetType.Object, |
1374 | Helpers.StringToField(sceneObjectXml)); | 1391 | Helpers.StringToField(sceneObjectXml)); |
1375 | AssetCache.AddAsset(asset); | 1392 | AssetCache.AddAsset(asset); |
@@ -1382,7 +1399,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1382 | item.Description = asset.Description; | 1399 | item.Description = asset.Description; |
1383 | item.Name = asset.Name; | 1400 | item.Name = asset.Name; |
1384 | item.AssetType = asset.Type; | 1401 | item.AssetType = asset.Type; |
1385 | item.InvType = asset.InvType; | 1402 | item.InvType = (int)InventoryType.Object; |
1386 | 1403 | ||
1387 | // Sticking it in root folder for now.. objects folder later? | 1404 | // Sticking it in root folder for now.. objects folder later? |
1388 | 1405 | ||
@@ -1748,7 +1765,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1748 | AssetBase asset = CreateAsset( | 1765 | AssetBase asset = CreateAsset( |
1749 | returnobjects[i].GetPartName(returnobjects[i].LocalId), | 1766 | returnobjects[i].GetPartName(returnobjects[i].LocalId), |
1750 | returnobjects[i].GetPartDescription(returnobjects[i].LocalId), | 1767 | returnobjects[i].GetPartDescription(returnobjects[i].LocalId), |
1751 | (sbyte)InventoryType.Object, | ||
1752 | (sbyte)AssetType.Object, | 1768 | (sbyte)AssetType.Object, |
1753 | Helpers.StringToField(sceneObjectXml)); | 1769 | Helpers.StringToField(sceneObjectXml)); |
1754 | AssetCache.AddAsset(asset); | 1770 | AssetCache.AddAsset(asset); |
@@ -1761,8 +1777,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1761 | item.Description = asset.Description; | 1777 | item.Description = asset.Description; |
1762 | item.Name = asset.Name; | 1778 | item.Name = asset.Name; |
1763 | item.AssetType = asset.Type; | 1779 | item.AssetType = asset.Type; |
1764 | item.InvType = asset.InvType; | 1780 | item.InvType = (int)InventoryType.Object; |
1765 | item.Folder = folderID; | 1781 | item.Folder = folderID; |
1782 | |||
1766 | if ((AgentId != returnobjects[i].RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) | 1783 | if ((AgentId != returnobjects[i].RootPart.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions()) |
1767 | { | 1784 | { |
1768 | uint perms = returnobjects[i].GetEffectivePermissions(); | 1785 | uint perms = returnobjects[i].GetEffectivePermissions(); |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 4d80603..6f4e481 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -2696,7 +2696,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
2696 | public void llGiveInventory(string destination, string inventory) | 2696 | public void llGiveInventory(string destination, string inventory) |
2697 | { | 2697 | { |
2698 | m_host.AddScriptLPS(1); | 2698 | m_host.AddScriptLPS(1); |
2699 | NotImplemented("llGiveInventory"); | 2699 | NotImplemented("llGiveInventory not yet oh no!"); |
2700 | } | 2700 | } |
2701 | 2701 | ||
2702 | public void llRemoveInventory(string item) | 2702 | public void llRemoveInventory(string item) |