summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryicon.cpp
diff options
context:
space:
mode:
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;
+}