mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'opensim:master' into master
This commit is contained in:
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <summary>
|
||||
/// Contains all LSL ll-functions. This class will be in Default AppDomain.
|
||||
/// </summary>
|
||||
public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi
|
||||
public class LSL_Api : ILSL_Api, IScriptApi
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
[Serializable]
|
||||
public class LS_Api : MarshalByRefObject, ILS_Api, IScriptApi
|
||||
public class LS_Api : ILS_Api, IScriptApi
|
||||
{
|
||||
internal IScriptEngine m_ScriptEngine;
|
||||
internal SceneObjectPart m_host;
|
||||
|
||||
@@ -54,7 +54,7 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
[Serializable]
|
||||
public class MOD_Api : MarshalByRefObject, IMOD_Api, IScriptApi
|
||||
public class MOD_Api : IMOD_Api, IScriptApi
|
||||
{
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class OSSL_Api : MarshalByRefObject, IOSSL_Api, IScriptApi
|
||||
public class OSSL_Api : IOSSL_Api, IScriptApi
|
||||
{
|
||||
public const string GridInfoServiceConfigSectionName = "GridInfoService";
|
||||
|
||||
@@ -5541,6 +5541,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return (item == null) ? LSL_String.Empty : item.Description;
|
||||
}
|
||||
|
||||
public LSL_Key osGetLinkInventoryKey(LSL_Integer linkNumber, LSL_String name, LSL_Integer type)
|
||||
{
|
||||
SceneObjectPart part = GetSingleLinkPart(linkNumber);
|
||||
if(part == null)
|
||||
return LSL_String.NullKey;
|
||||
|
||||
TaskInventoryItem item = part.Inventory.GetInventoryItem(name, type);
|
||||
if (item is null)
|
||||
return LSL_String.NullKey;
|
||||
|
||||
if ((item.CurrentPermissions
|
||||
& (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
|
||||
== (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
|
||||
{
|
||||
return new LSL_Key(item.AssetID.ToString());
|
||||
}
|
||||
|
||||
return LSL_String.NullKey;
|
||||
}
|
||||
|
||||
public LSL_Key osGetLinkInventoryItemKey(LSL_Integer linkNumber, LSL_String name)
|
||||
{
|
||||
SceneObjectPart part = GetSingleLinkPart(linkNumber);
|
||||
|
||||
Reference in New Issue
Block a user