mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
Merge branch 'master' into varregion
This commit is contained in:
@@ -482,21 +482,14 @@ namespace OpenSim.Framework
|
||||
set { m_LoadedCreationID = value; }
|
||||
}
|
||||
|
||||
// Connected Telehub object
|
||||
private UUID m_TelehubObject = UUID.Zero;
|
||||
public UUID TelehubObject
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_TelehubObject;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_TelehubObject = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Connected Telehub object
|
||||
/// </summary>
|
||||
public UUID TelehubObject { get; set; }
|
||||
|
||||
// Our Connected Telehub's SpawnPoints
|
||||
/// <summary>
|
||||
/// Our connected Telehub's SpawnPoints
|
||||
/// </summary>
|
||||
public List<SpawnPoint> l_SpawnPoints = new List<SpawnPoint>();
|
||||
|
||||
// Add a SpawnPoint
|
||||
|
||||
@@ -39,8 +39,32 @@ namespace OpenSim.Framework
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Asset types used only in OpenSim.
|
||||
/// To avoid clashing with the code numbers used in Second Life, use only negative numbers here.
|
||||
/// </summary>
|
||||
public enum OpenSimAssetType : sbyte
|
||||
{
|
||||
Material = -2
|
||||
}
|
||||
|
||||
|
||||
#region SL / file extension / content-type conversions
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Enum entry corresponding to the given code, regardless of whether it belongs
|
||||
/// to the AssetType or OpenSimAssetType enums.
|
||||
/// </summary>
|
||||
public static object AssetTypeFromCode(sbyte assetType)
|
||||
{
|
||||
if (Enum.IsDefined(typeof(OpenMetaverse.AssetType), assetType))
|
||||
return (OpenMetaverse.AssetType)assetType;
|
||||
else if (Enum.IsDefined(typeof(OpenSimAssetType), assetType))
|
||||
return (OpenSimAssetType)assetType;
|
||||
else
|
||||
return OpenMetaverse.AssetType.Unknown;
|
||||
}
|
||||
|
||||
private class TypeMapping
|
||||
{
|
||||
private sbyte assetType;
|
||||
@@ -56,12 +80,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public object AssetType
|
||||
{
|
||||
get {
|
||||
if (Enum.IsDefined(typeof(OpenMetaverse.AssetType), assetType))
|
||||
return (OpenMetaverse.AssetType)assetType;
|
||||
else
|
||||
return OpenMetaverse.AssetType.Unknown;
|
||||
}
|
||||
get { return AssetTypeFromCode(assetType); }
|
||||
}
|
||||
|
||||
public InventoryType InventoryType
|
||||
@@ -102,6 +121,11 @@ namespace OpenSim.Framework
|
||||
: this((sbyte)assetType, inventoryType, contentType, null, extension)
|
||||
{
|
||||
}
|
||||
|
||||
public TypeMapping(OpenSimAssetType assetType, InventoryType inventoryType, string contentType, string extension)
|
||||
: this((sbyte)assetType, inventoryType, contentType, null, extension)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -142,7 +166,9 @@ namespace OpenSim.Framework
|
||||
new TypeMapping(AssetType.CurrentOutfitFolder, InventoryType.Unknown, "application/vnd.ll.currentoutfitfolder", "currentoutfitfolder"),
|
||||
new TypeMapping(AssetType.OutfitFolder, InventoryType.Unknown, "application/vnd.ll.outfitfolder", "outfitfolder"),
|
||||
new TypeMapping(AssetType.MyOutfitsFolder, InventoryType.Unknown, "application/vnd.ll.myoutfitsfolder", "myoutfitsfolder"),
|
||||
new TypeMapping(AssetType.Mesh, InventoryType.Mesh, "application/vnd.ll.mesh", "llm")
|
||||
new TypeMapping(AssetType.Mesh, InventoryType.Mesh, "application/vnd.ll.mesh", "llm"),
|
||||
|
||||
new TypeMapping(OpenSimAssetType.Material, InventoryType.Unknown, "application/llsd+xml", "material")
|
||||
};
|
||||
|
||||
private static Dictionary<sbyte, string> asset2Content;
|
||||
|
||||
@@ -29,6 +29,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
using OpenSimAssetType = OpenSim.Framework.SLUtil.OpenSimAssetType;
|
||||
|
||||
namespace OpenSim.Framework.Serialization
|
||||
{
|
||||
@@ -128,6 +129,7 @@ namespace OpenSim.Framework.Serialization
|
||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Texture] = ASSET_EXTENSION_SEPARATOR + "texture.jp2";
|
||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TextureTGA] = ASSET_EXTENSION_SEPARATOR + "texture.tga";
|
||||
ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.TrashFolder] = ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"; // Not sure if we'll ever see this
|
||||
ASSET_TYPE_TO_EXTENSION[(sbyte)OpenSimAssetType.Material] = ASSET_EXTENSION_SEPARATOR + "material.xml"; // Not sure if we'll ever see this
|
||||
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "animation.bvh"] = (sbyte)AssetType.Animation;
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "bodypart.txt"] = (sbyte)AssetType.Bodypart;
|
||||
@@ -152,6 +154,7 @@ namespace OpenSim.Framework.Serialization
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.jp2"] = (sbyte)AssetType.Texture;
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "texture.tga"] = (sbyte)AssetType.TextureTGA;
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "trashfolder.txt"] = (sbyte)AssetType.TrashFolder;
|
||||
EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "material.xml"] = (sbyte)OpenSimAssetType.Material;
|
||||
}
|
||||
|
||||
public static string CreateOarLandDataPath(LandData ld)
|
||||
|
||||
Reference in New Issue
Block a user