aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMW2007-08-22 14:37:54 +0000
committerMW2007-08-22 14:37:54 +0000
commitb5921e2b95305d2918f94f52a560f8c004b8bcb4 (patch)
tree7deec09890e710941ec1a9d9a9f258f5ae8d1c26 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentFix for un-encrypted master avatar password in user database (diff)
downloadopensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.zip
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.gz
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.bz2
opensim-SC_OLD-b5921e2b95305d2918f94f52a560f8c004b8bcb4.tar.xz
Start of Task Inventory (ie prim's inventory). For now, you can only move scripts into a prim (from your user inventory) and although the script will now show up in the prims inventory, you can't make any changes to it (or delete it). Also a prim's inventory is currently not saved between restarts.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs32
1 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 765fafc..bf7bb7e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -189,7 +189,6 @@ namespace OpenSim.Region.Environment.Scenes
189 /// <param name="primLocalID"></param> 189 /// <param name="primLocalID"></param>
190 public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) 190 public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
191 { 191 {
192
193 bool hasPrim = false; 192 bool hasPrim = false;
194 foreach (EntityBase ent in Entities.Values) 193 foreach (EntityBase ent in Entities.Values)
195 { 194 {
@@ -198,7 +197,11 @@ namespace OpenSim.Region.Environment.Scenes
198 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); 197 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID);
199 if (hasPrim != false) 198 if (hasPrim != false)
200 { 199 {
201 ((SceneObjectGroup)ent).GetPartInventoryFileName(remoteClient, primLocalID); 200 bool fileChange = ((SceneObjectGroup)ent).GetPartInventoryFileName(remoteClient, primLocalID);
201 if (fileChange)
202 {
203 ((SceneObjectGroup)ent).RequestInventoryFile(primLocalID, xferManager);
204 }
202 break; 205 break;
203 } 206 }
204 } 207 }
@@ -216,6 +219,7 @@ namespace OpenSim.Region.Environment.Scenes
216 if (item != null) 219 if (item != null)
217 { 220 {
218 bool isTexture = false; 221 bool isTexture = false;
222 bool rezzed = false;
219 if (item.invType == 0) 223 if (item.invType == 0)
220 { 224 {
221 isTexture = true; 225 isTexture = true;
@@ -226,6 +230,7 @@ namespace OpenSim.Region.Environment.Scenes
226 string script = Util.FieldToString(rezAsset.Data); 230 string script = Util.FieldToString(rezAsset.Data);
227 //Console.WriteLine("rez script "+script); 231 //Console.WriteLine("rez script "+script);
228 this.EventManager.TriggerRezScript(localID, script); 232 this.EventManager.TriggerRezScript(localID, script);
233 rezzed = true;
229 } 234 }
230 else 235 else
231 { 236 {
@@ -236,8 +241,31 @@ namespace OpenSim.Region.Environment.Scenes
236 string script = Util.FieldToString(rezAsset.Data); 241 string script = Util.FieldToString(rezAsset.Data);
237 // Console.WriteLine("rez script " + script); 242 // Console.WriteLine("rez script " + script);
238 this.EventManager.TriggerRezScript(localID, script); 243 this.EventManager.TriggerRezScript(localID, script);
244 rezzed = true;
239 } 245 }
240 } 246 }
247
248 if (rezzed)
249 {
250 bool hasPrim = false;
251 foreach (EntityBase ent in Entities.Values)
252 {
253 if (ent is SceneObjectGroup)
254 {
255 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
256 if (hasPrim != false)
257 {
258 bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item);
259 if (added)
260 {
261 userInfo.DeleteItem(remoteClient.AgentId, item);
262 remoteClient.SendRemoveInventoryItem(itemID);
263 }
264 }
265 }
266 }
267
268 }
241 } 269 }
242 } 270 }
243 } 271 }