diff --git a/FModel/App.xaml.cs b/FModel/App.xaml.cs index fee74aca..7e7f5122 100644 --- a/FModel/App.xaml.cs +++ b/FModel/App.xaml.cs @@ -1,6 +1,6 @@ -using FModel.Discord; -using FModel.Logger; +using FModel.Logger; using FModel.Utils; +using FModel.ViewModels.ComboBox; using FModel.ViewModels.StatusBar; using FModel.Windows.DarkMessageBox; using System; @@ -28,8 +28,7 @@ namespace FModel DebugHelper.Init(LogsFilePath); // get old settings too - if (FModel.Properties.Settings.Default.UseEnglish) // use old settings here - Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US"); + Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(ProgramLang.GetProgramLang()); DebugHelper.WriteLine("{0} {1}", "[FModel]", "––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––"); DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Version]", Assembly.GetExecutingAssembly().GetName().Version.ToString()); diff --git a/FModel/Creator/Bundles/HeaderStyle.cs b/FModel/Creator/Bundles/HeaderStyle.cs index bd0534b3..4797ae63 100644 --- a/FModel/Creator/Bundles/HeaderStyle.cs +++ b/FModel/Creator/Bundles/HeaderStyle.cs @@ -1,4 +1,5 @@ -using FModel.Creator.Texts; +using FModel.Creator.Fortnite; +using FModel.Creator.Texts; using SkiaSharp; using System; diff --git a/FModel/Creator/Bundles/QuestStyle.cs b/FModel/Creator/Bundles/QuestStyle.cs index 70d3af47..855124bf 100644 --- a/FModel/Creator/Bundles/QuestStyle.cs +++ b/FModel/Creator/Bundles/QuestStyle.cs @@ -1,4 +1,5 @@ -using FModel.Creator.Texts; +using FModel.Creator.Fortnite; +using FModel.Creator.Texts; using SkiaSharp; namespace FModel.Creator.Bundles diff --git a/FModel/Creator/Bundles/Reward.cs b/FModel/Creator/Bundles/Reward.cs index fd38be35..8c7a0e51 100644 --- a/FModel/Creator/Bundles/Reward.cs +++ b/FModel/Creator/Bundles/Reward.cs @@ -1,4 +1,5 @@ -using PakReader.Pak; +using FModel.Creator.Fortnite; +using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; using SkiaSharp; diff --git a/FModel/Creator/BaseBundle.cs b/FModel/Creator/Fortnite/BaseBundle.cs similarity index 99% rename from FModel/Creator/BaseBundle.cs rename to FModel/Creator/Fortnite/BaseBundle.cs index 648f278e..528f2d5a 100644 --- a/FModel/Creator/BaseBundle.cs +++ b/FModel/Creator/Fortnite/BaseBundle.cs @@ -5,7 +5,7 @@ using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; using System.Collections.Generic; -namespace FModel.Creator +namespace FModel.Creator.Fortnite { public class BaseBundle { diff --git a/FModel/Creator/BaseIcon.cs b/FModel/Creator/Fortnite/BaseIcon.cs similarity index 99% rename from FModel/Creator/BaseIcon.cs rename to FModel/Creator/Fortnite/BaseIcon.cs index bb36ac9b..d27df482 100644 --- a/FModel/Creator/BaseIcon.cs +++ b/FModel/Creator/Fortnite/BaseIcon.cs @@ -10,7 +10,7 @@ using System; using System.Collections.Generic; using System.Windows; -namespace FModel.Creator +namespace FModel.Creator.Fortnite { public class BaseIcon { diff --git a/FModel/Creator/BaseOffer.cs b/FModel/Creator/Fortnite/BaseOffer.cs similarity index 99% rename from FModel/Creator/BaseOffer.cs rename to FModel/Creator/Fortnite/BaseOffer.cs index f9715cce..ef22aa06 100644 --- a/FModel/Creator/BaseOffer.cs +++ b/FModel/Creator/Fortnite/BaseOffer.cs @@ -5,7 +5,7 @@ using SkiaSharp; using System; using System.Windows; -namespace FModel.Creator +namespace FModel.Creator.Fortnite { public class BaseOffer { diff --git a/FModel/Creator/BaseUserOption.cs b/FModel/Creator/Fortnite/BaseUserOption.cs similarity index 99% rename from FModel/Creator/BaseUserOption.cs rename to FModel/Creator/Fortnite/BaseUserOption.cs index d5794c9b..e2bab489 100644 --- a/FModel/Creator/BaseUserOption.cs +++ b/FModel/Creator/Fortnite/BaseUserOption.cs @@ -5,7 +5,7 @@ using PakReader.Parsers.PropertyTagData; using SkiaSharp; using System.Collections.Generic; -namespace FModel.Creator +namespace FModel.Creator.Fortnite { public class Options { diff --git a/FModel/Creator/FortniteCreator.cs b/FModel/Creator/FortniteCreator.cs index fb222904..73e9aa0b 100644 --- a/FModel/Creator/FortniteCreator.cs +++ b/FModel/Creator/FortniteCreator.cs @@ -1,4 +1,5 @@ using FModel.Creator.Bundles; +using FModel.Creator.Fortnite; using FModel.Creator.Icons; using FModel.Creator.Rarities; using FModel.Creator.Stats; diff --git a/FModel/Creator/Icons/DisplayAssetImage.cs b/FModel/Creator/Icons/DisplayAssetImage.cs index 72fa72ac..b91c0b88 100644 --- a/FModel/Creator/Icons/DisplayAssetImage.cs +++ b/FModel/Creator/Icons/DisplayAssetImage.cs @@ -1,4 +1,5 @@ -using PakReader.Pak; +using FModel.Creator.Fortnite; +using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; diff --git a/FModel/Creator/Icons/LargeSmallImage.cs b/FModel/Creator/Icons/LargeSmallImage.cs index dcac5c7a..cfb58f82 100644 --- a/FModel/Creator/Icons/LargeSmallImage.cs +++ b/FModel/Creator/Icons/LargeSmallImage.cs @@ -1,3 +1,4 @@ +using FModel.Creator.Fortnite; using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; diff --git a/FModel/Creator/Icons/UserFacingFlag.cs b/FModel/Creator/Icons/UserFacingFlag.cs index a8ac086c..622ea2d3 100644 --- a/FModel/Creator/Icons/UserFacingFlag.cs +++ b/FModel/Creator/Icons/UserFacingFlag.cs @@ -1,4 +1,5 @@ -using PakReader.Pak; +using FModel.Creator.Fortnite; +using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.Objects; using PakReader.Parsers.PropertyTagData; diff --git a/FModel/Creator/Labels/ExplicitAsset.cs b/FModel/Creator/Labels/ExplicitAsset.cs new file mode 100644 index 00000000..8ddec0a7 --- /dev/null +++ b/FModel/Creator/Labels/ExplicitAsset.cs @@ -0,0 +1,36 @@ +using FModel.Creator.Valorant; +using PakReader.Pak; +using PakReader.Parsers.Class; +using PakReader.Parsers.PropertyTagData; + +namespace FModel.Creator.Labels +{ + static class ExplicitAsset + { + public static void GetAsset(BaseLabel icon, SoftObjectProperty s) + { + PakPackage p = Utils.GetPropertyPakPackage(s.Value.AssetPathName.String); + if (p.HasExport() && !p.Equals(default)) + { + var obj = p.GetIndexedExport(0); + if (obj != null) + { + if (obj.TryGetValue("UIData", out var t) && t is SoftObjectProperty sop) + { + p = Utils.GetPropertyPakPackage(sop.Value.AssetPathName.String); + if (p.HasExport() && !p.Equals(default)) + { + obj = p.GetIndexedExport(0); + if (obj != null) + { + var uiData = new BaseUIData(obj); + icon.IconImages.Add(uiData); + icon.Height += uiData.IconImage.Height; + } + } + } + } + } + } + } +} diff --git a/FModel/Creator/Rarities/Rarity.cs b/FModel/Creator/Rarities/Rarity.cs index 069a9897..99e7f998 100644 --- a/FModel/Creator/Rarities/Rarity.cs +++ b/FModel/Creator/Rarities/Rarity.cs @@ -1,4 +1,5 @@ -using PakReader.Pak; +using FModel.Creator.Fortnite; +using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.Objects; using PakReader.Parsers.PropertyTagData; diff --git a/FModel/Creator/Rarities/Serie.cs b/FModel/Creator/Rarities/Serie.cs index fd037e89..c2c97785 100644 --- a/FModel/Creator/Rarities/Serie.cs +++ b/FModel/Creator/Rarities/Serie.cs @@ -1,4 +1,4 @@ -using FModel.Creator.Texts; +using FModel.Creator.Fortnite; using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.Objects; diff --git a/FModel/Creator/Stats/Statistics.cs b/FModel/Creator/Stats/Statistics.cs index 3b687c35..2eba08c1 100644 --- a/FModel/Creator/Stats/Statistics.cs +++ b/FModel/Creator/Stats/Statistics.cs @@ -1,4 +1,5 @@ -using FModel.Creator.Texts; +using FModel.Creator.Fortnite; +using FModel.Creator.Texts; using FModel.Utils; using PakReader.Pak; using PakReader.Parsers.Class; diff --git a/FModel/Creator/Texts/GameplayTag.cs b/FModel/Creator/Texts/GameplayTag.cs index 24dbd4ed..caf222c5 100644 --- a/FModel/Creator/Texts/GameplayTag.cs +++ b/FModel/Creator/Texts/GameplayTag.cs @@ -1,4 +1,5 @@ -using FModel.Creator.Icons; +using FModel.Creator.Fortnite; +using FModel.Creator.Icons; using FModel.Utils; using PakReader.Pak; using PakReader.Parsers.Class; diff --git a/FModel/Creator/Texts/Helper.cs b/FModel/Creator/Texts/Helper.cs index 933dc50a..b3bd735b 100644 --- a/FModel/Creator/Texts/Helper.cs +++ b/FModel/Creator/Texts/Helper.cs @@ -1,4 +1,5 @@ -using SkiaSharp; +using FModel.Creator.Fortnite; +using SkiaSharp; using System; using System.Collections.Generic; using System.Text; diff --git a/FModel/Creator/Texts/Text.cs b/FModel/Creator/Texts/Text.cs index 64a92840..8b2db516 100644 --- a/FModel/Creator/Texts/Text.cs +++ b/FModel/Creator/Texts/Text.cs @@ -1,4 +1,5 @@ -using PakReader.Pak; +using FModel.Creator.Fortnite; +using PakReader.Pak; using PakReader.Parsers.Class; using PakReader.Parsers.Objects; using PakReader.Parsers.PropertyTagData; diff --git a/FModel/Creator/Texts/Typefaces.cs b/FModel/Creator/Texts/Typefaces.cs index fcd04a65..61fe4665 100644 --- a/FModel/Creator/Texts/Typefaces.cs +++ b/FModel/Creator/Texts/Typefaces.cs @@ -37,9 +37,10 @@ namespace FModel.Creator.Texts private const string _BURBANK_SMALL_BLACK = "burbanksmall-black"; private const string _BURBANK_SMALL_BOLD = "burbanksmall-bold"; - private const string _VALORANT_BASE_PATH = "/Game/UI/Fonts/FinalFonts/"; - private const string _DINNEXT_W1G_BOLD = "DINNextW1G-Bold"; - private const string _DINNEXT_W1G_REGULAR = "DINNextW1G-Regular"; + private const string _VALORANT_BASE_PATH = "/Game/"; + private const string _TUNGSTEN_BOLD = "Tungsten-Bold"; + private const string _DINNEXT_W1G_LIGHT = "UI/Fonts/FinalFonts/DINNextW1G-Light"; + private const string _DINNEXT_W1G_BOLD = "UI/Fonts/FinalFonts/DINNextW1G-Bold"; #pragma warning restore IDE0051 public SKTypeface DefaultTypeface; // used as default font for all untranslated strings (item source, ...) @@ -105,11 +106,15 @@ namespace FModel.Creator.Texts } else if (Globals.Game.ActualGame == EGame.Valorant) { - ArraySegment[] t = Utils.GetPropertyArraySegmentByte(_VALORANT_BASE_PATH + _DINNEXT_W1G_BOLD); + ArraySegment[] t = Utils.GetPropertyArraySegmentByte(_VALORANT_BASE_PATH + _TUNGSTEN_BOLD); if (t != null && t.Length == 3) DisplayNameTypeface = SKTypeface.FromStream(t[2].AsStream()); - t = Utils.GetPropertyArraySegmentByte(_VALORANT_BASE_PATH + _DINNEXT_W1G_REGULAR); + t = Utils.GetPropertyArraySegmentByte(_VALORANT_BASE_PATH + _DINNEXT_W1G_BOLD); + if (t != null && t.Length == 3) + BundleDefaultTypeface = SKTypeface.FromStream(t[2].AsStream()); + + t = Utils.GetPropertyArraySegmentByte(_VALORANT_BASE_PATH + _DINNEXT_W1G_LIGHT); if (t != null && t.Length == 3) DescriptionTypeface = SKTypeface.FromStream(t[2].AsStream()); } diff --git a/FModel/Creator/Valorant/BaseLabel.cs b/FModel/Creator/Valorant/BaseLabel.cs new file mode 100644 index 00000000..46efd623 --- /dev/null +++ b/FModel/Creator/Valorant/BaseLabel.cs @@ -0,0 +1,48 @@ +using FModel.Creator.Labels; +using PakReader.Parsers.Class; +using PakReader.Parsers.PropertyTagData; +using SkiaSharp; +using System.Collections.Generic; + +namespace FModel.Creator.Valorant +{ + public class BaseLabel + { + public List IconImages; + public int Width = 512; // keep it 512 (or a multiple of 512) if you don't want blurry icons + public int Height = 512; + public int Margin = 4; + + public BaseLabel() + { + IconImages = new List(); + } + + public BaseLabel(IUExport export) : this() + { + if (export.GetExport("ExplicitAssets") is ArrayProperty explicitAssetsArray) + { + foreach (var o in explicitAssetsArray.Value) + { + if (o is SoftObjectProperty s) + ExplicitAsset.GetAsset(this, s); + } + } + } + + public void Draw(SKCanvas c) + { + int yPos = Margin; + foreach (BaseUIData icon in IconImages) + { + if (icon.IconImage != null) + { + c.DrawBitmap(icon.IconImage, new SKRect(0, yPos, icon.Width, yPos + icon.Height), + new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true }); + + yPos += icon.Height; + } + } + } + } +} diff --git a/FModel/Creator/Valorant/BaseMapUIData.cs b/FModel/Creator/Valorant/BaseMapUIData.cs new file mode 100644 index 00000000..59c9183e --- /dev/null +++ b/FModel/Creator/Valorant/BaseMapUIData.cs @@ -0,0 +1,96 @@ +using FModel.Creator.Texts; +using PakReader.Parsers.Class; +using PakReader.Parsers.PropertyTagData; +using SkiaSharp; + +namespace FModel.Creator.Valorant +{ + public class BaseMapUIData + { + public SKBitmap Splash; + public SKBitmap VLogo; + public string DisplayName; + public string Description; + public string Coordinates; + public int Width = 1920; + public int Height = 1080; + + public BaseMapUIData() + { + Splash = null; + VLogo = null; + DisplayName = ""; + Description = ""; + Coordinates = ""; + } + + public BaseMapUIData(IUExport export) : this() + { + if (export.GetExport("DisplayName") is TextProperty displayName) + DisplayName = Text.GetTextPropertyBase(displayName) ?? ""; + if (export.GetExport("Description") is TextProperty description) + Description = Text.GetTextPropertyBase(description) ?? ""; + if (export.GetExport("Coordinates") is TextProperty coordinates) + Coordinates = Text.GetTextPropertyBase(coordinates) ?? ""; + + if (export.GetExport("Splash") is ObjectProperty icon) + Splash = Utils.GetObjectTexture(icon); + + VLogo = Utils.GetTexture("/Game/UI/Shared/Icons/Valorant_logo_cutout").Resize(48, 48); + + if (Splash != null) + { + Width = Splash.Width; + Height = Splash.Height; + } + } + + public void Draw(SKCanvas c) + { + int paddingLR = 80; + int paddingTB = 35; + int nameSize = 200; + int descriptionSize = 30; + using var namePaint = new SKPaint + { + IsAntialias = true, + FilterQuality = SKFilterQuality.High, + Typeface = Text.TypeFaces.DisplayNameTypeface, + TextSize = nameSize, + TextAlign = SKTextAlign.Left, + Color = SKColor.Parse("FFFBFA") + }; + while (namePaint.MeasureText(DisplayName) > Width - (paddingLR * 2)) + { + namePaint.TextSize = nameSize -= 2; + } + using var descriptionPaint = new SKPaint + { + IsAntialias = true, + FilterQuality = SKFilterQuality.High, + Typeface = Text.TypeFaces.DescriptionTypeface, + TextSize = descriptionSize, + TextAlign = SKTextAlign.Left, + Color = SKColor.Parse("FFFBFA") + }; + while (descriptionPaint.MeasureText(Description) > Width - (paddingLR * 2)) + { + descriptionPaint.TextSize = descriptionSize -= 2; + } + + c.DrawBitmap(Splash, new SKRect(0, 0, Width, Height), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true }); + c.DrawText(DisplayName.ToUpper(), paddingLR, paddingTB + namePaint.TextSize, namePaint); + c.DrawRect(new SKRect(paddingLR + 2.5f, paddingTB + 25 + namePaint.TextSize, paddingLR + 202.5f, paddingTB + 27.5f + namePaint.TextSize), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true, Color = SKColor.Parse("5AFFFBFA") }); + c.DrawText(Description, paddingLR + 2.5f, paddingTB + 40 + namePaint.TextSize + descriptionPaint.TextSize, descriptionPaint); + + descriptionPaint.Typeface = Text.TypeFaces.BundleDefaultTypeface; + c.DrawText(Coordinates.ToUpper(), paddingLR, Height - paddingTB - descriptionPaint.TextSize, descriptionPaint); + + if (VLogo != null) + { + c.DrawBitmap(VLogo, new SKRect(Width - VLogo.Width - paddingLR, paddingLR, Width - paddingLR, paddingLR + VLogo.Height), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true }); + c.DrawRect(new SKRect(Width - VLogo.Width - paddingLR, paddingLR + VLogo.Height + 5, Width - paddingLR, paddingLR + VLogo.Height + 7.5f), new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true, Color = SKColor.Parse("FFFBFA") }); + } + } + } +} diff --git a/FModel/Creator/BaseUIData.cs b/FModel/Creator/Valorant/BaseUIData.cs similarity index 85% rename from FModel/Creator/BaseUIData.cs rename to FModel/Creator/Valorant/BaseUIData.cs index 8c8459d1..39e40fec 100644 --- a/FModel/Creator/BaseUIData.cs +++ b/FModel/Creator/Valorant/BaseUIData.cs @@ -3,7 +3,7 @@ using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; using SkiaSharp; -namespace FModel.Creator +namespace FModel.Creator.Valorant { public class BaseUIData { @@ -37,6 +37,7 @@ namespace FModel.Creator if (export.GetExport("Description") is TextProperty description) { Description = Text.GetTextPropertyBase(description); + if (Description != null && Description.Equals(DisplayName)) Description = string.Empty; if (!string.IsNullOrEmpty(Description)) { Height += (int)descriptionPaint.TextSize * Helper.SplitLines(Description, descriptionPaint, Width - Margin).Length; @@ -44,7 +45,7 @@ namespace FModel.Creator } } - if (export.GetExport("FullRender", "VerticalPromoImage", "LargeIcon", "DisplayIcon") is ObjectProperty icon) + if (export.GetExport("ListViewIcon", "FullRender", "VerticalPromoImage", "LargeIcon", "DisplayIcon") is ObjectProperty icon) { SKBitmap raw = Utils.GetObjectTexture(icon); if (raw != null) @@ -83,8 +84,9 @@ namespace FModel.Creator Helper.DrawMultilineText(c, Description, Width, Margin, ETextSide.Left, new SKRect(Margin, textSize + 25, Width - Margin, Height - 25), descriptionPaint, out var yPos); - c.DrawBitmap(IconImage, new SKRect(0, yPos, Width, Height), - new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true }); + if (IconImage != null) + c.DrawBitmap(IconImage, new SKRect(0, yPos, Width, Height), + new SKPaint { FilterQuality = SKFilterQuality.High, IsAntialias = true }); } } } diff --git a/FModel/Creator/ValorantCreator.cs b/FModel/Creator/ValorantCreator.cs index d6bbf4c4..0a817948 100644 --- a/FModel/Creator/ValorantCreator.cs +++ b/FModel/Creator/ValorantCreator.cs @@ -1,5 +1,6 @@ using FModel.Creator.Icons; using FModel.Creator.Texts; +using FModel.Creator.Valorant; using FModel.ViewModels.ImageBox; using PakReader.Parsers.Class; using SkiaSharp; @@ -9,27 +10,65 @@ namespace FModel.Creator { static class ValorantCreator { - public static bool TryDrawValorantIcon(string assetPath, IUExport export) + public static bool TryDrawValorantIcon(string assetPath, string exportType, IUExport export) { var d = new DirectoryInfo(assetPath); string assetName = d.Name; if (Text.TypeFaces.NeedReload(false)) - Text.TypeFaces = new Typefaces(); // when opening bundle creator settings without loading paks first + Text.TypeFaces = new Typefaces(); - BaseUIData icon = new BaseUIData(export); - if (icon.IconImage != null) + switch (exportType) { - using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul)) - using (var c = new SKCanvas(ret)) - { - icon.Draw(c); + case "MapUIData": + { + BaseMapUIData icon = new BaseMapUIData(export); + using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul)) + using (var c = new SKCanvas(ret)) + { + icon.Draw(c); + ImageBoxVm.imageBoxViewModel.Set(ret, assetName); + } + return true; + } + case "ArmorUIData": + case "SprayUIData": + case "ThemeUIData": + case "SeasonUIData": + case "MissionUIData": + case "ContractUIData": + case "CurrencyUIData": + case "GameModeUIData": + case "ObjectiveUIData": + case "CharacterUIData": + case "SprayLevelUIData": + case "EquippableUIData": + case "PlayerCardUIData": + case "ContentTierUIData": + case "PlayerTitleUIData": + case "Gun_UIData_Base_C": + case "CharacterRoleUIData": + case "StorefrontItemUIData": + case "SprayEquipSlotUIData": + case "EquippableSkinUIData": + case "ContractChapterUIData": + case "EquippableCharmUIData": + case "EquippableSkinLevelUIData": + case "EquippableSkinChromaUIData": + case "EquippableAttachmentUIData": + case "EquippableCharmLevelUIData": + { + BaseUIData icon = new BaseUIData(export); + using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul)) + using (var c = new SKCanvas(ret)) + { + icon.Draw(c); - Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512 - ImageBoxVm.imageBoxViewModel.Set(ret, assetName); - } - return true; + Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512 + ImageBoxVm.imageBoxViewModel.Set(ret, assetName); + } + return true; + } } - return false; } } diff --git a/FModel/PakReader/Pak/PakPackage.cs b/FModel/PakReader/Pak/PakPackage.cs index 10c41953..a4bdf625 100644 --- a/FModel/PakReader/Pak/PakPackage.cs +++ b/FModel/PakReader/Pak/PakPackage.cs @@ -1,11 +1,9 @@ -using System; -using System.Collections.Generic; +using System; using System.IO; using Newtonsoft.Json; using PakReader.Parsers; using PakReader.Parsers.Class; using PakReader.Parsers.Objects; -using PakReader.Parsers.PropertyTagData; namespace PakReader.Pak { @@ -29,7 +27,7 @@ namespace PakReader.Pak ExportType = ExportTypes[i].String, ExportValue = (FModel.EJsonType)FModel.Properties.Settings.Default.AssetsJsonType switch { - FModel.EJsonType.Default => GetJsonDict(Exports[i]), + FModel.EJsonType.Default => Exports[i].GetJsonDict(), _ => Exports[i] } }; @@ -91,49 +89,6 @@ namespace PakReader.Pak exports = new ExportList(); } - private Dictionary GetJsonDict(IUExport export) - { - if (export != null) - { - var ret = new Dictionary(export.Count); - foreach (KeyValuePair KvP in export) - { - if (KvP.Value == null) - ret[KvP.Key] = null; - else - ret[KvP.Key] = KvP.Value.GetType().Name switch - { - "ByteProperty" => ((ByteProperty)KvP.Value).GetValue(), - "BoolProperty" => ((BoolProperty)KvP.Value).GetValue(), - "IntProperty" => ((IntProperty)KvP.Value).GetValue(), - "FloatProperty" => ((FloatProperty)KvP.Value).GetValue(), - "ObjectProperty" => ((ObjectProperty)KvP.Value).GetValue(), - "NameProperty" => ((NameProperty)KvP.Value).GetValue(), - "DoubleProperty" => ((DoubleProperty)KvP.Value).GetValue(), - "ArrayProperty" => ((ArrayProperty)KvP.Value).GetValue(), - "StructProperty" => ((StructProperty)KvP.Value).GetValue(), - "StrProperty" => ((StrProperty)KvP.Value).GetValue(), - "TextProperty" => ((TextProperty)KvP.Value).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)KvP.Value).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)KvP.Value).GetValue(), - "UInt64Property" => ((UInt64Property)KvP.Value).GetValue(), - "UInt32Property" => ((UInt32Property)KvP.Value).GetValue(), - "UInt16Property" => ((UInt16Property)KvP.Value).GetValue(), - "Int64Property" => ((Int64Property)KvP.Value).GetValue(), - "Int16Property" => ((Int16Property)KvP.Value).GetValue(), - "Int8Property" => ((Int8Property)KvP.Value).GetValue(), - "MapProperty" => ((MapProperty)KvP.Value).GetValue(), - "SetProperty" => ((SetProperty)KvP.Value).GetValue(), - "EnumProperty" => ((EnumProperty)KvP.Value).GetValue(), - "UObject" => ((UObject)KvP.Value).GetValue(), - _ => KvP.Value, - }; - } - return ret; - } - return null; - } - public T GetExport() where T : IUExport { var exports = Exports; diff --git a/FModel/PakReader/Parsers/Class/IUExport.cs b/FModel/PakReader/Parsers/Class/IUExport.cs index 02d24bf8..e8d65e62 100644 --- a/FModel/PakReader/Parsers/Class/IUExport.cs +++ b/FModel/PakReader/Parsers/Class/IUExport.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using PakReader.Parsers.PropertyTagData; +using System.Collections.Generic; namespace PakReader.Parsers.Class { @@ -22,5 +23,46 @@ namespace PakReader.Parsers.Class } return default; } + + public static Dictionary GetJsonDict(this IUExport export) + { + if (export != null) + { + var ret = new Dictionary(export.Count); + foreach (var (key, value) in export) + { + ret[key] = value switch + { + ByteProperty byteProperty => byteProperty.GetValue(), + BoolProperty boolProperty => boolProperty.GetValue(), + IntProperty intProperty => intProperty.GetValue(), + FloatProperty floatProperty => floatProperty.GetValue(), + ObjectProperty objectProperty => objectProperty.GetValue(), + NameProperty nameProperty => nameProperty.GetValue(), + DelegateProperty delegateProperty => delegateProperty.GetValue(), + DoubleProperty doubleProperty => doubleProperty.GetValue(), + ArrayProperty arrayProperty => arrayProperty.GetValue(), + StructProperty structProperty => structProperty.GetValue(), + StrProperty strProperty => strProperty.GetValue(), + TextProperty textProperty => textProperty.GetValue(), + InterfaceProperty interfaceProperty => interfaceProperty.GetValue(), + SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(), + UInt64Property uInt64Property => uInt64Property.GetValue(), + UInt32Property uInt32Property => uInt32Property.GetValue(), + UInt16Property uInt16Property => uInt16Property.GetValue(), + Int64Property int64Property => int64Property.GetValue(), + Int16Property int16Property => int16Property.GetValue(), + Int8Property int8Property => int8Property.GetValue(), + MapProperty mapProperty => mapProperty.GetValue(), + SetProperty setProperty => setProperty.GetValue(), + EnumProperty enumProperty => enumProperty.GetValue(), + UObject uObject => uObject.GetJsonDict(), + _ => value, + }; + } + return ret; + } + return null; + } } } diff --git a/FModel/PakReader/Parsers/Class/UCurveTable.cs b/FModel/PakReader/Parsers/Class/UCurveTable.cs index f4cc78c4..a0b9c7ed 100644 --- a/FModel/PakReader/Parsers/Class/UCurveTable.cs +++ b/FModel/PakReader/Parsers/Class/UCurveTable.cs @@ -19,8 +19,15 @@ namespace PakReader.Parsers.Class RowMap = new Dictionary(); for (int i = 0; i < NumRows; i++) { - var RowName = reader.ReadFName(); - RowMap[RowName.String] = new UObject(reader, true); + int num = 1; + string RowName = reader.ReadFName().String; + string baseName = RowName; + while (RowMap.ContainsKey(RowName)) + { + RowName = $"{baseName}_NK{num++:00}"; + } + + RowMap[RowName] = new UObject(reader, true); } } diff --git a/FModel/PakReader/Parsers/Class/UDataTable.cs b/FModel/PakReader/Parsers/Class/UDataTable.cs index ddfc9e44..7bfc0f4d 100644 --- a/FModel/PakReader/Parsers/Class/UDataTable.cs +++ b/FModel/PakReader/Parsers/Class/UDataTable.cs @@ -17,8 +17,15 @@ namespace PakReader.Parsers.Class RowMap = new Dictionary(); for (int i = 0; i < NumRows; i++) { - var RowName = reader.ReadFName(); - RowMap[RowName.String] = new UObject(reader, true); + int num = 1; + string RowName = reader.ReadFName().String; + string baseName = RowName; + while (RowMap.ContainsKey(RowName)) + { + RowName = $"{baseName}_NK{num++:00}"; + } + + RowMap[RowName] = new UObject(reader, true); } } diff --git a/FModel/PakReader/Parsers/Class/UObject.cs b/FModel/PakReader/Parsers/Class/UObject.cs index fea1285a..9998551d 100644 --- a/FModel/PakReader/Parsers/Class/UObject.cs +++ b/FModel/PakReader/Parsers/Class/UObject.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -21,18 +21,18 @@ namespace PakReader.Parsers.Class internal UObject(PackageReader reader, long maxSize, bool structFallback) { var properties = new Dictionary(); - int i = 1; + int num = 1; while (true) { var Tag = new FPropertyTag(reader); - if (Tag.Name.IsNone) + if (Tag.Name.IsNone || Tag.Name.String == null) break; var pos = reader.Position; var obj = BaseProperty.ReadAsObject(reader, Tag, Tag.Type, ReadType.NORMAL) ?? null; - var key = properties.ContainsKey(Tag.Name.String) ? $"{Tag.Name.String}_NK{i++}" : Tag.Name.String; + var key = properties.ContainsKey(Tag.Name.String) ? $"{Tag.Name.String}_NK{num++:00}" : Tag.Name.String; properties[key] = obj; if (obj == null) break; @@ -52,43 +52,6 @@ namespace PakReader.Parsers.Class } } - public Dictionary GetValue() - { - var ret = new Dictionary(Dict.Count); - foreach (KeyValuePair KvP in Dict) - { - if (KvP.Value == null) - ret[KvP.Key] = null; - else - ret[KvP.Key] = KvP.Value.GetType().Name switch - { - "ByteProperty" => ((ByteProperty)KvP.Value).GetValue(), - "BoolProperty" => ((BoolProperty)KvP.Value).GetValue(), - "IntProperty" => ((IntProperty)KvP.Value).GetValue(), - "FloatProperty" => ((FloatProperty)KvP.Value).GetValue(), - "ObjectProperty" => ((ObjectProperty)KvP.Value).GetValue(), - "NameProperty" => ((NameProperty)KvP.Value).GetValue(), - "DoubleProperty" => ((DoubleProperty)KvP.Value).GetValue(), - "ArrayProperty" => ((ArrayProperty)KvP.Value).GetValue(), - "StructProperty" => ((StructProperty)KvP.Value).GetValue(), - "StrProperty" => ((StrProperty)KvP.Value).GetValue(), - "TextProperty" => ((TextProperty)KvP.Value).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)KvP.Value).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)KvP.Value).GetValue(), - "UInt64Property" => ((UInt64Property)KvP.Value).GetValue(), - "UInt32Property" => ((UInt32Property)KvP.Value).GetValue(), - "UInt16Property" => ((UInt16Property)KvP.Value).GetValue(), - "Int64Property" => ((Int64Property)KvP.Value).GetValue(), - "Int16Property" => ((Int16Property)KvP.Value).GetValue(), - "Int8Property" => ((Int8Property)KvP.Value).GetValue(), - "MapProperty" => ((MapProperty)KvP.Value).GetValue(), - "SetProperty" => ((SetProperty)KvP.Value).GetValue(), - "EnumProperty" => ((EnumProperty)KvP.Value).GetValue(), - _ => KvP.Value, - }; - } - return ret; - } public object this[string key] => Dict[key]; public IEnumerable Keys => Dict.Keys; public IEnumerable Values => Dict.Values; diff --git a/FModel/PakReader/Parsers/Objects/FAssetData.cs b/FModel/PakReader/Parsers/Objects/FAssetData.cs index fb23a961..53401b1b 100644 --- a/FModel/PakReader/Parsers/Objects/FAssetData.cs +++ b/FModel/PakReader/Parsers/Objects/FAssetData.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public readonly struct FAssetData : IUStruct { @@ -32,5 +34,20 @@ ChunkIDs = reader.Loader.ReadTArray(() => reader.Loader.ReadInt32()); PackageFlags = reader.Loader.ReadInt32(); } + + public Dictionary GetValue() + { + return new Dictionary + { + ["ObjectPath"] = ObjectPath.String, + ["PackageName"] = PackageName.String, + ["PackagePath"] = PackagePath.String, + ["AssetName"] = AssetName.String, + ["AssetClass"] = AssetClass.String, + ["TagsAndValues"] = TagsAndValues.Map, + ["ChunkIDs"] = ChunkIDs, + ["PackageFlags"] = PackageFlags + }; + } } } diff --git a/FModel/PakReader/Parsers/Objects/FAssetIdentifier.cs b/FModel/PakReader/Parsers/Objects/FAssetIdentifier.cs index 785633bb..81360d4b 100644 --- a/FModel/PakReader/Parsers/Objects/FAssetIdentifier.cs +++ b/FModel/PakReader/Parsers/Objects/FAssetIdentifier.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public readonly struct FAssetIdentifier : IUStruct { @@ -36,5 +38,16 @@ ValueName = reader.ReadFName(); } } - } + + public Dictionary GetValue() + { + return new Dictionary + { + ["PackageName"] = PackageName.String, + ["PrimaryAssetType"] = PrimaryAssetType.String, + ["ObjectName"] = ObjectName.String, + ["ValueName"] = ValueName.String + }; + } + } } diff --git a/FModel/PakReader/Parsers/Objects/FAssetPackageData.cs b/FModel/PakReader/Parsers/Objects/FAssetPackageData.cs index 913ed1df..4477d9bd 100644 --- a/FModel/PakReader/Parsers/Objects/FAssetPackageData.cs +++ b/FModel/PakReader/Parsers/Objects/FAssetPackageData.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public readonly struct FAssetPackageData : IUStruct { @@ -20,5 +22,16 @@ else CookedHash = default; } + + public Dictionary GetValue() + { + return new Dictionary + { + ["PackageName"] = PackageName.String, + ["DiskSize"] = DiskSize, + ["PackageGuid"] = PackageGuid.Hex, + ["CookedHash"] = CookedHash + }; + } } } diff --git a/FModel/PakReader/Parsers/Objects/FFormatArgumentValue.cs b/FModel/PakReader/Parsers/Objects/FFormatArgumentValue.cs index b88c5348..beb80acd 100644 --- a/FModel/PakReader/Parsers/Objects/FFormatArgumentValue.cs +++ b/FModel/PakReader/Parsers/Objects/FFormatArgumentValue.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace PakReader.Parsers.Objects { @@ -20,5 +21,18 @@ namespace PakReader.Parsers.Objects _ => throw new NotImplementedException(string.Format(FModel.Properties.Resources.ParsingNotSupported, Type)), }; } + + public Dictionary GetValue() + { + return new Dictionary + { + ["Type"] = Type, + ["Value"] = Value switch + { + FText fText => fText.GetValue(), + _ => Value, + } + }; + } } } diff --git a/FModel/PakReader/Parsers/Objects/FGameplayTagContainer.cs b/FModel/PakReader/Parsers/Objects/FGameplayTagContainer.cs index 43ec81d1..16067c12 100644 --- a/FModel/PakReader/Parsers/Objects/FGameplayTagContainer.cs +++ b/FModel/PakReader/Parsers/Objects/FGameplayTagContainer.cs @@ -11,6 +11,16 @@ namespace PakReader.Parsers.Objects { GameplayTags = reader.ReadTArray(() => reader.ReadFName()); } + + public string[] GetValue() + { + var ret = new string[GameplayTags.Length]; + for (int i = 0; i < ret.Length; i++) + { + ret[i] = GameplayTags[i].String; + } + return ret; + } } public static class FGameplayTagContainerExtension diff --git a/FModel/PakReader/Parsers/Objects/FPackageIndex.cs b/FModel/PakReader/Parsers/Objects/FPackageIndex.cs index 369df8e5..8ff277d9 100644 --- a/FModel/PakReader/Parsers/Objects/FPackageIndex.cs +++ b/FModel/PakReader/Parsers/Objects/FPackageIndex.cs @@ -13,7 +13,6 @@ namespace PakReader.Parsers.Objects */ public readonly struct FPackageIndex { - [JsonIgnore] public readonly int Index; public FObjectResource Resource { @@ -42,14 +41,13 @@ namespace PakReader.Parsers.Objects { if (Resource != null) { - var ret = new Dictionary + return new Dictionary { ["ObjectName"] = Resource.ObjectName.String, ["OuterIndex"] = Resource.OuterIndex.GetValue() }; - return ret; } - return null; + return Index; } [JsonIgnore] diff --git a/FModel/PakReader/Parsers/Objects/FSoftObjectPath.cs b/FModel/PakReader/Parsers/Objects/FSoftObjectPath.cs index 7aabc29e..ea637ec9 100644 --- a/FModel/PakReader/Parsers/Objects/FSoftObjectPath.cs +++ b/FModel/PakReader/Parsers/Objects/FSoftObjectPath.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public readonly struct FSoftObjectPath : IUStruct { @@ -12,5 +14,14 @@ AssetPathName = reader.ReadFName(); SubPathString = reader.ReadFString(); } + + public Dictionary GetValue() + { + return new Dictionary + { + ["AssetPathName"] = AssetPathName.String, + ["SubPathString"] = SubPathString + }; + } } } diff --git a/FModel/PakReader/Parsers/Objects/FText.cs b/FModel/PakReader/Parsers/Objects/FText.cs index 764b3a7e..54dfe47e 100644 --- a/FModel/PakReader/Parsers/Objects/FText.cs +++ b/FModel/PakReader/Parsers/Objects/FText.cs @@ -56,5 +56,18 @@ namespace PakReader.Parsers.Objects break; } } + + public object GetValue() + { + return Text switch + { + FTextHistory.DateTime dateTime => dateTime.GetValue(), + FTextHistory.OrderedFormat orderedFormat => orderedFormat.GetValue(), + FTextHistory.FormatNumber formatNumber => formatNumber.GetValue(), + FTextHistory.StringTableEntry stringTableEntry => stringTableEntry.GetValue(), + FTextHistory.None none => none.CultureInvariantString, + _ => Text + }; + } } } diff --git a/FModel/PakReader/Parsers/Objects/FTextHistoryBase.cs b/FModel/PakReader/Parsers/Objects/FTextHistoryBase.cs index b821180e..72c77e6b 100644 --- a/FModel/PakReader/Parsers/Objects/FTextHistoryBase.cs +++ b/FModel/PakReader/Parsers/Objects/FTextHistoryBase.cs @@ -14,7 +14,7 @@ namespace PakReader.Parsers.Objects internal Base(PackageReader reader) { Namespace = reader.ReadFString() ?? string.Empty; // namespaces are sometimes null - Key = reader.ReadFString(); + Key = reader.ReadFString() ?? string.Empty; SourceString = Localizations.GetLocalization(Namespace, Key, reader.ReadFString()); } } diff --git a/FModel/PakReader/Parsers/Objects/FTextHistoryDateTime.cs b/FModel/PakReader/Parsers/Objects/FTextHistoryDateTime.cs index 83c6d27e..934e1f53 100644 --- a/FModel/PakReader/Parsers/Objects/FTextHistoryDateTime.cs +++ b/FModel/PakReader/Parsers/Objects/FTextHistoryDateTime.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public partial class FTextHistory { @@ -20,6 +22,18 @@ TimeZone = reader.ReadFString(); TargetCulture = reader.ReadFString(); } + + public Dictionary GetValue() + { + return new Dictionary + { + ["SourceDateTime"] = SourceDateTime.Ticks, + ["DateStyle"] = DateStyle, + ["TimeStyle"] = TimeStyle, + ["TimeZone"] = TimeZone, + ["TargetCulture"] = TargetCulture, + }; + } } } } diff --git a/FModel/PakReader/Parsers/Objects/FTextHistoryFormatNumber.cs b/FModel/PakReader/Parsers/Objects/FTextHistoryFormatNumber.cs index 0d141da7..ec16bb20 100644 --- a/FModel/PakReader/Parsers/Objects/FTextHistoryFormatNumber.cs +++ b/FModel/PakReader/Parsers/Objects/FTextHistoryFormatNumber.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public partial class FTextHistory { @@ -16,6 +18,16 @@ TimeZone = reader.ReadFString(); TargetCulture = reader.ReadFString(); } + + public Dictionary GetValue() + { + return new Dictionary + { + ["SourceValue"] = SourceValue.GetValue(), + ["TimeZone"] = TimeZone, + ["TargetCulture"] = TargetCulture + }; + } } } } diff --git a/FModel/PakReader/Parsers/Objects/FTextHistoryOrderedFormat.cs b/FModel/PakReader/Parsers/Objects/FTextHistoryOrderedFormat.cs index 3a977e91..868fdda4 100644 --- a/FModel/PakReader/Parsers/Objects/FTextHistoryOrderedFormat.cs +++ b/FModel/PakReader/Parsers/Objects/FTextHistoryOrderedFormat.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public partial class FTextHistory { @@ -18,6 +20,21 @@ Arguments[i] = new FFormatArgumentValue(reader); } } + + public Dictionary GetValue() + { + var array = new Dictionary[Arguments.Length]; + for (int i = 0; i < array.Length; i++) + { + array[i] = Arguments[i].GetValue(); + } + + return new Dictionary + { + ["SourceFmt"] = SourceFmt.GetValue(), + ["Arguments"] = array, + }; + } } } } diff --git a/FModel/PakReader/Parsers/Objects/FTextHistoryStringTableEntry.cs b/FModel/PakReader/Parsers/Objects/FTextHistoryStringTableEntry.cs index 6b44b2d6..66eaa3b1 100644 --- a/FModel/PakReader/Parsers/Objects/FTextHistoryStringTableEntry.cs +++ b/FModel/PakReader/Parsers/Objects/FTextHistoryStringTableEntry.cs @@ -1,4 +1,6 @@ -namespace PakReader.Parsers.Objects +using System.Collections.Generic; + +namespace PakReader.Parsers.Objects { public partial class FTextHistory { @@ -14,6 +16,15 @@ TableId = reader.ReadFName(); Key = reader.ReadFString(); } + + public Dictionary GetValue() + { + return new Dictionary + { + ["TableId"] = TableId.String, + ["Key"] = Key + }; + } } } } diff --git a/FModel/PakReader/Parsers/Objects/UScriptStruct.cs b/FModel/PakReader/Parsers/Objects/UScriptStruct.cs index 02fddb6d..47c9caaa 100644 --- a/FModel/PakReader/Parsers/Objects/UScriptStruct.cs +++ b/FModel/PakReader/Parsers/Objects/UScriptStruct.cs @@ -11,7 +11,9 @@ namespace PakReader.Parsers.Objects internal UScriptStruct(PackageReader reader, FName structName) : this(reader, structName.String) { } internal UScriptStruct(PackageReader reader, string structName) { +#if DEBUG //System.Diagnostics.Debug.WriteLine(structName); +#endif Struct = structName switch { "LevelSequenceObjectReferenceMap" => new FLevelSequenceObjectReferenceMap(reader), @@ -49,7 +51,6 @@ namespace PakReader.Parsers.Objects "MovieSceneFloatChannel" => new FMovieSceneFloatChannel(reader), "MovieSceneEvaluationTemplate" => new FMovieSceneEvaluationTemplate(reader), "SkeletalMeshSamplingLODBuiltData" => new FSkeletalMeshSamplingLODBuiltData(reader), - //"BodyInstance" => new FBodyInstance(reader), // if uncommented, can't parse .umap "VectorMaterialInput" => new FVectorMaterialInput(reader), "ColorMaterialInput" => new FColorMaterialInput(reader), "ExpressionInput" => new FMaterialInput(reader), diff --git a/FModel/PakReader/Parsers/PackageReader.cs b/FModel/PakReader/Parsers/PackageReader.cs index 0307599e..7cde6126 100644 --- a/FModel/PakReader/Parsers/PackageReader.cs +++ b/FModel/PakReader/Parsers/PackageReader.cs @@ -35,36 +35,39 @@ namespace PakReader.Parsers Loader = uexp; for(int i = 0; i < ExportMap.Length; i++) { - FName ObjectClassName; - if (ExportMap[i].ClassIndex.IsNull) - ObjectClassName = DataExportTypes[i] = ReadFName(); // check if this is true, I don't know if Fortnite ever uses this - else if (ExportMap[i].ClassIndex.IsExport) - ObjectClassName = DataExportTypes[i] = ExportMap[ExportMap[i].ClassIndex.AsExport].ObjectName; - else if (ExportMap[i].ClassIndex.IsImport) - ObjectClassName = DataExportTypes[i] = ImportMap[ExportMap[i].ClassIndex.AsImport].ObjectName; - else - throw new FileLoadException("Can't get class name"); // Shouldn't reach this unless the laws of math have bent to MagmaReef's will - - if (ObjectClassName.String.Equals("BlueprintGeneratedClass")) continue; - - var pos = Position = ExportMap[i].SerialOffset - PackageFileSummary.TotalHeaderSize; - DataExports[i] = ObjectClassName.String switch + FObjectExport Export = ExportMap[i]; { - "Texture2D" => new UTexture2D(this, ubulk, ExportMap.Sum(e => e.SerialSize) + PackageFileSummary.TotalHeaderSize), - "CurveTable" => new UCurveTable(this), - "DataTable" => new UDataTable(this), - "FontFace" => new UFontFace(this, ubulk), - "SoundWave" => new USoundWave(this, ubulk, ExportMap.Sum(e => e.SerialSize) + PackageFileSummary.TotalHeaderSize), - "StringTable" => new UStringTable(this), - _ => new UObject(this), - }; + FName ExportType; + if (Export.ClassIndex.IsNull) + ExportType = DataExportTypes[i] = ReadFName(); // check if this is true, I don't know if Fortnite ever uses this + else if (Export.ClassIndex.IsExport) + ExportType = DataExportTypes[i] = ExportMap[Export.ClassIndex.AsExport].SuperIndex.Resource.ObjectName; + else if (Export.ClassIndex.IsImport) + ExportType = DataExportTypes[i] = ImportMap[Export.ClassIndex.AsImport].ObjectName; + else + throw new FileLoadException("Can't get class name"); // Shouldn't reach this unless the laws of math have bent to MagmaReef's will + + if (ExportType.String.Equals("BlueprintGeneratedClass")) continue; + + var pos = Position = Export.SerialOffset - PackageFileSummary.TotalHeaderSize; + DataExports[i] = ExportType.String switch + { + "Texture2D" => new UTexture2D(this, ubulk, ExportMap.Sum(e => e.SerialSize) + PackageFileSummary.TotalHeaderSize), + "CurveTable" => new UCurveTable(this), + "DataTable" => new UDataTable(this), + "FontFace" => new UFontFace(this, ubulk), + "SoundWave" => new USoundWave(this, ubulk, ExportMap.Sum(e => e.SerialSize) + PackageFileSummary.TotalHeaderSize), + "StringTable" => new UStringTable(this), + _ => new UObject(this), + }; #if DEBUG - if (pos + ExportMap[i].SerialSize != Position) - { - System.Diagnostics.Debug.WriteLine($"[ExportType={ObjectClassName.String}] Didn't read {ExportMap[i].ObjectName} correctly (at {Position}, should be {pos + ExportMap[i].SerialSize}, {pos + ExportMap[i].SerialSize - Position} behind)"); - } + if (pos + Export.SerialSize != Position) + { + System.Diagnostics.Debug.WriteLine($"[ExportType={ExportType.String}] Didn't read {Export.ObjectName} correctly (at {Position}, should be {pos + Export.SerialSize}, {pos + Export.SerialSize - Position} behind)"); + } #endif + } } return; } @@ -129,7 +132,10 @@ namespace PakReader.Parsers { return new FName(NameMap[NameIndex], NameIndex, Number); } - throw new FileLoadException($"Bad Name Index: {NameIndex}/{NameMap.Length} - Loader Position: {Loader.BaseStream.Position}"); +#if DEBUG + System.Diagnostics.Debug.WriteLine($"Bad Name Index: {NameIndex}/{NameMap.Length} - Loader Position: {Loader.BaseStream.Position}"); +#endif + return default; } diff --git a/FModel/PakReader/Parsers/PropertyTagData/ArrayProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/ArrayProperty.cs index e560f1ba..5b5de5dd 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/ArrayProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/ArrayProperty.cs @@ -1,15 +1,15 @@ -using PakReader.Parsers.Objects; +using PakReader.Parsers.Objects; namespace PakReader.Parsers.PropertyTagData { - public sealed class ArrayProperty : BaseProperty + public sealed class ArrayProperty : BaseProperty { internal ArrayProperty(PackageReader reader, FPropertyTag tag) { Position = reader.Position; int length = reader.ReadInt32(); - Value = new object[length]; + Value = new BaseProperty[length]; FPropertyTag InnerTag = default; // Execute if UE4 version is at least VER_UE4_INNER_ARRAY_TAG_INFO @@ -20,7 +20,7 @@ namespace PakReader.Parsers.PropertyTagData } for (int i = 0; i < length; i++) { - Value[i] = BaseProperty.ReadAsObject(reader, InnerTag, tag.InnerType, ReadType.ARRAY); + Value[i] = ReadAsObject(reader, InnerTag, tag.InnerType, ReadType.ARRAY); } } @@ -29,35 +29,33 @@ namespace PakReader.Parsers.PropertyTagData var ret = new object[Value.Length]; for (int i = 0; i < ret.Length; i++) { - if (Value[i] == null) - ret[i] = null; - else - ret[i] = ((BaseProperty)Value[i]).GetType().Name switch - { - "ByteProperty" => ((ByteProperty)Value[i]).GetValue(), - "BoolProperty" => ((BoolProperty)Value[i]).GetValue(), - "IntProperty" => ((IntProperty)Value[i]).GetValue(), - "FloatProperty" => ((FloatProperty)Value[i]).GetValue(), - "ObjectProperty" => ((ObjectProperty)Value[i]).GetValue(), - "NameProperty" => ((NameProperty)Value[i]).GetValue(), - "DoubleProperty" => ((DoubleProperty)Value[i]).GetValue(), - "ArrayProperty" => ((ArrayProperty)Value[i]).GetValue(), - "StructProperty" => ((StructProperty)Value[i]).GetValue(), - "StrProperty" => ((StrProperty)Value[i]).GetValue(), - "TextProperty" => ((TextProperty)Value[i]).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)Value[i]).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)Value[i]).GetValue(), - "UInt64Property" => ((UInt64Property)Value[i]).GetValue(), - "UInt32Property" => ((UInt32Property)Value[i]).GetValue(), - "UInt16Property" => ((UInt16Property)Value[i]).GetValue(), - "Int64Property" => ((Int64Property)Value[i]).GetValue(), - "Int16Property" => ((Int16Property)Value[i]).GetValue(), - "Int8Property" => ((Int8Property)Value[i]).GetValue(), - "MapProperty" => ((MapProperty)Value[i]).GetValue(), - "SetProperty" => ((SetProperty)Value[i]).GetValue(), - "EnumProperty" => ((EnumProperty)Value[i]).GetValue(), - _ => Value[i], - }; + ret[i] = Value[i] switch + { + ByteProperty byteProperty => byteProperty.GetValue(), + BoolProperty boolProperty => boolProperty.GetValue(), + IntProperty intProperty => intProperty.GetValue(), + FloatProperty floatProperty => floatProperty.GetValue(), + ObjectProperty objectProperty => objectProperty.GetValue(), + NameProperty nameProperty => nameProperty.GetValue(), + DelegateProperty delegateProperty => delegateProperty.GetValue(), + DoubleProperty doubleProperty => doubleProperty.GetValue(), + ArrayProperty arrayProperty => arrayProperty.GetValue(), + StructProperty structProperty => structProperty.GetValue(), + StrProperty strProperty => strProperty.GetValue(), + TextProperty textProperty => textProperty.GetValue(), + InterfaceProperty interfaceProperty => interfaceProperty.GetValue(), + SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(), + UInt64Property uInt64Property => uInt64Property.GetValue(), + UInt32Property uInt32Property => uInt32Property.GetValue(), + UInt16Property uInt16Property => uInt16Property.GetValue(), + Int64Property int64Property => int64Property.GetValue(), + Int16Property int16Property => int16Property.GetValue(), + Int8Property int8Property => int8Property.GetValue(), + MapProperty mapProperty => mapProperty.GetValue(), + SetProperty setProperty => setProperty.GetValue(), + EnumProperty enumProperty => enumProperty.GetValue(), + _ => Value[i], + }; } return ret; } diff --git a/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs index 902880d6..f55d4eed 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/BaseProperty.cs @@ -8,31 +8,31 @@ namespace PakReader.Parsers.PropertyTagData { BaseProperty prop = type.String switch { - "ByteProperty" => new ByteProperty(reader, tag, readType), + "ByteProperty" => new ByteProperty(reader, readType), "BoolProperty" => new BoolProperty(reader, tag, readType), - "IntProperty" => new IntProperty(reader, tag), - "FloatProperty" => new FloatProperty(reader, tag), - "ObjectProperty" => new ObjectProperty(reader, tag), - "NameProperty" => new NameProperty(reader, tag), - "DelegateProperty" => new DelegateProperty(reader, tag), - "DoubleProperty" => new DoubleProperty(reader, tag), + "IntProperty" => new IntProperty(reader), + "FloatProperty" => new FloatProperty(reader), + "ObjectProperty" => new ObjectProperty(reader), + "NameProperty" => new NameProperty(reader), + "DelegateProperty" => new DelegateProperty(reader), + "DoubleProperty" => new DoubleProperty(reader), "ArrayProperty" => new ArrayProperty(reader, tag), "StructProperty" => new StructProperty(reader, tag), - "StrProperty" => new StrProperty(reader, tag), - "TextProperty" => new TextProperty(reader, tag), - "InterfaceProperty" => new InterfaceProperty(reader, tag), + "StrProperty" => new StrProperty(reader), + "TextProperty" => new TextProperty(reader), + "InterfaceProperty" => new InterfaceProperty(reader), "MulticastDelegateProperty" => new MulticastDelegateProperty(reader, tag), "LazyObjectProperty" => new LazyObjectProperty(reader, tag), - "SoftObjectProperty" => new SoftObjectProperty(reader, tag, readType), - "UInt64Property" => new UInt64Property(reader, tag), - "UInt32Property" => new UInt32Property(reader, tag), - "UInt16Property" => new UInt16Property(reader, tag), - "Int64Property" => new Int64Property(reader, tag), - "Int16Property" => new Int16Property(reader, tag), - "Int8Property" => new Int8Property(reader, tag), + "SoftObjectProperty" => new SoftObjectProperty(reader, readType), + "UInt64Property" => new UInt64Property(reader), + "UInt32Property" => new UInt32Property(reader), + "UInt16Property" => new UInt16Property(reader), + "Int64Property" => new Int64Property(reader), + "Int16Property" => new Int16Property(reader), + "Int8Property" => new Int8Property(reader), "MapProperty" => new MapProperty(reader, tag), "SetProperty" => new SetProperty(reader, tag), - "EnumProperty" => new EnumProperty(reader, tag), + "EnumProperty" => new EnumProperty(reader), _ => null, //throw new NotImplementedException($"Parsing of {type.String} types aren't supported yet."), }; return prop; @@ -40,33 +40,33 @@ namespace PakReader.Parsers.PropertyTagData internal static object ReadAsValue(PackageReader reader, FPropertyTag tag, FName type, ReadType readType) { - var prop = type.String switch + object prop = type.String switch { - "ByteProperty" => new ByteProperty(reader, tag, readType).Value, + "ByteProperty" => new ByteProperty(reader, readType).Value, "BoolProperty" => new BoolProperty(reader, tag, readType).Value, - "IntProperty" => new IntProperty(reader, tag).Value, - "FloatProperty" => new FloatProperty(reader, tag).Value, - "ObjectProperty" => new ObjectProperty(reader, tag).Value, - "NameProperty" => new NameProperty(reader, tag).Value, - "DelegateProperty" => new DelegateProperty(reader, tag), - "DoubleProperty" => new DoubleProperty(reader, tag).Value, + "IntProperty" => new IntProperty(reader).Value, + "FloatProperty" => new FloatProperty(reader).Value, + "ObjectProperty" => new ObjectProperty(reader).Value, + "NameProperty" => new NameProperty(reader).Value, + "DelegateProperty" => new DelegateProperty(reader), + "DoubleProperty" => new DoubleProperty(reader).Value, "ArrayProperty" => new ArrayProperty(reader, tag).Value, "StructProperty" => new StructProperty(reader, tag).Value, - "StrProperty" => new StrProperty(reader, tag).Value, - "TextProperty" => new TextProperty(reader, tag).Value, - "InterfaceProperty" => new InterfaceProperty(reader, tag).Value, + "StrProperty" => new StrProperty(reader).Value, + "TextProperty" => new TextProperty(reader).Value, + "InterfaceProperty" => new InterfaceProperty(reader).Value, "MulticastDelegateProperty" => new MulticastDelegateProperty(reader, tag).Value, "LazyObjectProperty" => new LazyObjectProperty(reader, tag).Value, - "SoftObjectProperty" => new SoftObjectProperty(reader, tag, readType).Value, - "UInt64Property" => new UInt64Property(reader, tag).Value, - "UInt32Property" => new UInt32Property(reader, tag).Value, - "UInt16Property" => new UInt16Property(reader, tag).Value, - "Int64Property" => new Int64Property(reader, tag).Value, - "Int16Property" => new Int16Property(reader, tag).Value, - "Int8Property" => new Int8Property(reader, tag).Value, + "SoftObjectProperty" => new SoftObjectProperty(reader, readType).Value, + "UInt64Property" => new UInt64Property(reader).Value, + "UInt32Property" => new UInt32Property(reader).Value, + "UInt16Property" => new UInt16Property(reader).Value, + "Int64Property" => new Int64Property(reader).Value, + "Int16Property" => new Int16Property(reader).Value, + "Int8Property" => new Int8Property(reader).Value, "MapProperty" => new MapProperty(reader, tag).Value, "SetProperty" => new SetProperty(reader, tag).Value, - "EnumProperty" => new EnumProperty(reader, tag).Value, + "EnumProperty" => new EnumProperty(reader).Value, _ => null, //throw new NotImplementedException($"Parsing of {type.String} types aren't supported yet."), }; return prop; diff --git a/FModel/PakReader/Parsers/PropertyTagData/ByteProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/ByteProperty.cs index 5f782fe0..1c5d0a44 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/ByteProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/ByteProperty.cs @@ -1,11 +1,10 @@ using System; -using PakReader.Parsers.Objects; namespace PakReader.Parsers.PropertyTagData { public sealed class ByteProperty : BaseProperty { - internal ByteProperty(PackageReader reader, FPropertyTag tag, ReadType readType) + internal ByteProperty(PackageReader reader, ReadType readType) { Position = reader.Position; Value = readType switch diff --git a/FModel/PakReader/Parsers/PropertyTagData/DelegateProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/DelegateProperty.cs index ec5b8f44..ae3f129b 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/DelegateProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/DelegateProperty.cs @@ -1,4 +1,5 @@ using PakReader.Parsers.Objects; +using System.Collections.Generic; namespace PakReader.Parsers.PropertyTagData { @@ -7,10 +8,12 @@ namespace PakReader.Parsers.PropertyTagData public int Object; public FName Name; - internal DelegateProperty(PackageReader reader, FPropertyTag tag) + internal DelegateProperty(PackageReader reader) { Object = reader.ReadInt32(); Name = reader.ReadFName(); } + + public Dictionary GetValue() => new Dictionary { ["Object"] = Object, ["Name"] = Name.String }; } } diff --git a/FModel/PakReader/Parsers/PropertyTagData/DoubleProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/DoubleProperty.cs index 4a26c0a9..220dbe61 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/DoubleProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/DoubleProperty.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class DoubleProperty : BaseProperty { - internal DoubleProperty(PackageReader reader, FPropertyTag tag) + internal DoubleProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadDouble(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/EnumProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/EnumProperty.cs index 3db14697..aa539a14 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/EnumProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/EnumProperty.cs @@ -4,7 +4,7 @@ namespace PakReader.Parsers.PropertyTagData { public sealed class EnumProperty : BaseProperty { - internal EnumProperty(PackageReader reader, FPropertyTag tag) + internal EnumProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadFName(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/FloatProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/FloatProperty.cs index 19fb546e..392869b0 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/FloatProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/FloatProperty.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class FloatProperty : BaseProperty { - internal FloatProperty(PackageReader reader, FPropertyTag tag) + internal FloatProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadFloat(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/Int16Property.cs b/FModel/PakReader/Parsers/PropertyTagData/Int16Property.cs index 95acb139..a125c10b 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/Int16Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/Int16Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class Int16Property : BaseProperty { - internal Int16Property(PackageReader reader, FPropertyTag tag) + internal Int16Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadInt16(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/Int64Property.cs b/FModel/PakReader/Parsers/PropertyTagData/Int64Property.cs index 5d849014..88792973 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/Int64Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/Int64Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class Int64Property : BaseProperty { - internal Int64Property(PackageReader reader, FPropertyTag tag) + internal Int64Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadInt64(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/Int8Property.cs b/FModel/PakReader/Parsers/PropertyTagData/Int8Property.cs index 47b4ca6d..16638e73 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/Int8Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/Int8Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class Int8Property : BaseProperty { - internal Int8Property(PackageReader reader, FPropertyTag tag) + internal Int8Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadByte(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/IntProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/IntProperty.cs index a015604f..ff03574c 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/IntProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/IntProperty.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class IntProperty : BaseProperty { - internal IntProperty(PackageReader reader, FPropertyTag tag) + internal IntProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadInt32(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/InterfaceProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/InterfaceProperty.cs index 99cf0316..f6b263d1 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/InterfaceProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/InterfaceProperty.cs @@ -1,11 +1,9 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class InterfaceProperty : BaseProperty { // Value is ObjectRef - internal InterfaceProperty(PackageReader reader, FPropertyTag tag) + internal InterfaceProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadUInt32(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/MapProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/MapProperty.cs index a0180857..c203f07f 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/MapProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/MapProperty.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using PakReader.Parsers.Objects; @@ -21,7 +21,7 @@ namespace PakReader.Parsers.PropertyTagData var dict = new Dictionary(NumEntries); for (int i = 0; i < NumEntries; i++) { - dict[ReadAsValue(reader, tag, tag.InnerType, ReadType.MAP)] = BaseProperty.ReadAsObject(reader, tag, tag.ValueType, ReadType.MAP); + dict[ReadAsValue(reader, tag, tag.ValueType, ReadType.MAP)] = ReadAsObject(reader, tag, tag.ValueType, ReadType.MAP); } Value = dict; } @@ -29,37 +29,35 @@ namespace PakReader.Parsers.PropertyTagData public Dictionary GetValue() { var ret = new Dictionary(Value.Count); - foreach (KeyValuePair KvP in Value) + foreach (var (key, value) in Value) { - if (KvP.Value == null) - ret[KvP.Key] = null; - else - ret[KvP.Key] = KvP.Value.GetType().Name switch - { - "ByteProperty" => ((ByteProperty)KvP.Value).GetValue(), - "BoolProperty" => ((BoolProperty)KvP.Value).GetValue(), - "IntProperty" => ((IntProperty)KvP.Value).GetValue(), - "FloatProperty" => ((FloatProperty)KvP.Value).GetValue(), - "ObjectProperty" => ((ObjectProperty)KvP.Value).GetValue(), - "NameProperty" => ((NameProperty)KvP.Value).GetValue(), - "DoubleProperty" => ((DoubleProperty)KvP.Value).GetValue(), - "ArrayProperty" => ((ArrayProperty)KvP.Value).GetValue(), - "StructProperty" => ((StructProperty)KvP.Value).GetValue(), - "StrProperty" => ((StrProperty)KvP.Value).GetValue(), - "TextProperty" => ((TextProperty)KvP.Value).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)KvP.Value).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)KvP.Value).GetValue(), - "UInt64Property" => ((UInt64Property)KvP.Value).GetValue(), - "UInt32Property" => ((UInt32Property)KvP.Value).GetValue(), - "UInt16Property" => ((UInt16Property)KvP.Value).GetValue(), - "Int64Property" => ((Int64Property)KvP.Value).GetValue(), - "Int16Property" => ((Int16Property)KvP.Value).GetValue(), - "Int8Property" => ((Int8Property)KvP.Value).GetValue(), - "MapProperty" => ((MapProperty)KvP.Value).GetValue(), - "SetProperty" => ((SetProperty)KvP.Value).GetValue(), - "EnumProperty" => ((EnumProperty)KvP.Value).GetValue(), - _ => KvP.Value, - }; + ret[key] = value switch + { + ByteProperty byteProperty => byteProperty.GetValue(), + BoolProperty boolProperty => boolProperty.GetValue(), + IntProperty intProperty => intProperty.GetValue(), + FloatProperty floatProperty => floatProperty.GetValue(), + ObjectProperty objectProperty => objectProperty.GetValue(), + NameProperty nameProperty => nameProperty.GetValue(), + DelegateProperty delegateProperty => delegateProperty.GetValue(), + DoubleProperty doubleProperty => doubleProperty.GetValue(), + ArrayProperty arrayProperty => arrayProperty.GetValue(), + StructProperty structProperty => structProperty.GetValue(), + StrProperty strProperty => strProperty.GetValue(), + TextProperty textProperty => textProperty.GetValue(), + InterfaceProperty interfaceProperty => interfaceProperty.GetValue(), + SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(), + UInt64Property uInt64Property => uInt64Property.GetValue(), + UInt32Property uInt32Property => uInt32Property.GetValue(), + UInt16Property uInt16Property => uInt16Property.GetValue(), + Int64Property int64Property => int64Property.GetValue(), + Int16Property int16Property => int16Property.GetValue(), + Int8Property int8Property => int8Property.GetValue(), + MapProperty mapProperty => mapProperty.GetValue(), + SetProperty setProperty => setProperty.GetValue(), + EnumProperty enumProperty => enumProperty.GetValue(), + _ => value, + }; } return ret; } diff --git a/FModel/PakReader/Parsers/PropertyTagData/NameProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/NameProperty.cs index 3860abbd..94dc8377 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/NameProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/NameProperty.cs @@ -4,7 +4,7 @@ namespace PakReader.Parsers.PropertyTagData { public sealed class NameProperty : BaseProperty { - internal NameProperty(PackageReader reader, FPropertyTag tag) + internal NameProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadFName(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/ObjectProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/ObjectProperty.cs index 38f450ea..f7781922 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/ObjectProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/ObjectProperty.cs @@ -1,11 +1,10 @@ using PakReader.Parsers.Objects; -using System.Collections.Generic; namespace PakReader.Parsers.PropertyTagData { public sealed class ObjectProperty : BaseProperty { - internal ObjectProperty(PackageReader reader, FPropertyTag tag) + internal ObjectProperty(PackageReader reader) { Position = reader.Position; Value = new FPackageIndex(reader); diff --git a/FModel/PakReader/Parsers/PropertyTagData/SetProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/SetProperty.cs index c66fb5bd..043fa66e 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/SetProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/SetProperty.cs @@ -1,4 +1,4 @@ -using System; +using System; using PakReader.Parsers.Objects; namespace PakReader.Parsers.PropertyTagData @@ -20,7 +20,7 @@ namespace PakReader.Parsers.PropertyTagData Value = new object[NumEntries]; for (int i = 0; i < NumEntries; i++) { - Value[i] = BaseProperty.ReadAsObject(reader, tag, tag.InnerType, ReadType.ARRAY); + Value[i] = ReadAsObject(reader, tag, tag.InnerType, ReadType.ARRAY); } } @@ -29,35 +29,33 @@ namespace PakReader.Parsers.PropertyTagData var ret = new object[Value.Length]; for (int i = 0; i < ret.Length; i++) { - if (Value[i] == null) - ret[i] = null; - else - ret[i] = ((BaseProperty)Value[i]).GetType().Name switch - { - "ByteProperty" => ((ByteProperty)Value[i]).GetValue(), - "BoolProperty" => ((BoolProperty)Value[i]).GetValue(), - "IntProperty" => ((IntProperty)Value[i]).GetValue(), - "FloatProperty" => ((FloatProperty)Value[i]).GetValue(), - "ObjectProperty" => ((ObjectProperty)Value[i]).GetValue(), - "NameProperty" => ((NameProperty)Value[i]).GetValue(), - "DoubleProperty" => ((DoubleProperty)Value[i]).GetValue(), - "ArrayProperty" => ((ArrayProperty)Value[i]).GetValue(), - "StructProperty" => ((StructProperty)Value[i]).GetValue(), - "StrProperty" => ((StrProperty)Value[i]).GetValue(), - "TextProperty" => ((TextProperty)Value[i]).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)Value[i]).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)Value[i]).GetValue(), - "UInt64Property" => ((UInt64Property)Value[i]).GetValue(), - "UInt32Property" => ((UInt32Property)Value[i]).GetValue(), - "UInt16Property" => ((UInt16Property)Value[i]).GetValue(), - "Int64Property" => ((Int64Property)Value[i]).GetValue(), - "Int16Property" => ((Int16Property)Value[i]).GetValue(), - "Int8Property" => ((Int8Property)Value[i]).GetValue(), - "MapProperty" => ((MapProperty)Value[i]).GetValue(), - "SetProperty" => ((SetProperty)Value[i]).GetValue(), - "EnumProperty" => ((EnumProperty)Value[i]).GetValue(), - _ => Value[i], - }; + ret[i] = Value[i] switch + { + ByteProperty byteProperty => byteProperty.GetValue(), + BoolProperty boolProperty => boolProperty.GetValue(), + IntProperty intProperty => intProperty.GetValue(), + FloatProperty floatProperty => floatProperty.GetValue(), + ObjectProperty objectProperty => objectProperty.GetValue(), + NameProperty nameProperty => nameProperty.GetValue(), + DelegateProperty delegateProperty => delegateProperty.GetValue(), + DoubleProperty doubleProperty => doubleProperty.GetValue(), + ArrayProperty arrayProperty => arrayProperty.GetValue(), + StructProperty structProperty => structProperty.GetValue(), + StrProperty strProperty => strProperty.GetValue(), + TextProperty textProperty => textProperty.GetValue(), + InterfaceProperty interfaceProperty => interfaceProperty.GetValue(), + SoftObjectProperty softObjectProperty => softObjectProperty.GetValue(), + UInt64Property uInt64Property => uInt64Property.GetValue(), + UInt32Property uInt32Property => uInt32Property.GetValue(), + UInt16Property uInt16Property => uInt16Property.GetValue(), + Int64Property int64Property => int64Property.GetValue(), + Int16Property int16Property => int16Property.GetValue(), + Int8Property int8Property => int8Property.GetValue(), + MapProperty mapProperty => mapProperty.GetValue(), + SetProperty setProperty => setProperty.GetValue(), + EnumProperty enumProperty => enumProperty.GetValue(), + _ => Value[i], + }; } return ret; } diff --git a/FModel/PakReader/Parsers/PropertyTagData/SoftObjectProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/SoftObjectProperty.cs index 5024e321..87e6f1bf 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/SoftObjectProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/SoftObjectProperty.cs @@ -1,10 +1,11 @@ using PakReader.Parsers.Objects; +using System.Collections.Generic; namespace PakReader.Parsers.PropertyTagData { public sealed class SoftObjectProperty : BaseProperty { - internal SoftObjectProperty(PackageReader reader, FPropertyTag tag, ReadType readType) + internal SoftObjectProperty(PackageReader reader, ReadType readType) { Position = reader.Position; Value = new FSoftObjectPath(reader); @@ -12,6 +13,6 @@ namespace PakReader.Parsers.PropertyTagData reader.Position += 16 - (reader.Position - Position); // skip ahead, putting the total bytes read to 16 } - public FSoftObjectPath GetValue() => Value; + public Dictionary GetValue() => Value.GetValue(); } } diff --git a/FModel/PakReader/Parsers/PropertyTagData/StrProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/StrProperty.cs index 700efc11..3e4d945c 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/StrProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/StrProperty.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class StrProperty : BaseProperty { - internal StrProperty(PackageReader reader, FPropertyTag tag) + internal StrProperty(PackageReader reader) { Position = reader.Position; Value = reader.ReadFString(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/StructProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/StructProperty.cs index 87d29ee3..d2ef487a 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/StructProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/StructProperty.cs @@ -1,6 +1,5 @@ -using PakReader.Parsers.Class; +using PakReader.Parsers.Class; using PakReader.Parsers.Objects; -using System.Collections.Generic; namespace PakReader.Parsers.PropertyTagData { @@ -14,57 +13,19 @@ namespace PakReader.Parsers.PropertyTagData public object GetValue() { - if (Value is UObject obj) + return Value switch { - var ret = new Dictionary(obj.Count); - foreach (KeyValuePair KvP in obj) - { - if (KvP.Value == null) - ret[KvP.Key] = null; - else - ret[KvP.Key] = KvP.Value.GetType().Name switch - { - "ByteProperty" => ((ByteProperty)KvP.Value).GetValue(), - "BoolProperty" => ((BoolProperty)KvP.Value).GetValue(), - "IntProperty" => ((IntProperty)KvP.Value).GetValue(), - "FloatProperty" => ((FloatProperty)KvP.Value).GetValue(), - "ObjectProperty" => ((ObjectProperty)KvP.Value).GetValue(), - "NameProperty" => ((NameProperty)KvP.Value).GetValue(), - "DoubleProperty" => ((DoubleProperty)KvP.Value).GetValue(), - "ArrayProperty" => ((ArrayProperty)KvP.Value).GetValue(), - "StructProperty" => ((StructProperty)KvP.Value).GetValue(), - "StrProperty" => ((StrProperty)KvP.Value).GetValue(), - "TextProperty" => ((TextProperty)KvP.Value).GetValue(), - "InterfaceProperty" => ((InterfaceProperty)KvP.Value).GetValue(), - "SoftObjectProperty" => ((SoftObjectProperty)KvP.Value).GetValue(), - "UInt64Property" => ((UInt64Property)KvP.Value).GetValue(), - "UInt32Property" => ((UInt32Property)KvP.Value).GetValue(), - "UInt16Property" => ((UInt16Property)KvP.Value).GetValue(), - "Int64Property" => ((Int64Property)KvP.Value).GetValue(), - "Int16Property" => ((Int16Property)KvP.Value).GetValue(), - "Int8Property" => ((Int8Property)KvP.Value).GetValue(), - "MapProperty" => ((MapProperty)KvP.Value).GetValue(), - "SetProperty" => ((SetProperty)KvP.Value).GetValue(), - "EnumProperty" => ((EnumProperty)KvP.Value).GetValue(), - _ => KvP.Value, - }; - } - return ret; - } - else if (Value is FGameplayTagContainer gTags) - { - var ret = new string[gTags.GameplayTags.Length]; - for (int i = 0; i < ret.Length; i++) - { - ret[i] = gTags.GameplayTags[i].String; - } - return ret; - } - else if (Value is FGuid guid) - { - return guid.Hex; - } - return Value; + UObject uObject => uObject.GetJsonDict(), + FAssetData fAssetData => fAssetData.GetValue(), + FAssetDataTagMapSharedView fAssetDataTagMapSharedView => fAssetDataTagMapSharedView.Map, + FAssetIdentifier fAssetIdentifier => fAssetIdentifier.GetValue(), + FAssetPackageData fAssetPackageData => fAssetPackageData.GetValue(), + FGameplayTagContainer fGameplayTagContainer => fGameplayTagContainer.GetValue(), + FSoftObjectPath fSoftObjectPath => fSoftObjectPath.GetValue(), + FDateTime fDateTime => fDateTime.Ticks, + FGuid fGuid => fGuid.Hex, + _ => Value + }; } } } diff --git a/FModel/PakReader/Parsers/PropertyTagData/TextProperty.cs b/FModel/PakReader/Parsers/PropertyTagData/TextProperty.cs index 21a82c73..ede499ed 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/TextProperty.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/TextProperty.cs @@ -4,12 +4,12 @@ namespace PakReader.Parsers.PropertyTagData { public sealed class TextProperty : BaseProperty { - internal TextProperty(PackageReader reader, FPropertyTag tag) + internal TextProperty(PackageReader reader) { Position = reader.Position; Value = new FText(reader); } - public FText GetValue() => Value; + public object GetValue() => Value.GetValue(); } } diff --git a/FModel/PakReader/Parsers/PropertyTagData/UInt16Property.cs b/FModel/PakReader/Parsers/PropertyTagData/UInt16Property.cs index da1d654c..67c6a7af 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/UInt16Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/UInt16Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class UInt16Property : BaseProperty { - internal UInt16Property(PackageReader reader, FPropertyTag tag) + internal UInt16Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadUInt16(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/UInt32Property.cs b/FModel/PakReader/Parsers/PropertyTagData/UInt32Property.cs index 025bba98..a59b67fa 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/UInt32Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/UInt32Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class UInt32Property : BaseProperty { - internal UInt32Property(PackageReader reader, FPropertyTag tag) + internal UInt32Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadUInt32(); diff --git a/FModel/PakReader/Parsers/PropertyTagData/UInt64Property.cs b/FModel/PakReader/Parsers/PropertyTagData/UInt64Property.cs index d0d6b7c2..822cb589 100644 --- a/FModel/PakReader/Parsers/PropertyTagData/UInt64Property.cs +++ b/FModel/PakReader/Parsers/PropertyTagData/UInt64Property.cs @@ -1,10 +1,8 @@ -using PakReader.Parsers.Objects; - -namespace PakReader.Parsers.PropertyTagData +namespace PakReader.Parsers.PropertyTagData { public sealed class UInt64Property : BaseProperty { - internal UInt64Property(PackageReader reader, FPropertyTag tag) + internal UInt64Property(PackageReader reader) { Position = reader.Position; Value = reader.ReadUInt64(); diff --git a/FModel/Properties/Resources.Designer.cs b/FModel/Properties/Resources.Designer.cs index 5e5fdb17..1d643752 100644 --- a/FModel/Properties/Resources.Designer.cs +++ b/FModel/Properties/Resources.Designer.cs @@ -109,15 +109,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Add Separator. - /// - public static string AddSeparator { - get { - return ResourceManager.GetString("AddSeparator", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à AES. /// @@ -248,15 +239,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Audio. - /// - public static string Audio { - get { - return ResourceManager.GetString("Audio", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Audio Devices. /// @@ -339,15 +321,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à BenBot API. - /// - public static string BenBotApi { - get { - return ResourceManager.GetString("BenBotApi", resourceCulture); - } - } - /// /// Recherche une ressource localisée de type System.Drawing.Icon semblable à (Icône). /// @@ -695,15 +668,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Difference. - /// - public static string Difference { - get { - return ResourceManager.GetString("Difference", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Directories. /// @@ -947,15 +911,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Exit. - /// - public static string Exit { - get { - return ResourceManager.GetString("Exit", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Export. /// @@ -965,15 +920,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Export Directory. - /// - public static string ExportDirectory { - get { - return ResourceManager.GetString("ExportDirectory", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Extract. /// @@ -983,15 +929,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Extract Directory. - /// - public static string ExtractDirectory { - get { - return ResourceManager.GetString("ExtractDirectory", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Extraction. /// @@ -1235,24 +1172,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à The selected language will be the one used for icons creation. - /// - public static string FyiDetails { - get { - return ResourceManager.GetString("FyiDetails", resourceCulture); - } - } - - /// - /// Recherche une chaîne localisée semblable à FYI:. - /// - public static string FyiTitle { - get { - return ResourceManager.GetString("FyiTitle", resourceCulture); - } - } - /// /// Recherche une ressource localisée de type System.Drawing.Bitmap. /// @@ -1723,15 +1642,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Media. - /// - public static string Media { - get { - return ResourceManager.GetString("Media", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Minimalist. /// @@ -1975,15 +1885,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Fortnite PAK files auto-detected. - /// - public static string PakFilesAutoDetected { - get { - return ResourceManager.GetString("PakFilesAutoDetected", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Parsing of {0} types isn't supported yet.. /// @@ -2097,15 +1998,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Popup. - /// - public static string Popup { - get { - return ResourceManager.GetString("Popup", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Portuguese (Brazil). /// @@ -2171,15 +2063,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Rate Limit Exceeded. - /// - public static string RateLimited { - get { - return ResourceManager.GetString("RateLimited", resourceCulture); - } - } - /// /// Recherche une ressource localisée de type System.Drawing.Bitmap. /// @@ -2208,15 +2091,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Remember game. - /// - public static string RememberGame { - get { - return ResourceManager.GetString("RememberGame", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Remove. /// @@ -2307,15 +2181,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Save Directory. - /// - public static string SaveDirectory { - get { - return ResourceManager.GetString("SaveDirectory", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Save Image. /// @@ -2683,12 +2548,9 @@ namespace FModel.Properties { /// /// Recherche une chaîne localisée semblable à • EN: Asval#2291 • FR: Asval#2291 - ///• DE: FunGames#6822 • IT: Angry Cat#5581 + ///• DE: FunGames#6822 • IT: arianaglande#5581 ///• ES: Maiky.M#9879 • AR: PsychoPast#0001 - ///• JA: FNJPNews#7820 • KO: - ///• PL: • PT-BR: - ///• RU: Seawod#4311 • TR: - ///• ZH-CN: • ZH-Hant:. + ///• JA: FNJPNews#7820 • RU: Seawod#4311. /// public static string TranslatorsFDetails { get { @@ -2714,15 +2576,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Update. - /// - public static string Update { - get { - return ResourceManager.GetString("Update", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Update Available. /// @@ -2919,7 +2772,7 @@ namespace FModel.Properties { } /// - /// Recherche une chaîne localisée semblable à With Position. + /// Recherche une chaîne localisée semblable à Position / Value. /// public static string WithPosition { get { diff --git a/FModel/Properties/Resources.ar.resx b/FModel/Properties/Resources.ar.resx index 908836cb..4fd33401 100644 --- a/FModel/Properties/Resources.ar.resx +++ b/FModel/Properties/Resources.ar.resx @@ -139,9 +139,6 @@ It's now the most used free software to leak on Fortnite. أضف المجلد - - إضافة فاصل - AES @@ -172,9 +169,6 @@ It's now the most used free software to leak on Fortnite. Assets - - صوت - أجهزة الصوت @@ -199,9 +193,6 @@ It's now the most used free software to leak on Fortnite. شعار - - BenBot API - Bugs Report @@ -274,9 +265,6 @@ It's now the most used free software to leak on Fortnite. التصميم - - فرق - المجلدات @@ -331,18 +319,12 @@ It's now the most used free software to leak on Fortnite. خطأ - - خروج - تصدير استخراج - - استخراج المجلد - استخلاص @@ -394,12 +376,6 @@ It's now the most used free software to leak on Fortnite. اللغة الفرنسية - - ستكون اللغة المحددة هي اللغة المستخدمة لإنشاء الرموز - - - لمعلوماتك - ألعاب @@ -517,9 +493,6 @@ It's now the most used free software to leak on Fortnite. MB - - وسائل الإعلام - الحد الأدنى @@ -595,9 +568,6 @@ It's now the most used free software to leak on Fortnite. PAK Files - - Fortnite PAK files auto-detected - Parsing of {0} types isn't supported yet. @@ -619,9 +589,6 @@ It's now the most used free software to leak on Fortnite. اللغة البولندية - - Popup - اللغة البرتغالية (البرازيل) @@ -637,18 +604,12 @@ It's now the most used free software to leak on Fortnite. Rarity - - Rate Limit Exceeded - Regular Expression إعادة تحميل مفاتيح AES عند الإطلاق - - تذكر اللعبة - إزالة @@ -760,9 +721,6 @@ It's now the most used free software to leak on Fortnite. An unhandled exception occurred: {0} - - تحديث - تحديث متوفر @@ -808,9 +766,6 @@ It's now the most used free software to leak on Fortnite. استخدم Discord RPC - - احفظ المجلد - لا يوجد حاليا صورة لنسخها diff --git a/FModel/Properties/Resources.de-DE.resx b/FModel/Properties/Resources.de-DE.resx index c72ba8e9..076584d2 100644 --- a/FModel/Properties/Resources.de-DE.resx +++ b/FModel/Properties/Resources.de-DE.resx @@ -134,9 +134,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Ordner hinzufügen - - Trennzeichen hinzufügen - AES-Schlüssel @@ -251,9 +248,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Design - - Unterschied - Ordner @@ -307,18 +301,12 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Fehler - - Schließen - Exportieren Extrahieren - - Ordner extrahieren - Ausgabe @@ -371,12 +359,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Französisch - - Die ausgewählte Sprache wird zur Erstellung von Icons benutzt - - - Zur Information: - Spiele @@ -479,9 +461,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Ganzes Wort überprüfen Find & Replace Window - - Medien - Minimalistisch Rarity Design @@ -548,9 +527,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake PAK-Dateien - - Fortnite PAK-Dateien wurden automatisch erkannt - Das Parsen von {0}-Typen wird noch nicht unterstützt @@ -574,10 +550,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Polnisch - - Pop-up - Rarity Design - Portugiesisch (Brasilien) @@ -594,15 +566,9 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Seltenheit - - Rate Limit überschritten - AES-Schlüssel beim Start neuladen - - Spiel merken - Ordner entfernen @@ -719,9 +685,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Eine nicht behandelte Ausnahme ist aufgetreten: {0} - - Aktualisieren - Verwende Farben aus dem Spiel @@ -765,9 +728,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake AES - - Audio - Audio Player @@ -780,9 +740,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Banner - - BenBot API - Discord Server @@ -843,9 +800,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Discord RPC benutzen - - Speicherordner - Es gibt aktuell kein Bild zum kopieren diff --git a/FModel/Properties/Resources.es.resx b/FModel/Properties/Resources.es.resx index d7e6455d..d4602912 100644 --- a/FModel/Properties/Resources.es.resx +++ b/FModel/Properties/Resources.es.resx @@ -137,9 +137,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Añadir directorio - - Añadir separador - AES Do not change this @@ -186,9 +183,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Assets - - Audio - Dispositivos de Audio @@ -218,9 +212,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Encabezado - - BenBot API - ..\Resources\bug.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -326,9 +317,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Diseño - - Diferencia - Directorios @@ -403,18 +391,12 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Error - - Salir - Exportar Extraer - - Extraer directorio - Extracción @@ -497,12 +479,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Francés - - El idioma selecciona será utilizado para la creación de iconos. - - - Para tu información: - ..\Resources\gamepad-variant.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -659,9 +635,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. MB MegaByte - - Media - Minimalista Rarity Design @@ -741,9 +714,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Archivos PAK - - Archivos PAK de Fortnite detectados automáticamente - El análisis del tipo {0} aún no es soportado. @@ -782,10 +752,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Polaco - - Ventana emergente - Rarity Design - Portugués (Brasil) @@ -808,9 +774,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Rareza - - Límite de Consultas Excedido - ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -821,9 +784,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Recargar Claves AES al iniciar - - Recordar juego - Remover @@ -988,9 +948,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Ha ocurrido una excepción: {0} - - Actualización - Usar colores del juego diff --git a/FModel/Properties/Resources.fr-FR.resx b/FModel/Properties/Resources.fr-FR.resx index e5451ff3..fc3eab99 100644 --- a/FModel/Properties/Resources.fr-FR.resx +++ b/FModel/Properties/Resources.fr-FR.resx @@ -137,9 +137,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Ajouter un Répertoire - - Ajouter un Séparateur - AES Do not change this @@ -173,9 +170,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Assets - - Audio - Périphériques Audio @@ -202,9 +196,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Bannière - - API BenBot - Signaler un Bug @@ -280,9 +271,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Design - - Différence - Répertoires @@ -339,18 +327,12 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Erreur - - Sortie - Exporter Extraire - - Extraire le Répertoire - Extraction @@ -406,12 +388,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Français - - La langue sélectionnée sera celle utilisée pour la création des icônes - - - Pour Information : - Jeux @@ -535,9 +511,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite.Mo MegaByte - - Média - Minimaliste Rarity Design @@ -617,9 +590,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Fichiers PAK - - Les fichiers PAK de Fortnite ont été détectés automatiquement - L'analyse des types {0} n'est pas encore prise en charge. @@ -643,10 +613,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Polonais - - Contextuel - Rarity Design - Portugais (Brésil) @@ -663,9 +629,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Rareté - - Limite de Taux Dépassée - Expression Régulière Find & Replace Window @@ -673,9 +636,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Recharger les clés AES au lancement - - Se souvenir du jeu - Supprimer @@ -798,9 +758,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Une exception non gérée s'est produite: {0} - - Mise à Jour - Utiliser les couleurs du jeu @@ -850,9 +807,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Utiliser Discord RPC - - Sauvegarder le Répertoire - Copier l'Image @@ -868,7 +822,4 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Type de JSON - - Avec Position - \ No newline at end of file diff --git a/FModel/Properties/Resources.it-IT.resx b/FModel/Properties/Resources.it-IT.resx index 18025527..732653b3 100644 --- a/FModel/Properties/Resources.it-IT.resx +++ b/FModel/Properties/Resources.it-IT.resx @@ -136,9 +136,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Aggiungi Directory - - Aggiungi Separatore - AES @@ -169,9 +166,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Assets - - Audio - Periferica Audio @@ -196,9 +190,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Banner - - BenBot API - Segnala un bug @@ -268,9 +259,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Design - - Differenza - Directories @@ -325,18 +313,12 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Errore - - Esci - Esporta Estrai - - Estrai directory - Estrazione @@ -388,12 +370,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Francese - - La lingua selezionata è la stessa che sarà utilizzata per la creazione delle icone - - - Per tua informazione: - Giochi @@ -511,9 +487,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia MB - - Media - Minimalista @@ -589,9 +562,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Files PAK - - I files PAK di Fortnite saranno automaticamente rilevati - L'analisi dei tipi {0} non è ancora supportata @@ -613,9 +583,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Polacco - - Popup - Portoghese (Brasile) @@ -631,18 +598,12 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Rarità - - Limite sorpassato - Espressione Regolare Ricarica le chiavi AES all'avvio - - Ricorda gioco - Rimuovi @@ -754,9 +715,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Si è verificato un errore non previsto: {0} - - Aggiorna - Usa i colori di gioco @@ -808,9 +766,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Usa Discord RPC - - Salva Directory - Copia Immagine diff --git a/FModel/Properties/Resources.ja-JP.resx b/FModel/Properties/Resources.ja-JP.resx index 9d37640a..3b049156 100644 --- a/FModel/Properties/Resources.ja-JP.resx +++ b/FModel/Properties/Resources.ja-JP.resx @@ -168,9 +168,6 @@ フランス語 - - BenBot API - ドイツ語 @@ -234,9 +231,6 @@ 不具合を報告 - - アップデート - 韓国語 @@ -330,9 +324,6 @@ {0}のダウンロード中にエラーが発生しました - - 選択した言語はアイコンの作成に使用される言語になります - 初期化中 @@ -345,9 +336,6 @@ チャレンジのテーマクリエイター - - 違う - ダイナミックキー @@ -505,9 +493,6 @@ '{0}'は'{1}'では機能しません - - オーディオ - アセット @@ -517,9 +502,6 @@ ゲーム - - メディア - クリア @@ -535,9 +517,6 @@ スケール - - ポップアップ - {0}タイプの解析はまだサポートされていません。 @@ -550,9 +529,6 @@ {0}を分析しています - - セパレータを追加 - オーディオプレイヤー @@ -571,9 +547,6 @@ 無効 - - レート制限を超えました - 日本語 @@ -583,9 +556,6 @@ ファイルが見つかりません、チャレンジのカスタムテーマは無効です - - 自動検出されたフォートナイト PAKファイル - ファイルが見つかりません、透かしは無効になっています @@ -601,9 +571,6 @@ セカンダリー - - ディレクトリを抽出 - ロシア語 @@ -625,9 +592,6 @@ 変更ログ - - ご参考までに: - 読み込みモード @@ -643,9 +607,6 @@ 不透明度 - - ゲームを覚える - で検索: @@ -757,9 +718,6 @@ 待つ - - 終了 - 自動 diff --git a/FModel/Properties/Resources.resx b/FModel/Properties/Resources.resx index 55b88c9b..5b4f05c6 100644 --- a/FModel/Properties/Resources.resx +++ b/FModel/Properties/Resources.resx @@ -137,9 +137,6 @@ It's now the most used free software to leak on Fortnite. Add Directory - - Add Separator - AES Do not change this @@ -186,9 +183,6 @@ It's now the most used free software to leak on Fortnite. Assets - - Audio - Audio Devices @@ -218,9 +212,6 @@ It's now the most used free software to leak on Fortnite. Banner - - BenBot API - ..\Resources\bug.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -333,9 +324,6 @@ It's now the most used free software to leak on Fortnite. Design - - Difference - Directories @@ -416,18 +404,12 @@ It's now the most used free software to leak on Fortnite. Error - - Exit - Export Extract - - Extract Directory - Extraction @@ -510,12 +492,6 @@ It's now the most used free software to leak on Fortnite. French - - The selected language will be the one used for icons creation - - - FYI: - ..\Resources\gamepad-variant.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -672,9 +648,6 @@ It's now the most used free software to leak on Fortnite. MB MegaByte - - Media - Minimalist Rarity Design @@ -754,9 +727,6 @@ It's now the most used free software to leak on Fortnite. PAK Files - - Fortnite PAK files auto-detected - Parsing of {0} types isn't supported yet. @@ -795,10 +765,6 @@ It's now the most used free software to leak on Fortnite. Polish - - Popup - Rarity Design - Portuguese (Brazil) @@ -821,9 +787,6 @@ It's now the most used free software to leak on Fortnite. Rarity - - Rate Limit Exceeded - ..\Resources\refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -834,9 +797,6 @@ It's now the most used free software to leak on Fortnite. Reload AES keys at launch - - Remember game - Remove @@ -976,12 +936,9 @@ It's now the most used free software to leak on Fortnite. • EN: Asval#2291 • FR: Asval#2291 -• DE: FunGames#6822 • IT: Angry Cat#5581 +• DE: FunGames#6822 • IT: arianaglande#5581 • ES: Maiky.M#9879 • AR: PsychoPast#0001 -• JA: FNJPNews#7820 • KO: -• PL: • PT-BR: -• RU: Seawod#4311 • TR: -• ZH-CN: • ZH-Hant: +• JA: FNJPNews#7820 • RU: Seawod#4311 Do not translate @@ -1011,9 +968,6 @@ It's now the most used free software to leak on Fortnite. An unhandled exception occurred: {0} - - Update - Use game colors @@ -1085,9 +1039,6 @@ It's now the most used free software to leak on Fortnite. Use Discord RPC Should Discord Rich Presence be enabled? - - Save Directory - Copy Image @@ -1103,9 +1054,6 @@ It's now the most used free software to leak on Fortnite. ..\Resources\EIconDesign_NoBackground.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Export Directory - ..\Resources\borderlands3.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -1113,6 +1061,6 @@ It's now the most used free software to leak on Fortnite. JSON Type - With Position + Position / Value \ No newline at end of file diff --git a/FModel/Properties/Resources.ru-RU.resx b/FModel/Properties/Resources.ru-RU.resx index b1612cce..3be1a866 100644 --- a/FModel/Properties/Resources.ru-RU.resx +++ b/FModel/Properties/Resources.ru-RU.resx @@ -147,9 +147,6 @@ Арабский - - Аудио - Звуковые устройства @@ -168,9 +165,6 @@ Баннер - - BenBot API - Сообщить об ошибке @@ -279,9 +273,6 @@ Ошибка - - Выход - Экспортировать @@ -327,9 +318,6 @@ Французкий - - Выбранный язык будет использоваться во время создания иконок - Игры @@ -420,9 +408,6 @@ MB - - Медиафайлы - Минималистичный @@ -477,9 +462,6 @@ Файлы паков - - Файлы паков Фортнайта автоматически найдены - .PAK файлы обнаружены автоматически @@ -504,9 +486,6 @@ Обновлять ключи AES во время запуска программы - - Запомнить игру - Удалить @@ -597,9 +576,6 @@ Турецкий - - Обновить - Доступно обновление @@ -645,9 +621,6 @@ Вы собираетесь загрузить {0}, размер которого {1} - - Добавить перегородку - Анализ {0} @@ -672,9 +645,6 @@ Помощники - - Отличающиеся - Путь директории @@ -687,9 +657,6 @@ Извлечь - - Открыть директорию - Извлечение @@ -747,9 +714,6 @@ FModel требует перезапуска, потому что вы указали новый путь - - Всплывающее - Обработка @@ -774,18 +738,12 @@ Использовать Discord RPC - - Сохранить дерикторию - Нет изображения для копирования Скопировать изображение - - Для Вашей информации: - Использовать FModel на Английском diff --git a/FModel/Properties/Settings.Designer.cs b/FModel/Properties/Settings.Designer.cs index 5fe6af11..286cc008 100644 --- a/FModel/Properties/Settings.Designer.cs +++ b/FModel/Properties/Settings.Designer.cs @@ -287,6 +287,18 @@ namespace FModel.Properties { } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public long ProgramLanguage { + get { + return ((long)(this["ProgramLanguage"])); + } + set { + this["ProgramLanguage"] = value; + } + } + [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("0")] @@ -323,18 +335,6 @@ namespace FModel.Properties { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseEnglish { - get { - return ((bool)(this["UseEnglish"])); - } - set { - this["UseEnglish"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("False")] diff --git a/FModel/Properties/Settings.settings b/FModel/Properties/Settings.settings index 6c9430e4..70b738c8 100644 --- a/FModel/Properties/Settings.settings +++ b/FModel/Properties/Settings.settings @@ -68,6 +68,9 @@ [{"Header":"Cosmetics","DirectoryPath":"FortniteGame/Content/Athena/Items/Cosmetics/"},{"Header":"Challenges","DirectoryPath":"FortniteGame/Content/Athena/Items/ChallengeBundles/"},{"Header":"Emotes [Audio]","DirectoryPath":"FortniteGame/Content/Athena/Sounds/Emotes/"},{"Header":"Music Packs [Audio]","DirectoryPath":"FortniteGame/Content/Athena/Sounds/MusicPacks/"},{"Header":"Weapons","DirectoryPath":"FortniteGame/Content/Athena/Items/Weapons/"},{"Header":"Strings","DirectoryPath":"FortniteGame/Content/Localization/"}] + + 0 + 0 @@ -77,9 +80,6 @@ 0 - - False - False diff --git a/FModel/Utils/Assets.cs b/FModel/Utils/Assets.cs index ab04b96b..6bc1ba68 100644 --- a/FModel/Utils/Assets.cs +++ b/FModel/Utils/Assets.cs @@ -244,7 +244,7 @@ namespace FModel.Utils // Image Creator if (Globals.Game.ActualGame == EGame.Fortnite && TryDrawFortniteIcon(entry.Name, p.ExportTypes[0].String, p.Exports[0])) return p; - else if (Globals.Game.ActualGame == EGame.Valorant && TryDrawValorantIcon(entry.Name, p.Exports.Length > 1 ? p.Exports[1] : p.Exports[0])) + else if (Globals.Game.ActualGame == EGame.Valorant && TryDrawValorantIcon(entry.Name, p.ExportTypes.Length > 1 ? p.ExportTypes[1].String : p.ExportTypes[0].String, p.Exports.Length > 1 ? p.Exports[1] : p.Exports[0])) return p; } diff --git a/FModel/ViewModels/ComboBox/ComboBoxViewModel.cs b/FModel/ViewModels/ComboBox/ComboBoxViewModel.cs index 2bb4c466..51c3722b 100644 --- a/FModel/ViewModels/ComboBox/ComboBoxViewModel.cs +++ b/FModel/ViewModels/ComboBox/ComboBoxViewModel.cs @@ -2,8 +2,47 @@ namespace FModel.ViewModels.ComboBox { + static class ProgramLang + { + private static readonly string _Default = "en-US"; + private static readonly string _French = "fr-FR"; + private static readonly string _German = "de-DE"; + private static readonly string _Italian = "it-IT"; + private static readonly string _Spanish = "es"; + private static readonly string _Arabic = "ar"; + private static readonly string _Japanese = "ja-JP"; + private static readonly string _Russian = "ru-RU"; + + public static string GetProgramLang() + { + return Properties.Settings.Default.ProgramLanguage switch + { + 7 => _Russian, + 6 => _Japanese, + 5 => _Arabic, + 4 => _Spanish, + 3 => _Italian, + 2 => _German, + 1 => _French, + _ => _Default + }; + } + } + static class ComboBoxVm { + public static ObservableCollection programLanguageCbViewModel = new ObservableCollection + { + new ComboBoxViewModel { Id = 0, Content = Properties.Resources.English }, + new ComboBoxViewModel { Id = 1, Content = Properties.Resources.French }, + new ComboBoxViewModel { Id = 2, Content = Properties.Resources.German }, + new ComboBoxViewModel { Id = 3, Content = Properties.Resources.Italian }, + new ComboBoxViewModel { Id = 4, Content = Properties.Resources.Spanish }, + new ComboBoxViewModel { Id = 5, Content = Properties.Resources.Arabic }, + new ComboBoxViewModel { Id = 6, Content = Properties.Resources.Japanese }, + new ComboBoxViewModel { Id = 7, Content = Properties.Resources.Russian } + }; + public static ObservableCollection languageCbViewModel = new ObservableCollection { new ComboBoxViewModel { Id = 0, Content = Properties.Resources.English, Property = ELanguage.English }, diff --git a/FModel/Windows/Settings/ChallengeBundlesCreator.xaml.cs b/FModel/Windows/Settings/ChallengeBundlesCreator.xaml.cs index 672ae920..111100e9 100644 --- a/FModel/Windows/Settings/ChallengeBundlesCreator.xaml.cs +++ b/FModel/Windows/Settings/ChallengeBundlesCreator.xaml.cs @@ -1,13 +1,11 @@ -using FModel.Creator; -using FModel.Creator.Bundles; +using FModel.Creator.Bundles; +using FModel.Creator.Fortnite; using FModel.Logger; -using FModel.Utils; using FModel.Windows.ColorPicker; using Microsoft.Win32; using SkiaSharp; using System; using System.Windows; -using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; diff --git a/FModel/Windows/Settings/General.xaml b/FModel/Windows/Settings/General.xaml index e4222dad..69685a58 100644 --- a/FModel/Windows/Settings/General.xaml +++ b/FModel/Windows/Settings/General.xaml @@ -16,6 +16,7 @@ + @@ -26,7 +27,42 @@ - + + + + + + + + + + + + + + + + + + + + @@ -51,7 +87,7 @@ - + @@ -76,7 +112,7 @@ - + @@ -111,26 +147,19 @@ - - - - - - -