use shared assets for new empty notecard and defualt script. Grids not using core asset services may need the 2 new ones

This commit is contained in:
UbitUmarov
2022-08-19 22:26:00 +01:00
parent 4727aaa475
commit 0603667627
18 changed files with 298 additions and 248 deletions

View File

@@ -58,6 +58,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
}
else
{
asset.Data = Array.Empty<byte>();
m_log.InfoFormat("[ASSETS]: Instantiated: [{0}]", name);
}
@@ -145,9 +146,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
string assetIdStr = source.Configs[i].GetString("assetID", UUID.Random().ToString());
string name = source.Configs[i].GetString("name", String.Empty);
sbyte type = (sbyte)source.Configs[i].GetInt("assetType", 0);
string assetPath = Path.Combine(dir, source.Configs[i].GetString("fileName", String.Empty));
AssetBase newAsset = CreateAsset(assetIdStr, name, assetPath, type);
string assetPath = source.Configs[i].GetString("fileName", String.Empty);
AssetBase newAsset;
if (string.IsNullOrEmpty(assetPath))
newAsset = CreateAsset(assetIdStr, name, null, type);
else
newAsset = CreateAsset(assetIdStr, name, Path.Combine(dir, assetPath), type);
newAsset.Type = type;
assets.Add(newAsset);