summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2026-03-03 11:11:02 -0800
committerRider Linden <rider@lindenlab.com>2026-03-03 11:11:02 -0800
commit0c289bf27dcc40b9f41152b60408fa047ccf6f65 (patch)
tree44decc732e37674d180668ac37bfc704d002b69e /indra/llinventory
parentbb233c070dedbbd3b7ec014a0679a0021958e775 (diff)
Pass desired script type as the subtype for a new script.
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventory.h8
-rw-r--r--indra/llinventory/llinventorydefines.h5
-rw-r--r--indra/llinventory/llinventorytype.h7
3 files changed, 12 insertions, 8 deletions
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 181c46226c..58dea83617 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -24,11 +24,11 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLINVENTORY_H
-#define LL_LLINVENTORY_H
+#pragma once
#include "llfoldertype.h"
#include "llinventorytype.h"
+#include "llinventorydefines.h"
#include "llpermissions.h"
#include "llrefcount.h"
#include "llsaleinfo.h"
@@ -166,6 +166,7 @@ public:
virtual const std::string& getActualDescription() const; // Does not follow links
virtual const LLSaleInfo& getSaleInfo() const;
virtual LLInventoryType::EType getInventoryType() const;
+ virtual U8 getInventorySubType() const { return getFlags() & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK; }
virtual U32 getFlags() const;
virtual time_t getCreationDate() const;
virtual U32 getCRC32() const; // really more of a checksum.
@@ -182,6 +183,7 @@ public:
void setSaleInfo(const LLSaleInfo& sale_info);
void setPermissions(const LLPermissions& perm);
void setInventoryType(LLInventoryType::EType inv_type);
+ void setInventorySubType(U8 sub_type) { setFlags((getFlags() & ~LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK) | (sub_type & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK)); }
void setFlags(U32 flags);
void setCreator(const LLUUID& creator); // only used for calling cards
@@ -294,5 +296,3 @@ protected:
LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item);
LLSD ll_create_sd_from_inventory_category(LLPointer<LLInventoryCategory> cat);
LLPointer<LLInventoryCategory> ll_create_category_from_sd(const LLSD& sd_cat);
-
-#endif // LL_LLINVENTORY_H
diff --git a/indra/llinventory/llinventorydefines.h b/indra/llinventory/llinventorydefines.h
index 8e7bd87ac4..9088d172d9 100644
--- a/indra/llinventory/llinventorydefines.h
+++ b/indra/llinventory/llinventorydefines.h
@@ -24,8 +24,7 @@
* $/LicenseInfo$
*/
-#ifndef LL_LLINVENTORYDEFINES_H
-#define LL_LLINVENTORYDEFINES_H
+#pragma once
// Consts for "key" field in the task inventory update message
extern const U8 TASK_INVENTORY_ITEM_KEY;
@@ -97,5 +96,3 @@ public:
// on a pre-existing inventory item (DEV-28098 and DEV-30997)
};
};
-
-#endif // LL_LLINVENTORYDEFINES_H
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index c90f8aa107..0627b8df3c 100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
@@ -150,6 +150,13 @@ private:
~LLInventoryType( void );
};
+// Subtypes for scripts, (inventory type IT_LSL).
+enum ScriptSubtype_t
+{
+ SST_LSL = 0,
+ SST_LUA = 1
+};
+
// helper function that returns true if inventory type and asset type
// are potentially compatible. For example, an attachment must be an
// object, but a wearable can be a bodypart or clothing asset.