diff --git a/src/editor/HierarchyPanel.jsx b/src/editor/HierarchyPanel.jsx index 357c573..a7c23d1 100644 --- a/src/editor/HierarchyPanel.jsx +++ b/src/editor/HierarchyPanel.jsx @@ -132,7 +132,11 @@ const GroupRow = ({ icon, label, open, onToggle, plusItems }) => { /** Строка скрипта внутри иерархии. */ const ScriptRow = ({ script, depth, selected, onSelect, onDelete, onRename, onContextMenu, onStartRename }) => { const displayName = script.name || (script.id === 'demo' ? 'Демо-скрипт' : script.id); - const isLua = script.language === 'lua'; + // Lua — либо явно language='lua', либо импортированный .rbxl-скрипт + // (хранится с language='js' в БД но фактически Lua-код внутри обёртки). + const isRbxlImported = typeof script.code === 'string' + && script.code.startsWith('// @roblox-lua'); + const isLua = script.language === 'lua' || isRbxlImported; const badge = (