Resolves #47: Use LSL Inventory type when uploading scripts. Thanks to @xBorus

This commit is contained in:
Casper Warden
2021-09-22 14:53:34 +01:00
parent 413d8312c7
commit 90f59a84d6
4 changed files with 23 additions and 0 deletions

View File

@@ -618,6 +618,7 @@ export class InventoryFolder
break;
}
case InventoryType.Script:
case InventoryType.LSL:
{
this.agent.currentRegion.caps.capsPostXML('UpdateScriptAgent', {
'item_id': new LLSD.UUID(createInventoryMsg.InventoryData[0].ItemID.toString()),
@@ -702,6 +703,7 @@ export class InventoryFolder
case InventoryType.Notecard:
case InventoryType.Gesture:
case InventoryType.Script:
case InventoryType.LSL:
// These types must be created first and then modified
this.uploadInventoryItem(type, inventoryType, data, name, description).then((invItemID: UUID) =>
{

View File

@@ -241,6 +241,9 @@ export class InventoryItem
case 'snapshot':
item.inventoryType = InventoryType.Snapshot;
break;
case 'LSL':
item.inventoryType = InventoryType.LSL;
break;
case 'attach':
item.inventoryType = InventoryType.Attachment;
break;

View File

@@ -174,6 +174,8 @@ export class Utils
return 'gesture';
case InventoryType.Mesh:
return 'mesh';
case InventoryType.LSL:
return 'LSL';
default:
console.error('Unknown inventory type: ' + InventoryType[type]);
return 'texture';