diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 62da221cb3..6ee83aed74 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -5479,6 +5479,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return id.ToString(); } + public LSL_Key osGetInventoryItemKey(LSL_String name) + { + m_host.AddScriptLPS(1); + + TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); + + if (item == null) + return UUID.Zero.ToString(); + + if ((item.CurrentPermissions + & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) + == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) + { + return item.ItemID.ToString(); + } + + return UUID.Zero.ToString(); + } + public LSL_String osGetInventoryName(LSL_Key itemId) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 7c5ced8013..c65b78503b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -549,6 +549,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Integer osApproxEquals(rotation ra, rotation rb); LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin); LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId); + LSL_Key osGetInventoryItemKey(LSL_String name); LSL_String osGetInventoryName(LSL_Key itemId); LSL_String osGetInventoryDesc(LSL_String itemNameOrId); LSL_Key osGetLastChangedEventKey(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index f93cea8274..1d39e70ea8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public partial class ScriptBaseClass { // SCRIPTS CONSTANTS - public static readonly LSLInteger OS_APIVERSION = 5; + public static readonly LSLInteger OS_APIVERSION = 6; public static readonly LSLInteger TRUE = 1; public static readonly LSLInteger FALSE = 0; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 6a70305702..12c63b308d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -1382,6 +1382,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_OSSL_Functions.osGetInventoryLastOwner(itemNameOrId); } + public LSL_Key osGetInventoryItemKey(LSL_String name) + { + return m_OSSL_Functions.osGetInventoryItemKey(name); + } + public LSL_String osGetInventoryName(LSL_Key itemId) { return m_OSSL_Functions.osGetInventoryName(itemId); diff --git a/bin/ScriptSyntax.xml b/bin/ScriptSyntax.xml index 34cd1cc8b8..12c3a30deb 100644 --- a/bin/ScriptSyntax.xml +++ b/bin/ScriptSyntax.xml @@ -1,4 +1,4 @@ -d2556181-baf5-e5b9-c8ec-99eda597b9f6 +4c3dbda3-bc1e-b0f0-c532-2c6daf1e2343 llsd-lsl-syntax-version2 controls @@ -1513,7 +1513,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 OS_APIVERSION typeinteger - value5 + value6 OS_ATTACH_MSG_ALL typeinteger @@ -3479,7 +3479,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 arguments nametypestring - idtypestring + idtypekey accepttypeinteger @@ -3507,7 +3507,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 llCreateLink arguments - targetIdtypestring + targetIdtypekey parenttypeinteger tooltipSleep 1.0 @@ -3752,14 +3752,14 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returninteger arguments - idtypestring + idtypekey llGetAgentLanguage returnstring arguments - idtypestring + idtypekey llGetAgentList @@ -3774,7 +3774,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnvector arguments - idtypestring + idtypekey llGetAlpha @@ -3793,14 +3793,14 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnstring arguments - idtypestring + idtypekey llGetAnimationList returnlist arguments - idtypestring + idtypekey llGetAnimationOverride @@ -3819,7 +3819,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnlist arguments - idtypestring + idtypekey llGetBoundingBox @@ -4404,7 +4404,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnstring arguments - idtypestring + idtypekey llGetVel @@ -4420,14 +4420,14 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 llGiveInventory arguments - destinationtypestring + destinationtypekey inventorytypestring llGiveInventoryList arguments - destinationtypestring + destinationtypekey categorytypestring inventorytypelist @@ -4436,7 +4436,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returninteger arguments - destinationtypestring + destinationtypekey amounttypeinteger @@ -4559,7 +4559,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnstring arguments - idtypestring + idtypekey llLinkParticleSystem @@ -6001,7 +6001,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returnkey arguments - destinationtypestring + destinationtypekey amounttypeinteger @@ -6152,8 +6152,26 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returninteger arguments - atypefloat - btypefloat + ratyperotation + rbtyperotation + margintypefloat + + + osApproxEquals + + returninteger + arguments + ratyperotation + rbtyperotation + + + osApproxEquals + + returninteger + arguments + vatypevector + vbtypevector + margintypefloat osApproxEquals @@ -6177,26 +6195,8 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 returninteger arguments - ratyperotation - rbtyperotation - - - osApproxEquals - - returninteger - arguments - ratyperotation - rbtyperotation - margintypefloat - - - osApproxEquals - - returninteger - arguments - vatypevector - vbtypevector - margintypefloat + atypefloat + btypefloat osAvatarName2Key @@ -6599,6 +6599,13 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 itemNameOrIdtypestring + osGetInventoryItemKey + + returnkey + arguments + nametypestring + + osGetInventoryLastOwner returnkey @@ -6799,15 +6806,15 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 osKickAvatar arguments - FirstNametypestring - SurNametypestring + agentIdtypekey alerttypestring osKickAvatar arguments - agentIdtypekey + FirstNametypestring + SurNametypestring alerttypestring @@ -6925,7 +6932,6 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 nametypestring positiontypevector notecardtypestring - optionstypeinteger osNpcCreate @@ -6936,6 +6942,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 nametypestring positiontypevector notecardtypestring + optionstypeinteger osNpcGetOwner @@ -7006,6 +7013,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 arguments npctypekey + channeltypeinteger messagetypestring @@ -7013,7 +7021,6 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 arguments npctypekey - channeltypeinteger messagetypestring @@ -7406,6 +7413,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 osSetProjectionParams arguments + primtypekey projectiontypeinteger texturetypekey fovtypefloat @@ -7427,7 +7435,6 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 osSetProjectionParams arguments - primtypekey projectiontypeinteger texturetypekey fovtypefloat @@ -7596,6 +7603,7 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 arguments srctypestring starttypeinteger + lengthtypeinteger osStringSubString @@ -7604,7 +7612,6 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 arguments srctypestring starttypeinteger - lengthtypeinteger osSunGetParam @@ -7622,15 +7629,6 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 osTeleportAgent - - arguments - agenttypestring - regionNametypestring - positiontypevector - lookattypevector - - - osTeleportAgent arguments agenttypestring @@ -7648,6 +7646,15 @@ d2556181-baf5-e5b9-c8ec-99eda597b9f6 lookattypevector + osTeleportAgent + + arguments + agenttypestring + regionNametypestring + positiontypevector + lookattypevector + + osTeleportObject returninteger