summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryicon.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-01 18:35:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 21:58:53 +0800
commit00bb3bb6f07660bd914d29a1389342bb3060d254 (patch)
tree431f574922494d2201718f13085f17bc6bd7fb42 /indra/newview/llinventoryicon.cpp
parenta8636720129952c10cf49ab80da21bf8b340b96c (diff)
parent4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff)
Merge remote-tracking branch 'secondlife/release/26.4' into 26.4
Diffstat (limited to 'indra/newview/llinventoryicon.cpp')
-rw-r--r--indra/newview/llinventoryicon.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llinventoryicon.cpp b/indra/newview/llinventoryicon.cpp
index 94b8c4bebf..64e142212d 100644
--- a/indra/newview/llinventoryicon.cpp
+++ b/indra/newview/llinventoryicon.cpp
@@ -101,6 +101,8 @@ LLIconDictionary::LLIconDictionary()
addEntry(LLInventoryType::ICONNAME_MATERIAL, new IconEntry("Inv_Material"));
+ addEntry(LLInventoryType::ICONNAME_SCRIPT_LUAU, new IconEntry("Inv_Script_Luau"));
+
addEntry(LLInventoryType::ICONNAME_INVALID, new IconEntry("Inv_Invalid"));
addEntry(LLInventoryType::ICONNAME_UNKNOWN, new IconEntry("Inv_Unknown"));
@@ -150,7 +152,7 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
case LLAssetType::AT_SCRIPT:
case LLAssetType::AT_LSL_TEXT:
case LLAssetType::AT_LSL_BYTECODE:
- idx = LLInventoryType::ICONNAME_SCRIPT;
+ idx = assignScriptIcon(misc_flag);
break;
case LLAssetType::AT_CLOTHING:
case LLAssetType::AT_BODYPART:
@@ -209,3 +211,13 @@ LLInventoryType::EIconName LLInventoryIcon::assignSettingsIcon(U32 misc_flag)
LLSettingsType::type_e settings_type = LLSettingsType::fromInventoryFlags(misc_flag);
return LLSettingsType::getIconName(settings_type);
}
+
+LLInventoryType::EIconName LLInventoryIcon::assignScriptIcon(U32 misc_flag)
+{
+ U8 subtype = misc_flag & LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK;
+ if (subtype == SST_LUA)
+ {
+ return LLInventoryType::ICONNAME_SCRIPT_LUAU;
+ }
+ return LLInventoryType::ICONNAME_SCRIPT;
+}