mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
This commit is contained in:
@@ -1483,12 +1483,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// Create new asset
|
||||
AssetBase asset = new AssetBase();
|
||||
asset.Name = notecardName;
|
||||
AssetBase asset = new AssetBase(UUID.Random(), notecardName, (sbyte)AssetType.Notecard);
|
||||
asset.Description = "Script Generated Notecard";
|
||||
asset.Type = 7;
|
||||
asset.FullID = UUID.Random();
|
||||
string notecardData = "";
|
||||
string notecardData = String.Empty;
|
||||
|
||||
for (int i = 0; i < contents.Length; i++) {
|
||||
notecardData += contents.GetLSLStringItem(i) + "\n";
|
||||
|
||||
Reference in New Issue
Block a user