diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-03-04 15:08:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-04 15:08:11 -0800 |
| commit | ccc10aeda7a3db0fd53cb249b24d22049bae1b94 (patch) | |
| tree | 0e8c853be11efac8a3ab9f7155ba32238b3635fd /indra/llinventory | |
| parent | 2d77fdc672f52f36e511af52ae5b1f678799171d (diff) | |
| parent | 0c289bf27dcc40b9f41152b60408fa047ccf6f65 (diff) | |
Merge pull request #5383 from secondlife/rider/default_script
Rider/default script
Diffstat (limited to 'indra/llinventory')
| -rw-r--r-- | indra/llinventory/llinventory.h | 8 | ||||
| -rw-r--r-- | indra/llinventory/llinventorydefines.h | 5 | ||||
| -rw-r--r-- | indra/llinventory/llinventorytype.h | 7 |
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. |
