mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:17:34 +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);
|
||||
|
||||
@@ -561,6 +561,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin);
|
||||
LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId);
|
||||
LSL_Key osGetInventoryItemKey(LSL_String name);
|
||||
LSL_Key osGetLinkInventoryKey(LSL_Integer linkNumber, LSL_String name, LSL_Integer type);
|
||||
LSL_Key osGetLinkInventoryItemKey(LSL_Integer linkNumber, LSL_String name);
|
||||
LSL_String osGetInventoryName(LSL_Key itemId);
|
||||
LSL_String osGetLinkInventoryName(LSL_Integer linkNumber, LSL_Key itemId);
|
||||
|
||||
@@ -43,7 +43,7 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass : MarshalByRefObject
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
public ILSL_Api m_LSL_Functions;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass : MarshalByRefObject
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
public ILS_Api m_LS_Functions;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass : MarshalByRefObject
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
public IMOD_Api m_MOD_Functions;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass : MarshalByRefObject
|
||||
public partial class ScriptBaseClass
|
||||
{
|
||||
public IOSSL_Api m_OSSL_Functions;
|
||||
|
||||
@@ -1460,6 +1460,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osGetInventoryItemKey(name);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Key osGetLinkInventoryKey(LSL_Integer linkNumber, LSL_String name, LSL_Integer type)
|
||||
{
|
||||
return m_OSSL_Functions.osGetLinkInventoryKey(linkNumber, name, type);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Key osGetLinkInventoryItemKey(LSL_Integer linkNumber, LSL_String name)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ using OpenSim.Region.ScriptEngine.Interfaces;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
public partial class ScriptBaseClass : MarshalByRefObject, IScript
|
||||
public partial class ScriptBaseClass : IScript
|
||||
{
|
||||
private Dictionary<string, MethodInfo> inits = new Dictionary<string, MethodInfo>();
|
||||
public ScriptBaseClass()
|
||||
|
||||
@@ -202,11 +202,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
Owner = Key;
|
||||
Position = new LSL_Types.Vector3(presence.AbsolutePosition);
|
||||
Rotation = new LSL_Types.Quaternion(
|
||||
presence.Rotation.X,
|
||||
presence.Rotation.Y,
|
||||
presence.Rotation.Z,
|
||||
presence.Rotation.W);
|
||||
Rotation = new LSL_Types.Quaternion(presence.Rotation);
|
||||
Velocity = new LSL_Types.Vector3(presence.Velocity);
|
||||
|
||||
Type = 0x01; // Avatar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
3c8d15ee-d2ba-11ee-ae64-406c8fbbb495
|
||||
9a2d5a5e-484a-40b0-82bc-092443b08ff7
|
||||
<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
|
||||
<key>controls</key>
|
||||
<map>
|
||||
@@ -7393,6 +7393,15 @@
|
||||
</array>
|
||||
<key>tooltip</key><string>Returns id(key) of a inventory item within a prim inventory. If name is not unique result maybe unpredictable.\n- Threat Level: Not Checked.\n- Permissions: Always allowed by default.\n- Sleep: 0 seconds.</string>
|
||||
</map>
|
||||
<key>osGetLinkInventoryAssetKey</key>
|
||||
<map>
|
||||
<key>return</key><string>key</string>
|
||||
<key>arguments</key><array>
|
||||
<map><key>linkNumber</key><map><key>type</key><string>integer</string></map></map>
|
||||
<map><key>name</key><map><key>type</key><string>string</string></map></map>
|
||||
<map><key>type</key><map><key>type</key><string>integer</string></map></map>
|
||||
</array>
|
||||
</map>
|
||||
<key>osGetLinkInventoryItemKey</key>
|
||||
<map>
|
||||
<key>return</key><string>key</string>
|
||||
|
||||
@@ -8,6 +8,8 @@ rem To compile in debug mode
|
||||
rem To compile in release mode comment line (add rem to start) above and uncomment next (remove rem)
|
||||
rem @echo dotnet build --configuration Debug OpenSim.sln > compile.bat
|
||||
:done
|
||||
copy bin\System.Drawing.Common.dll.win bin\System.Drawing.Common.dll
|
||||
|
||||
if exist "bin\addin-db-002" (
|
||||
del /F/Q/S bin\addin-db-002 > NUL
|
||||
rmdir /Q/S bin\addin-db-002
|
||||
|
||||
Reference in New Issue
Block a user