From 43eef319594d6bd690176a1fa56ee8e1c36e763c Mon Sep 17 00:00:00 2001 From: Asval Date: Wed, 22 May 2019 23:34:10 +0200 Subject: [PATCH] additional image to wrap weapon render --- FModel/MainWindow.cs | 17 +++++++++++++++++ FModel/Methods/JohnWick/JohnWick.cs | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index 660a7b6c..a0dc1d2b 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -1507,6 +1507,23 @@ namespace FModel AppendText("Cosmetics.Source ", Color.SteelBlue); AppendText("found", Color.Black, true); } //COSMETIC SOURCE + if (theItem.ExportType == "AthenaItemWrapDefinition" && Checking.WasFeatured && ItemIconPath.Contains("WeaponRenders")) //ONLY TRIGGER IF THE WEAPON RENDER IS TRIGGERED + { + string wrapAddImg = theItem.LargePreviewImage.AssetPathName.Substring(theItem.LargePreviewImage.AssetPathName.LastIndexOf(".", StringComparison.Ordinal) + 1); + + UpdateConsole("Additional image " + wrapAddImg, Color.FromArgb(255, 244, 132, 66), "Waiting"); + ItemIconPath = JohnWick.AssetToTexture2D(wrapAddImg); + + if (File.Exists(ItemIconPath)) + { + Image itemIcon; + using (var bmpTemp = new Bitmap(ItemIconPath)) + { + itemIcon = new Bitmap(bmpTemp); + } + g.DrawImage(Forms.Settings.ResizeImage(itemIcon, 122, 122), new Point(395, 282)); + } + } } if (specialMode == "consAndWeap") { diff --git a/FModel/Methods/JohnWick/JohnWick.cs b/FModel/Methods/JohnWick/JohnWick.cs index fccb9df1..16dc05f8 100644 --- a/FModel/Methods/JohnWick/JohnWick.cs +++ b/FModel/Methods/JohnWick/JohnWick.cs @@ -72,7 +72,7 @@ namespace FModel string TexturePath = string.Empty; - if (textureFilePath != null && (textureFilePath.Contains("MI_UI_FeaturedRenderSwitch_") || textureFilePath.Contains("M_UI_ChallengeTile_PCB") || textureFilePath.Contains("Wraps\\FeaturedMaterials\\"))) + if (textureFilePath != null && (textureFilePath.Contains("MI_UI_FeaturedRenderSwitch_") || textureFilePath.Contains("M_UI_ChallengeTile_PCB") || textureFilePath.Contains("Wraps\\FeaturedMaterials\\") || textureFilePath.Contains("M-Wraps-StreetDemon"))) { return GetRenderSwitchMaterialTexture(AssetName, textureFilePath); }