aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs33
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine.Compiler.LSL/Engine.cs2
2 files changed, 32 insertions, 3 deletions
diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
index ea4824b..17d2680 100644
--- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
+++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs
@@ -31,6 +31,7 @@ using System.Threading;
31using Db4objects.Db4o; 31using Db4objects.Db4o;
32using Db4objects.Db4o.Query; 32using Db4objects.Db4o.Query;
33using libsecondlife; 33using libsecondlife;
34using Nini.Config;
34using OpenSim.Framework.Console; 35using OpenSim.Framework.Console;
35using OpenSim.Framework.Interfaces; 36using OpenSim.Framework.Interfaces;
36using OpenSim.Framework.Types; 37using OpenSim.Framework.Types;
@@ -345,7 +346,7 @@ namespace OpenSim.Region.GridInterfaces.Local
345 db.Set(store); 346 db.Set(store);
346 db.Commit(); 347 db.Commit();
347 348
348 Image = new AssetBase(); 349 /*Image = new AssetBase();
349 Image.FullID = new LLUUID("00000000-0000-2222-3333-000000000001"); 350 Image.FullID = new LLUUID("00000000-0000-2222-3333-000000000001");
350 Image.Name = "WelcomeNote"; 351 Image.Name = "WelcomeNote";
351 Image.Type = 7; 352 Image.Type = 7;
@@ -357,7 +358,35 @@ namespace OpenSim.Region.GridInterfaces.Local
357 store.UUID = Image.FullID; 358 store.UUID = Image.FullID;
358 db.Set(store); 359 db.Set(store);
359 db.Commit(); 360 db.Commit();
360 361 */
362
363 string filePath = Path.Combine(Util.configDir(), "OpenSimAssetSet.xml");
364 XmlConfigSource source = new XmlConfigSource(filePath);
365 ReadAssetDetails(source);
366 }
367
368 protected void ReadAssetDetails(IConfigSource source)
369 {
370 AssetBase newAsset = null;
371 for (int i = 0; i < source.Configs.Count; i++)
372 {
373 newAsset = new AssetBase();
374 newAsset.FullID = new LLUUID(source.Configs[i].GetString("assetID", LLUUID.Random().ToStringHyphenated()));
375 newAsset.Name = source.Configs[i].GetString("name", "");
376 newAsset.Type =(sbyte) source.Configs[i].GetInt("assetType", 0);
377 newAsset.InvType =(sbyte) source.Configs[i].GetInt("inventoryType", 0);
378 string fileName = source.Configs[i].GetString("fileName", "");
379 if (fileName != "")
380 {
381 this.LoadAsset(newAsset, false, fileName);
382 AssetStorage store = new AssetStorage();
383 store.Data = newAsset.Data;
384 store.Name = newAsset.Name;
385 store.UUID = newAsset.FullID;
386 db.Set(store);
387 db.Commit();
388 }
389 }
361 } 390 }
362 391
363 private void LoadAsset(AssetBase info, bool image, string filename) 392 private void LoadAsset(AssetBase info, bool image, string filename)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine.Compiler.LSL/Engine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine.Compiler.LSL/Engine.cs
index 81caf2d..2db35c4 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine.Compiler.LSL/Engine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine.Compiler.LSL/Engine.cs
@@ -30,7 +30,7 @@ using System;
30using System.Reflection; 30using System.Reflection;
31using System.Reflection.Emit; 31using System.Reflection.Emit;
32using System.Threading; 32using System.Threading;
33//using System.Windows.Forms; 33
34 34
35namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL 35namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
36{ 36{