duhh things about scripts are for objects with scripts, not all

This commit is contained in:
UbitUmarov
2020-08-23 22:46:46 +01:00
parent 2d62c09292
commit e0511240ef
2 changed files with 103 additions and 36 deletions

View File

@@ -5228,14 +5228,12 @@ namespace OpenSim.Region.Framework.Scenes
return time;
}
public int ScriptsMemory()
public bool ScriptsMemory(out int memory)
{
memory = 0;
IScriptModule[] engines = Scene.RequestModuleInterfaces<IScriptModule>();
if (engines.Length == 0) // No engine at all
return 0;
int memory = 0;
return false;
// get all the scripts in all parts
SceneObjectPart[] parts = m_parts.GetArray();
@@ -5244,6 +5242,10 @@ namespace OpenSim.Region.Framework.Scenes
{
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
}
if (scripts.Count == 0)
return false;
// extract the UUIDs
List<UUID> ids = new List<UUID>(scripts.Count);
foreach (TaskInventoryItem script in scripts)
@@ -5261,7 +5263,7 @@ namespace OpenSim.Region.Framework.Scenes
memory += e.GetScriptsMemory(ids);
}
}
return memory;
return true;
}
/// <summary>