diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc2d0c20..4c543700 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,11 +21,10 @@ jobs: - name: Fetch Submodules Recursively run: git submodule update --init --recursive - - name: .NET 7 Setup + - name: .NET 6 Setup uses: actions/setup-dotnet@v2 with: - dotnet-version: '7.0.x' - include-prerelease: true + dotnet-version: '6.0.x' - name: .NET Restore run: dotnet restore FModel diff --git a/CUE4Parse b/CUE4Parse index 06d2998e..d2d8fe2e 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 06d2998e55fb67611fac7feab65838ae18ae43b1 +Subproject commit d2d8fe2e3e9575fea5f18ce8e317ff62acaa66c7 diff --git a/FModel/Extensions/AvalonExtensions.cs b/FModel/Extensions/AvalonExtensions.cs index 412eb7b8..8acccd5c 100644 --- a/FModel/Extensions/AvalonExtensions.cs +++ b/FModel/Extensions/AvalonExtensions.cs @@ -13,6 +13,7 @@ public static class AvalonExtensions private static readonly IHighlightingDefinition _xmlHighlighter = LoadHighlighter("Xml.xshd"); private static readonly IHighlightingDefinition _cppHighlighter = LoadHighlighter("Cpp.xshd"); private static readonly IHighlightingDefinition _changelogHighlighter = LoadHighlighter("Changelog.xshd"); + private static readonly IHighlightingDefinition _ulangHighlighter = LoadHighlighter("ULang.xshd"); [MethodImpl(MethodImplOptions.AggressiveInlining)] private static IHighlightingDefinition LoadHighlighter(string resourceName) @@ -38,6 +39,8 @@ public static class AvalonExtensions return _cppHighlighter; case "changelog": return _changelogHighlighter; + case "ulang": + return _ulangHighlighter; case "bat": case "txt": case "po": @@ -46,4 +49,4 @@ public static class AvalonExtensions return _jsonHighlighter; } } -} \ No newline at end of file +} diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index 0ed78b14..927b871a 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -2,12 +2,12 @@ WinExe - net7.0-windows + net6.0-windows true FModel.ico 4.2.2 - 4.2.2.1 - 4.2.2.1 + 4.2.2.2 + 4.2.2.2 false true win-x64 @@ -69,6 +69,7 @@ + @@ -97,6 +98,7 @@ + diff --git a/FModel/Resources/ULang.xshd b/FModel/Resources/ULang.xshd new file mode 100644 index 00000000..9a6ae384 --- /dev/null +++ b/FModel/Resources/ULang.xshd @@ -0,0 +1,19 @@ + + + + + + + + + + + \b(?:module|class|attribute) + \w+(?=(?:<\w+>)+\() + <\w+> + <@\w+> + (?!\()\w+(?=:)|\w+$|\w+(?=(?:<\w+>)+\s:=) + [()*+,\-.\/:;<=>?[\]^`{|}~] + + diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index 6db712fc..a34b884d 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -16,6 +16,7 @@ using CUE4Parse.UE4.Assets.Exports; using CUE4Parse.UE4.Assets.Exports.Animation; using CUE4Parse.UE4.Assets.Exports.Material; using CUE4Parse.UE4.Assets.Exports.SkeletalMesh; +using CUE4Parse.UE4.Assets.Exports.Solaris; using CUE4Parse.UE4.Assets.Exports.Sound; using CUE4Parse.UE4.Assets.Exports.StaticMesh; using CUE4Parse.UE4.Assets.Exports.Texture; @@ -721,6 +722,15 @@ public class CUE4ParseViewModel : ViewModel { switch (export) { + case USolarisDigest solarisDigest: + { + if (!TabControl.CanAddTabs) return false; + + TabControl.AddTab($"{solarisDigest.ProjectName}.ulang"); + TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("ulang"); + TabControl.SelectedTab.SetDocumentText(solarisDigest.ReadableCode, false); + return true; + } case UTexture2D texture: { TabControl.SelectedTab.AddImage(texture); @@ -856,4 +866,4 @@ public class CUE4ParseViewModel : ViewModel FLogger.AppendText($"Could not export '{fileName}'", Constants.WHITE, true); } } -} \ No newline at end of file +}