Commit Graph

2565 Commits

Author SHA1 Message Date
UbitUmarov
c618c4a6c4 rename the new osGetInventoryKeys as osgetinventoryitemkeys and osgetlinkinventorykey as osgetinventoryitemkey for coerence and to make clear that key means the item key within prim inventory and not its asset key as in ll funtion 2024-03-05 18:51:42 +00:00
UbitUmarov
52c287d8dc manits 9118: fix clear of animesh flag on *GetPrimitiveParams 2024-03-04 23:48:13 +00:00
Jeff Kelley
d58f9f0f5d osGetSitTarget
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2024-02-29 20:28:20 +00:00
Adil El Farissi
60214e6e81 Add 2 OSSL functions to the LinkInventory collection
Add Functions:
+ osGiveLinkInventoryList(integer linkNumber, key destination, string category, list inventory)
Give a group of items located in a child prim inventory

+ osRemoveLinkInventory(integer linkNumber, string name)
Remove an item from a child prim inventory

LSL Script example:
<pre><code>
default
{
    touch_start(integer a){

        integer linkNumber = llDetectedLinkNumber(0);
        list linkInventoryNames = osGetLinkInventoryNames(linkNumber, INVENTORY_ALL);
        osGiveLinkInventoryList(linkNumber, llDetectedKey(0), llGetLinkName(linkNumber), linkInventoryNames);

        for(integer i = 0; i < llGetListLength(linkInventoryNames); i++){
            osRemoveLinkInventory(linkNumber, llList2String(linkInventoryNames, i));
        }
    }
}
</code></pre>
2024-02-25 07:14:49 +00:00
UbitUmarov
eb9afdaffc break them a bit more... 2024-02-24 15:47:06 +00:00
UbitUmarov
121f270414 a few changes to last PR (aes methods) - all still untested 2024-02-24 14:50:54 +00:00
Adil El Farissi
b4f33ad594 Replaced OSSLError by OSSLShoutError 2024-02-23 23:42:18 +00:00
Adil El Farissi
db80781e7d Basic implementation of AES encryption/decryption and respective OSSL functions
Add methods:
+ private static string AESEncryptString(string secret, string plainText, string ivString= null)
AES Encrypt a string using a password and a random or custom Initialization Vector.

+ private static string AESDecryptString(string secret, string encryptedText, string ivString= null)
AES Decrypt the string encrypted by AESEncryptString with the same password and ivString used in the encryption.

Methods implementations:
+ Util.AESEncrypt(string secret, string plainText)
+ Util.AESDecrypt(string secret, string encryptedText)
+Util.AESEncryptTo(string secret, string plainText, string ivString)
+ Util.AESDecryptFrom(string secret, string encryptedText, string ivString)

OSSL functions as first case of use:
+ osAESEncrypt(string secret, string plainText)
+ osAESDecrypt(string secret, string encryptedText)
+ osAESEncryptTo(string secret, string plainText, string ivString)
+ osAESDecryptFrom(string secret, string encryptedText, string ivString)

LSL script example:
<pre><code>
string plainText = "Hello World :)";
string secret = "#!qUeRtY$@123^456€!#";

default
{
    touch_start(integer i)
    {
        string encryptedText = osAESEncrypt(secret, plainText);
        llOwnerSay("\nEncrypted with osAESEncrypt:\n"+ encryptedText);
        string decryptedText = osAESDecrypt(secret, encryptedText);
        llOwnerSay("\nDecrypted with osAESDecrypt:\n"+ decryptedText);

        // Encription / Decription with custom Initialization Vector.
        string ivString = (string)llGetOwner() /* +"_"+ llGenerateKey() */;
        string encryptedToText = osAESEncryptTo(secret, plainText, ivString);
        llOwnerSay("\nEncrypted with osAESEncryptTo:\n"+ encryptedToText);
        string decryptedFromText = osAESDecryptFrom(secret, encryptedToText, ivString);
        llOwnerSay("\nDecrypted with osAESDecryptFrom:\n"+ decryptedFromText);
    }
}
</code></pre>

Web Rain :)
2024-02-23 21:14:33 +00:00
UbitUmarov
35a40ada77 fix ossl set ProjectionFocus range 2024-02-22 18:16:25 +00:00
UbitUmarov
76c813c2e4 useless changes 2024-02-22 01:47:24 +00:00
UbitUmarov
b383a027dc cosmetics... 2024-02-21 15:58:05 +00:00
UbitUmarov
152b64179b a few changes to last PR, let getlink select root; add getkeys permissions checks (don't remember why we have those) plus cosmetics 2024-02-21 15:20:53 +00:00
Adil El Farissi
e835a46ec8 Fix uuid to string 2024-02-20 21:58:39 +00:00
Adil El Farissi
ca722ecdd8 Add some OSSL functions related to child prims inventory manipulations
Add functions:

+ osGiveLinkInventory(integer linkNumber, key destination, string inventory)
Give an item located in a child prim inventory.

+ osGetInventoryNames(integer type)
Return a list of items names by type (or INVENTORY_ALL) located in the prim inventory.

+ osGetLinkInventoryNames(integer linkNumber, integer type)
Return a list of items names by type (or INVENTORY_ALL) located in a child prim inventory.

+ osGetInventoryKeys(integer type)
Return a list of the items UUIDs by type (or INVENTORY_ALL) located in the prim inventory.

+ osGetLinkInventoryKeys(integer linkNumber, integer type)
Return a list of the items UUIDs by type (or INVENTORY_ALL) located in a child prim inventory.

+ osGetLinkInventoryKey(integer linkNumber, string name)
Return the UUID of the specified item name located in a child prim inventory.

+ osGetLinkInventoryDesc(integer linkNumber, string itemNameorid)
Return the description of an item located in a child prim inventory.

+ osGetLinkInventoryName(integer linkNumber, key itemId)
Return the name of an item located in a child prim inventory.

Note: the LinkInventory functions don't have access to the root prim contents. This may change if requested by the community...
2024-02-20 17:36:33 +00:00
UbitUmarov
cf27093ee9 several changes to llIsFriend and related methods 2024-02-16 20:14:06 +00:00
UbitUmarov
4e2bea288a add llIsFriend 2024-02-16 17:17:59 +00:00
UbitUmarov
dd58a3a57c cosmetics; remove old unused sop rotation axis ints 2024-02-15 18:48:00 +00:00
UbitUmarov
2e26b8a8bb add LinksetData support. Untested and still does not store in dbs. Not as spec. See mantis 9081 (runprebuild) 2024-02-06 23:45:11 +00:00
UbitUmarov
f1cba63aad retire StringToBytes variants with string format. Do the format before calling.. 2024-02-05 18:34:44 +00:00
UbitUmarov
79ac5c7f54 remove some obsolete code 2023-11-29 12:17:08 +00:00
UbitUmarov
953c646786 fix projector focus range.Thanks Rene Vega 2023-09-24 19:59:06 +01:00
UbitUmarov
bbe6075aa0 add lsl constant PRIM_SCULPT_FLAG_ANIMESH and change a few things about it 2023-08-08 18:45:49 +01:00
UbitUmarov
0cc702aaed plus minor indentation fix 2023-08-01 19:02:08 +01:00
Vincent Sylvester
dba340a447 Minor fixes
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2023-08-01 18:57:39 +01:00
UbitUmarov
dbee15498d mantis 9082: work around discrete math issues 2023-07-07 00:18:06 +01:00
UbitUmarov
35b4cfd6e2 mantis 9082: fix rotation for do arc 2023-07-06 03:33:48 +01:00
UbitUmarov
35e3383167 fix threat level of osDrawText 2023-06-30 23:03:53 +01:00
UbitUmarov
89130b9f0a fix osSetParcelDetails, plus more cosmetics 2023-06-21 10:30:14 +01:00
UbitUmarov
2849e57920 add osGetPrimCount([key primKey]) and osGetSittingAvatarsCount([key primkey]) that just do want name says unlike ll mess, absent primKey argument means current linkset 2023-06-14 22:45:37 +01:00
UbitUmarov
97b9f64e6d make llGetObjectPrimCount() return 0 on attachments, as spec 2023-06-14 21:57:40 +01:00
UbitUmarov
dc2017b3d9 cosmetics on lsl json 2023-06-05 21:35:22 +01:00
UbitUmarov
1f5dfa37b0 cosmetics on sensorrepeat 2023-06-04 23:25:00 +01:00
UbitUmarov
2e2dee76e4 put back CheckThreatLevel on osDie 2023-06-02 23:14:45 +01:00
UbitUmarov
f8d1e78e8a mantis 9080: make osDie only work on object rezzed by script linkset, as spec 2023-06-02 23:01:01 +01:00
UbitUmarov
8b6b00d597 fail to find lsl api in ossl should be a global fatal error 2023-06-02 22:37:10 +01:00
UbitUmarov
db1c739ef2 preloadsound is suposed to send ownerid, plus save ns on useless dic searchs 2023-05-31 21:44:48 +01:00
UbitUmarov
52bd6a443e make llLinkPlaySound() closer to spec 2023-05-31 19:27:43 +01:00
UbitUmarov
4462b65a48 don0t mess with flag usepaslist, thanks Tampa 2023-05-08 21:41:06 +01:00
UbitUmarov
700e044346 change llResetLand*List with ideas on mantis 9075 2023-05-08 21:22:12 +01:00
UbitUmarov
32028241d2 change llResetLand*List exec rights so works with group owned, plus other cosmetics 2023-05-08 18:54:51 +01:00
UbitUmarov
9c8ac8c70b cosmetics 2023-05-08 03:05:36 +01:00
UbitUmarov
c47805e20d cosmetics 2023-05-08 02:50:43 +01:00
UbitUmarov
cb0f6d099c mantis 9075: do set use lists flags on addign first entry 2023-05-07 19:37:34 +01:00
UbitUmarov
83491db916 several changes to llhttprequest like use HttpClient 2023-05-06 18:06:40 +01:00
UbitUmarov
864871f490 a few changes 2023-05-05 11:45:17 +01:00
Jeff Kelley
b96ef0d00c osSetPenColor
osSetPenColor1

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2023-05-05 10:45:02 +01:00
UbitUmarov
35962d8c39 add llListFindStrided; llListFindList change to be more as spec 2023-04-29 11:06:35 +01:00
UbitUmarov
7dbedecd88 add LSL llLinear2sRGB and llsRGB2Linear 2023-04-28 01:55:35 +01:00
UbitUmarov
549ebc1025 add old llList2ListStrided renamed osOldList2ListStrided to easy any possible script fixes 2023-04-27 22:15:19 +01:00
UbitUmarov
a4ba4232e6 change llList2ListStrided so it is more like spec (no exclusion range, etc 2023-04-27 22:01:52 +01:00