mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
Heart surgery on asset service code bits. Affects OpenSim.ini configuration -- please see the example. Affects region servers only.
This may break a lot of things, but it needs to go in. It was tested in standalone and the UCI grid, but it needs a lot more testing. Known problems: * HG asset transfers are borked for now * missing texture is missing * 3 unit tests commented out for now
This commit is contained in:
@@ -3782,8 +3782,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
World.RegionInfo.RegionLocY * Constants.RegionSize,
|
||||
0);
|
||||
|
||||
World.CommsManager.AssetCache.GetAsset(item.AssetID,
|
||||
delegate(UUID i, AssetBase a)
|
||||
World.AssetService.Get(item.AssetID.ToString(), this,
|
||||
delegate(string i, object sender, AssetBase a)
|
||||
{
|
||||
AssetLandmark lm = new AssetLandmark(a);
|
||||
|
||||
@@ -3795,7 +3795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
AsyncCommands.
|
||||
DataserverPlugin.DataserverReply(i.ToString(),
|
||||
reply);
|
||||
}, false);
|
||||
});
|
||||
|
||||
// ScriptSleep(1000);
|
||||
return tid.ToString();
|
||||
@@ -9311,7 +9311,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
|
||||
private void WithNotecard(UUID assetID, AssetRequestCallback cb)
|
||||
{
|
||||
World.CommsManager.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
|
||||
World.AssetService.Get(assetID.ToString(), this,
|
||||
delegate(string i, object sender, AssetBase a)
|
||||
{
|
||||
UUID uuid = UUID.Zero;
|
||||
UUID.TryParse(i, out uuid);
|
||||
cb(uuid, a);
|
||||
});
|
||||
}
|
||||
|
||||
public LSL_String llGetNumberOfNotecardLines(string name)
|
||||
|
||||
@@ -1341,7 +1341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
+ textLength.ToString() + "\n" + notecardData + "}\n";
|
||||
|
||||
asset.Data = Encoding.ASCII.GetBytes(notecardData);
|
||||
World.CommsManager.AssetCache.AddAsset(asset);
|
||||
World.AssetService.Store(asset);
|
||||
|
||||
// Create Task Entry
|
||||
TaskInventoryItem taskItem=new TaskInventoryItem();
|
||||
@@ -1402,7 +1402,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if (!NotecardCache.IsCached(assetID))
|
||||
{
|
||||
AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false);
|
||||
AssetBase a = World.AssetService.Get(assetID.ToString());
|
||||
if (a != null)
|
||||
{
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if (!NotecardCache.IsCached(assetID))
|
||||
{
|
||||
AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false);
|
||||
AssetBase a = World.AssetService.Get(assetID.ToString());
|
||||
if (a != null)
|
||||
{
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
@@ -1512,7 +1512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
if (!NotecardCache.IsCached(assetID))
|
||||
{
|
||||
AssetBase a = World.CommsManager.AssetCache.GetAsset(assetID, false);
|
||||
AssetBase a = World.AssetService.Get(assetID.ToString());
|
||||
if (a != null)
|
||||
{
|
||||
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
|
||||
|
||||
Reference in New Issue
Block a user