diff --git a/ASMRewriter b/ASMRewriter deleted file mode 160000 index 0369171..0000000 --- a/ASMRewriter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 036917125ab575aa58602d7b537d2fc281cfe7ad diff --git a/ASMRewriter.rar b/ASMRewriter.rar deleted file mode 100644 index 6d74199..0000000 Binary files a/ASMRewriter.rar and /dev/null differ diff --git a/TextureMod/EffectChanger.cs b/TextureMod/EffectChanger.cs old mode 100644 new mode 100755 index 93ff7d3..d6d34b1 --- a/TextureMod/EffectChanger.cs +++ b/TextureMod/EffectChanger.cs @@ -1,15 +1,16 @@ -using GameplayEntities; +using System.IO; using System.Linq; using UnityEngine; +using GameplayEntities; +using BepInEx; +using BepInEx.Configuration; namespace TextureMod { public class EffectChanger : MonoBehaviour { - public static string resourceFolder = Application.dataPath.Replace("/", @"\") + @"\Managed\TextureModResources\Images\Effects\"; - - ModMenuIntegration MMI; + public static string effectsFolder = Utility.CombinePaths(TextureMod.ResourceFolder, "Images", "Effects"); #region Parry and clash effects Texture2D parryActiveBG; @@ -27,66 +28,90 @@ public class EffectChanger : MonoBehaviour Texture2D clashBG; Texture2D clashFG; - byte parryFirstColorR = 0; - byte parryFirstColorG = 0; - byte parryFirstColorB = 0; + ConfigEntry parryFirstColorR; + ConfigEntry parryFirstColorG; + ConfigEntry parryFirstColorB; - byte parrySecondColorR = 0; - byte parrySecondColorG = 0; - byte parrySecondColorB = 0; + ConfigEntry parrySecondColorR; + ConfigEntry parrySecondColorG; + ConfigEntry parrySecondColorB; - byte parryThirdColorR = 0; - byte parryThirdColorG = 0; - byte parryThirdColorB = 0; + ConfigEntry parryThirdColorR; + ConfigEntry parryThirdColorG; + ConfigEntry parryThirdColorB; - bool enableCustomParry; + ConfigEntry enableCustomParry; #endregion private void Start() { - parryActiveBG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryActiveBG.png"); - parryActiveMG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryActiveMG.png"); - parryActiveFG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryActiveFG.png"); - - parryEndBG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryEndBG.png"); - parryEndMG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryEndMG.png"); - parryEndFG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parryEndFG.png"); - - parrySuccessBG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parrySuccessBG.png"); - parrySuccessMG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parrySuccessMG.png"); - parrySuccessFG = TextureHelper.LoadPNG(resourceFolder + @"parry\" + "parrySuccessFG.png"); - - clashBG = TextureHelper.LoadPNG(resourceFolder + @"Clash\" + "clashEffectBG.png"); - clashFG = TextureHelper.LoadPNG(resourceFolder + @"Clash\" + "clashEffectFG.png"); - } - - private void FixedUpdate() - { - if (MMI == null) MMI = TextureMod.Instance.MMI; - if (TextureMod.Instance.tc.InMenu()) - { - enableCustomParry = MMI.GetTrueFalse(MMI.configBools["(bool)enableCustomParryAndClash"]); - - parryFirstColorR = (byte)MMI.GetSliderValue("(slider)parryFirstColorR"); - parryFirstColorG = (byte)MMI.GetSliderValue("(slider)parryFirstColorG"); - parryFirstColorB = (byte)MMI.GetSliderValue("(slider)parryFirstColorB"); - - parrySecondColorR = (byte)MMI.GetSliderValue("(slider)parrySecondColorR"); - parrySecondColorG = (byte)MMI.GetSliderValue("(slider)parrySecondColorG"); - parrySecondColorB = (byte)MMI.GetSliderValue("(slider)parrySecondColorB"); - - parryThirdColorR = (byte)MMI.GetSliderValue("(slider)parryThirdColorR"); - parryThirdColorG = (byte)MMI.GetSliderValue("(slider)parryThirdColorG"); - parryThirdColorB = (byte)MMI.GetSliderValue("(slider)parryThirdColorB"); - } + string parryFolder = Path.Combine(effectsFolder, "parry"); + parryActiveBG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryActiveBG.png")); + parryActiveMG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryActiveMG.png")); + parryActiveFG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryActiveFG.png")); + + parryEndBG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryEndBG.png")); + parryEndMG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryEndMG.png")); + parryEndFG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parryEndFG.png")); + + parrySuccessBG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parrySuccessBG.png")); + parrySuccessMG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parrySuccessMG.png")); + parrySuccessFG = TextureHelper.LoadPNG(Path.Combine(parryFolder, "parrySuccessFG.png")); + + string clashFolder = Path.Combine(effectsFolder, "Clash"); + clashBG = TextureHelper.LoadPNG(Path.Combine(clashFolder, "clashEffectBG.png")); + clashFG = TextureHelper.LoadPNG(Path.Combine(clashFolder, "clashEffectFG.png")); + + + ConfigFile config = TextureMod.Instance.Config; + + config.Bind("EffectChanger", "parry_header", "Parry Settings:", "modmenu_header"); + enableCustomParry = config.Bind("EffectChanger", "enableCustomParryAndClash", false); + + parryFirstColorR = config.Bind("EffectChanger", "parryFirstColorR", 0, + new ConfigDescription("Parry's first color red amount", new AcceptableValueRange(0, 255)) + ); + parryFirstColorG = config.Bind("EffectChanger", "parryFirstColorG", 0, + new ConfigDescription("Parry's first color green amount", new AcceptableValueRange(0, 255)) + ); + parryFirstColorB = config.Bind("EffectChanger", "parryFirstColorR", 0, + new ConfigDescription("Parry's first color blue amount", new AcceptableValueRange(0, 255)) + ); + config.Bind("EffectChanger", "parry_gap1", "20", "modmenu_gap"); + + parrySecondColorR = config.Bind("EffectChanger", "parrySecondColorR", 0, + new ConfigDescription("Parry's second color red amount", new AcceptableValueRange(0, 255)) + ); + parrySecondColorG = config.Bind("EffectChanger", "parrySecondColorG", 0, + new ConfigDescription("Parry's second color green amount", new AcceptableValueRange(0, 255)) + ); + parrySecondColorB = config.Bind("EffectChanger", "parrySecondColorB", 0, + new ConfigDescription("Parry's second color blue amount", new AcceptableValueRange(0, 255)) + ); + config.Bind("EffectChanger", "parry_gap2", "20", "modmenu_gap"); + + parryThirdColorR = config.Bind("EffectChanger", "parryThirdColorR", 0, + new ConfigDescription("Parry's third color red amount", new AcceptableValueRange(0, 255)) + ); + parryThirdColorG = config.Bind("EffectChanger", "parryThirdColorG", 0, + new ConfigDescription("Parry's third color green amount", new AcceptableValueRange(0, 255)) + ); + parryThirdColorB = config.Bind("EffectChanger", "parryThirdColorB", 0, + new ConfigDescription("Parry's third color blue amount", new AcceptableValueRange(0, 255)) + ); + config.Bind("EffectChanger", "parry_gap3", "20", "modmenu_gap"); } private void Update() { - if (enableCustomParry == true) + if (enableCustomParry.Value == true) { + Color32 parryFirstColor = new Color32((byte)parryFirstColorR.Value, (byte)parryFirstColorG.Value, (byte)parryFirstColorB.Value, 255); + Color32 parrySecondColor = new Color32((byte)parrySecondColorR.Value, (byte)parrySecondColorG.Value, (byte)parrySecondColorB.Value, 255); + Color32 parryThirdColor = new Color32((byte)parryThirdColorR.Value, (byte)parryThirdColorG.Value, (byte)parryThirdColorB.Value, 255); + MeshRenderer[] mrs = FindObjectsOfType(); foreach (MeshRenderer mr in mrs) { @@ -100,9 +125,9 @@ private void Update() m3.mainTexture = parryActiveFG; Material[] mArray = new Material[] { m1, m2, m3 }; mr.materials = mArray; - mr.materials[0].color = new Color32(parryFirstColorR, parryFirstColorG, parryFirstColorB, 255); - mr.materials[1].color = new Color32(parrySecondColorR, parrySecondColorG, parrySecondColorB, 255); - mr.materials[2].color = new Color32(parryThirdColorR, parryThirdColorG, parryThirdColorB, 255); + mr.materials[0].color = parryFirstColor; + mr.materials[1].color = parrySecondColor; + mr.materials[2].color = parryThirdColor; } } @@ -121,9 +146,9 @@ private void Update() m3.mainTexture = parryEndFG; Material[] mArray = new Material[] { m1, m2, m3 }; mr.materials = mArray; - mr.materials[0].color = new Color32(parryFirstColorR, parryFirstColorG, parryFirstColorB, 255); - mr.materials[1].color = new Color32(parrySecondColorR, parrySecondColorG, parrySecondColorB, 255); - mr.materials[2].color = new Color32(parryThirdColorR, parryThirdColorG, parryThirdColorB, 255); + mr.materials[0].color = parryFirstColor; + mr.materials[1].color = parrySecondColor; + mr.materials[2].color = parryThirdColor; } } @@ -141,9 +166,9 @@ private void Update() m3.mainTexture = parrySuccessFG; Material[] mArray = new Material[] { m1, m2, m3 }; mr.materials = mArray; - mr.materials[0].color = new Color32(parryFirstColorR, parryFirstColorG, parryFirstColorB, 255); - mr.materials[1].color = new Color32(parrySecondColorR, parrySecondColorG, parrySecondColorB, 255); - mr.materials[2].color = new Color32(parryThirdColorR, parryThirdColorG, parryThirdColorB, 255); + mr.materials[0].color = parryFirstColor; + mr.materials[1].color = parrySecondColor; + mr.materials[2].color = parryThirdColor; } if (ve.name == "clashEffect") @@ -156,8 +181,8 @@ private void Update() m2.mainTexture = clashFG; Material[] mArray = new Material[] { m1, m2 }; mr.materials = mArray; - mr.materials[0].color = new Color32(parryFirstColorR, parryFirstColorG, parryFirstColorB, 255); - mr.materials[1].color = new Color32(parryThirdColorR, parryThirdColorG, parryThirdColorB, 255); + mr.materials[0].color = parryFirstColor; + mr.materials[1].color = parryThirdColor; } } } diff --git a/TextureMod/ExchangeClient.cs b/TextureMod/ExchangeClient.cs index 32bc9f1..ad6c2fc 100644 --- a/TextureMod/ExchangeClient.cs +++ b/TextureMod/ExchangeClient.cs @@ -40,7 +40,7 @@ public IEnumerator GetSkin(string peerId) string characterVariant = rets[1]; string skin = rets[2]; byte[] imageData = Convert.FromBase64String(skin); - File.WriteAllBytes(Application.dataPath.Replace("/", @"\") + @"\Managed\TextureModResources\Images\opponent.png", imageData); + File.WriteAllBytes(BepInEx.Utility.CombinePaths(TextureMod.ResourceFolder, "Images", "opponent.png"), imageData); TextureMod.Instance.tc.newSkinToApply = true; TextureMod.Instance.tc.debug[3] = "Got non null skin and set newSkinToApply to true"; TextureMod.Instance.tc.opponentCustomSkinCharacter = (Character)Enum.Parse(typeof(Character), character); diff --git a/TextureMod/Libs/0Harmony.dll b/TextureMod/Libs/0Harmony.dll new file mode 120000 index 0000000..689e200 --- /dev/null +++ b/TextureMod/Libs/0Harmony.dll @@ -0,0 +1 @@ +../../../../../BepInEx/BepInEx/core/0Harmony.dll \ No newline at end of file diff --git a/TextureMod/Libs/Assembly-CSharp.dll b/TextureMod/Libs/Assembly-CSharp.dll new file mode 120000 index 0000000..27d2849 --- /dev/null +++ b/TextureMod/Libs/Assembly-CSharp.dll @@ -0,0 +1 @@ +../../../../llb_dlls/Assembly-CSharp.dll \ No newline at end of file diff --git a/TextureMod/Libs/BepInEx.Harmony.dll b/TextureMod/Libs/BepInEx.Harmony.dll new file mode 120000 index 0000000..0cfd90d --- /dev/null +++ b/TextureMod/Libs/BepInEx.Harmony.dll @@ -0,0 +1 @@ +../../../../../BepInEx/BepInEx/core/BepInEx.Harmony.dll \ No newline at end of file diff --git a/TextureMod/Libs/BepInEx.dll b/TextureMod/Libs/BepInEx.dll new file mode 120000 index 0000000..0aefcee --- /dev/null +++ b/TextureMod/Libs/BepInEx.dll @@ -0,0 +1 @@ +../../../../../BepInEx/BepInEx/core/BepInEx.dll \ No newline at end of file diff --git a/TextureMod/Libs/LLBModdingLib.dll b/TextureMod/Libs/LLBModdingLib.dll new file mode 120000 index 0000000..63b9e3f --- /dev/null +++ b/TextureMod/Libs/LLBModdingLib.dll @@ -0,0 +1 @@ +../../../LLBModdingLib/LLBModdingLib/bin/Release/LLBModdingLib.dll \ No newline at end of file diff --git a/TextureMod/Libs/ModMenu.dll b/TextureMod/Libs/ModMenu.dll new file mode 120000 index 0000000..6446bed --- /dev/null +++ b/TextureMod/Libs/ModMenu.dll @@ -0,0 +1 @@ +../../../../mod_src/ModMenu/ModMenu/bin/Release/ModMenu.dll \ No newline at end of file diff --git a/TextureMod/Libs/TextMeshPro.dll b/TextureMod/Libs/TextMeshPro.dll new file mode 120000 index 0000000..2e1451a --- /dev/null +++ b/TextureMod/Libs/TextMeshPro.dll @@ -0,0 +1 @@ +../../../../llb_dlls/TextMeshPro.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.AnimationModule.dll b/TextureMod/Libs/UnityEngine.AnimationModule.dll new file mode 120000 index 0000000..c4ea456 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.AnimationModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.AnimationModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.CoreModule.dll b/TextureMod/Libs/UnityEngine.CoreModule.dll new file mode 120000 index 0000000..e4b7cbe --- /dev/null +++ b/TextureMod/Libs/UnityEngine.CoreModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.CoreModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.IMGUIModule.dll b/TextureMod/Libs/UnityEngine.IMGUIModule.dll new file mode 120000 index 0000000..279cd98 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.IMGUIModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.IMGUIModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.ImageConversionModule.dll b/TextureMod/Libs/UnityEngine.ImageConversionModule.dll new file mode 120000 index 0000000..d7469e1 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.ImageConversionModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.ImageConversionModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.PhysicsModule.dll b/TextureMod/Libs/UnityEngine.PhysicsModule.dll new file mode 120000 index 0000000..11f7cfb --- /dev/null +++ b/TextureMod/Libs/UnityEngine.PhysicsModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.PhysicsModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.TextCoreModule.dll b/TextureMod/Libs/UnityEngine.TextCoreModule.dll new file mode 120000 index 0000000..a78ec8e --- /dev/null +++ b/TextureMod/Libs/UnityEngine.TextCoreModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.TextCoreModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.TextRenderingModule.dll b/TextureMod/Libs/UnityEngine.TextRenderingModule.dll new file mode 120000 index 0000000..e35bcd2 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.TextRenderingModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.TextRenderingModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.UnityWebRequestModule.dll b/TextureMod/Libs/UnityEngine.UnityWebRequestModule.dll new file mode 120000 index 0000000..34cf523 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.UnityWebRequestModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.UnityWebRequestModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.UnityWebRequestWWWModule.dll b/TextureMod/Libs/UnityEngine.UnityWebRequestWWWModule.dll new file mode 120000 index 0000000..1b698d1 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.UnityWebRequestWWWModule.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.UnityWebRequestWWWModule.dll \ No newline at end of file diff --git a/TextureMod/Libs/UnityEngine.dll b/TextureMod/Libs/UnityEngine.dll new file mode 120000 index 0000000..4e87fd9 --- /dev/null +++ b/TextureMod/Libs/UnityEngine.dll @@ -0,0 +1 @@ +../../../../llb_dlls/UnityEngine.dll \ No newline at end of file diff --git a/TextureMod/ModDebugging.cs b/TextureMod/ModDebugging.cs index d765afb..5eda4ef 100644 --- a/TextureMod/ModDebugging.cs +++ b/TextureMod/ModDebugging.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using UnityEngine; namespace TextureMod @@ -17,7 +16,7 @@ public class ModDebugging : MonoBehaviour private void OnGUI() { - if (TextureMod.Instance.tc.showDebugInfo) + if (TextureMod.Instance.tc.showDebugInfo.Value) { GUIStyle ss = new GUIStyle("Box"); diff --git a/TextureMod/ModMenuIntegration.cs b/TextureMod/ModMenuIntegration.cs deleted file mode 100644 index 42ade72..0000000 --- a/TextureMod/ModMenuIntegration.cs +++ /dev/null @@ -1,236 +0,0 @@ -// Script used to connect to ModMenu -using System.Collections.Generic; -using UnityEngine; -using LLModMenu; -using System.IO; -using System; - -namespace TextureMod -{ - public class ModMenuIntegration : MonoBehaviour - { - private ModMenu mm; - private bool mmAdded = false; - - public Dictionary configKeys = new Dictionary(); - public Dictionary configBools = new Dictionary(); - public Dictionary configInts = new Dictionary(); - public Dictionary configSliders = new Dictionary(); - public Dictionary configHeaders = new Dictionary(); - public Dictionary configGaps = new Dictionary(); - public Dictionary configText = new Dictionary(); - public List writeQueue = new List(); - - private void Start() - { - InitConfig(); - ReadIni(); - } - - private void Update() - { - mm = FindObjectOfType(); - if (mm != null) - { - if (mmAdded == false) - { - mm.mods.Add(base.gameObject.name); - mmAdded = true; - } - } - } - - private void InitConfig() - { - /* - * Mod menu now uses a single function to add options etc. (AddToWriteQueue) - * your specified options should be added to this function in the same format as stated under - * - Keybindings: - AddToWriteQueue("(key)keyName", "LeftShift"); value can be: Any KeyCode as a string e.g. "LeftShift" - - Options: - AddToWriteQueue("(bool)boolName", "true"); value can be: ["true" | "false"] - AddToWriteQueue("(int)intName", "27313"); value can be: any number as a string. For instance "123334" - AddToWriteQueue("(slider)sliderName", "50|0|100"); value must be: "Default value|Min Value|MaxValue" - AddToWriteQueue("(header)headerName", "Header Text"); value can be: Any string - AddToWriteQueue("(gap)gapName", "identifier"); value does not matter, just make name and value unique from other gaps - - ModInformation: - AddToWriteQueue("(text)text1", "Descriptive text"); value can be: Any string - */ - - - // Insert your options here \/ - AddToWriteQueue("(key)enableSkinChanger", "LeftShift"); - AddToWriteQueue("(key)nextSkin", "Mouse0"); - AddToWriteQueue("(key)previousSkin", "Mouse3"); - AddToWriteQueue("(key)cancelOpponentCustomSkin", "A"); - AddToWriteQueue("(key)reloadEntireSkinLibrary", "F9"); - AddToWriteQueue("(key)reloadCustomSkin", "F5"); - - AddToWriteQueue("(key)enterShowcaseStudio", "Tab"); - AddToWriteQueue("(key)showcaseStudioHideHud", "F3"); - AddToWriteQueue("(key)showcaseStudioRotateCharacter", "Mouse0"); - AddToWriteQueue("(key)showcaseStudioMoveCamera", "Mouse2"); - AddToWriteQueue("(key)showcaseStudioMoveLight", "Mouse3"); - - - AddToWriteQueue("(header)h1", "Lobby Settings:"); - AddToWriteQueue("(bool)noHoldMode", "false"); - AddToWriteQueue("(bool)neverApplyOpponentsSkin", "false"); - AddToWriteQueue("(bool)lockButtonsOnRandom", "true"); - AddToWriteQueue("(bool)assignFirstSkinOnCharacterSelection", "false"); - AddToWriteQueue("(gap)1", "1"); - AddToWriteQueue("(header)h2", "Real-time Skin editing:"); - AddToWriteQueue("(bool)reloadCustomSkinOnInterval", "true"); - AddToWriteQueue("(slider)skinReloadIntervalInFrames", "60|10|600"); - AddToWriteQueue("(gap)2", "2"); - AddToWriteQueue("(header)h3", "General:"); - AddToWriteQueue("(bool)showDebugInfo", "false"); - AddToWriteQueue("(gap)3", "2"); - AddToWriteQueue("(header)h4", "Parry Color:"); - AddToWriteQueue("(bool)enableCustomParryAndClash", "true"); - AddToWriteQueue("(slider)parryFirstColorR", "2|0|255"); - AddToWriteQueue("(slider)parryFirstColorG", "205|0|255"); - AddToWriteQueue("(slider)parryFirstColorB", "239|0|255"); - AddToWriteQueue("(gap)4", "2"); - AddToWriteQueue("(slider)parrySecondColorR", "0|0|255"); - AddToWriteQueue("(slider)parrySecondColorG", "152|0|255"); - AddToWriteQueue("(slider)parrySecondColorB", "194|0|255"); - AddToWriteQueue("(gap)5", "2"); - AddToWriteQueue("(slider)parryThirdColorR", "255|0|255"); - AddToWriteQueue("(slider)parryThirdColorG", "255|0|255"); - AddToWriteQueue("(slider)parryThirdColorB", "255|0|255"); - - AddToWriteQueue("(text)text3", "Wondering how to assign skins and in what part of the game you can do so?"); - AddToWriteQueue("(text)text4", "Simply hold the 'Enable Skin Changer' button and press either the `Next skin` or the `Previous Skin` buttons to cycle skins"); - AddToWriteQueue("(text)text5", "Skins can be assigned in Ranked Lobbies, 1v1 Lobbies, FFA Lobbies(Only for player 1 and 2) and in the skin unlock screen for a character or in ShowcaseStudio"); - AddToWriteQueue("(text)text6", "If you select random in the lobby and try to assign a custom skin you will be given a random character and random skin. In online lobbies you will be set to ready, and your buttons will become unavailable unless you've deactivated 'Lock Buttons On Random'"); - AddToWriteQueue("(text)text7", " "); - AddToWriteQueue("(text)text8", "If you wish to real time edit your skins, use the F5 button to reload your skin whenever you're in training mode or in the character skin unlock screen"); - AddToWriteQueue("(text)text9", "You can also enable the interval mode and have it automatically reload the current custom skin every so often. Great for dual screen, or windowed mode setups (Does not work in training mode)"); - AddToWriteQueue("(text)text1", "This mod was written by MrGentle"); - ModMenu.Instance.WriteIni(gameObject.name, writeQueue, configKeys, configBools, configInts, configSliders, configHeaders, configGaps, configText); - writeQueue.Clear(); - } - - public void ReadIni() - { - string[] lines = File.ReadAllLines(Directory.GetParent(Application.dataPath).FullName + @"\ModSettings\" + gameObject.name + ".ini"); - configBools.Clear(); - configKeys.Clear(); - configInts.Clear(); - configSliders.Clear(); - configHeaders.Clear(); - configGaps.Clear(); - configText.Clear(); - foreach (string line in lines) - { - if (line.StartsWith("(key)")) - { - string[] split = line.Split('='); - configKeys.Add(split[0], split[1]); - } - else if (line.StartsWith("(bool)")) - { - string[] split = line.Split('='); - configBools.Add(split[0], split[1]); - } - else if (line.StartsWith("(int)")) - { - string[] split = line.Split('='); - configInts.Add(split[0], split[1]); - } - else if (line.StartsWith("(slider)")) - { - string[] split = line.Split('='); - configSliders.Add(split[0], split[1]); - } - else if (line.StartsWith("(header)")) - { - string[] split = line.Split('='); - configHeaders.Add(split[0], split[1]); - } - else if (line.StartsWith("(gap)")) - { - string[] split = line.Split('='); - configGaps.Add(split[0], split[1]); - } - else if (line.StartsWith("(text)")) - { - string[] split = line.Split('='); - configText.Add(split[0], split[1]); - } - } - } - - public void AddToWriteQueue(string key, string value) - { - if (key.StartsWith("(key)")) - { - configKeys.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(bool)")) - { - configBools.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(int)")) - { - configInts.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(slider)")) - { - configSliders.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(header)")) - { - configHeaders.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(gap)")) - { - configGaps.Add(key, value); - writeQueue.Add(key); - } - else if (key.StartsWith("(text)")) - { - configText.Add(key, value); - writeQueue.Add(key); - } - } - - public KeyCode GetKeyCode(string keyCode) - { - foreach (KeyCode vKey in System.Enum.GetValues(typeof(KeyCode))) - { - if (vKey.ToString() == keyCode) - { - return vKey; - } - } - return KeyCode.A; - } - - public bool GetTrueFalse(string boolName) - { - if (boolName == "true") return true; - else return false; - } - - public int GetSliderValue(string sliderName) - { - string[] vals = configSliders[sliderName].Split('|'); - return Convert.ToInt32(vals[0]); - } - - public int GetInt(string intName) - { - return Convert.ToInt32(configInts[intName]); - } - } -} \ No newline at end of file diff --git a/TextureMod/PluginInfos.cs b/TextureMod/PluginInfos.cs new file mode 100755 index 0000000..1b34077 --- /dev/null +++ b/TextureMod/PluginInfos.cs @@ -0,0 +1,47 @@ +using System.Reflection; +using TextureMod; + +#region Assembly attributes +/* + * These attributes define various metainformation of the generated DLL. + * In general, you don't need to touch these. Instead, edit the values in PluginInfos. + */ +[assembly: AssemblyVersion(PluginInfos.PLUGIN_VERSION)] +[assembly: AssemblyTitle(PluginInfos.PLUGIN_NAME + " (" + PluginInfos.PLUGIN_ID + ")")] +[assembly: AssemblyProduct(PluginInfos.PLUGIN_NAME)] +#endregion + +namespace TextureMod +{ + /// + /// The main metadata of the plugin. + /// This information is used for BepInEx plugin metadata. + /// + /// + /// See also description of BepInEx metadata: + /// https://bepinex.github.io/bepinex_docs/master/articles/dev_guide/plugin_tutorial/2_plugin_start.html#basic-information-about-the-plug-in + /// + internal static class PluginInfos + { + /// + /// Human-readable name of the plugin. In general, it should be short and concise. + /// This is the name that is shown to the users who run BepInEx and to modders that inspect BepInEx logs. + /// + public const string PLUGIN_NAME = "TextureMod"; + + /// + /// Unique ID of the plugin. + /// This must be a unique string that contains only characters a-z, 0-9 underscores (_) and dots (.) + /// Prefer using the reverse domain name notation: https://eqdn.tech/reverse-domain-notation/ + /// + /// When creating Harmony patches, prefer using this ID for Harmony instances as well. + /// + public const string PLUGIN_ID = "no.mrgentle.plugins.llb.texturemod"; + + /// + /// Version of the plugin. Must be in form .... + /// Major and minor versions are mandatory, but build and revision can be left unspecified. + /// + public const string PLUGIN_VERSION = "2.0.0"; + } +} \ No newline at end of file diff --git a/TextureMod/Properties/AssemblyInfo.cs b/TextureMod/Properties/AssemblyInfo.cs index 9bd4e87..b1fbabf 100644 --- a/TextureMod/Properties/AssemblyInfo.cs +++ b/TextureMod/Properties/AssemblyInfo.cs @@ -5,12 +5,8 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("TextureMod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("TextureMod")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +28,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/TextureMod/ShowcaseStudio.cs b/TextureMod/ShowcaseStudio.cs index 874c0e4..8886d08 100644 --- a/TextureMod/ShowcaseStudio.cs +++ b/TextureMod/ShowcaseStudio.cs @@ -1,18 +1,21 @@ -using LLHandlers; -using LLScreen; + using System; using System.Collections.Generic; using UnityEngine; +using LLHandlers; +using LLScreen; +using BepInEx.Configuration; +using LLBML; namespace TextureMod { public class ShowcaseStudio : MonoBehaviour { - KeyCode enterShowcaseStudio = KeyCode.Tab; - KeyCode showcaseStudioHideHud = KeyCode.F3; - KeyCode showcaseStudioRotateCharacter = KeyCode.Mouse0; - KeyCode showcaseStudioMoveLight = KeyCode.Mouse3; - KeyCode showcaseStudioMoveCamera = KeyCode.Mouse2; + private ConfigEntry enterShowcaseStudio; + private ConfigEntry showcaseStudioHideHud; + private ConfigEntry showcaseStudioRotateCharacter; + private ConfigEntry showcaseStudioMoveLight; + private ConfigEntry showcaseStudioMoveCamera; public bool showUI = true; public string skinName = "N/A"; @@ -45,6 +48,19 @@ public class ShowcaseStudio : MonoBehaviour float animationPos = 0; bool animate = true; + + private void Start() + { + ConfigFile config = TextureMod.Instance.Config; + enterShowcaseStudio = config.Bind("ShowcaseStudio", "enterShowcaseStudio", KeyCode.Tab); + showcaseStudioHideHud = config.Bind("ShowcaseStudio", "showcaseStudioHideHud", KeyCode.F3); + showcaseStudioRotateCharacter = config.Bind("ShowcaseStudio", "showcaseStudioRotateCharacter", KeyCode.Mouse0); + showcaseStudioMoveLight = config.Bind("ShowcaseStudio", "showcaseStudioMoveLight", KeyCode.Mouse3); + showcaseStudioMoveCamera = config.Bind("ShowcaseStudio", "showcaseStudioMoveCamera", KeyCode.Mouse2); + + CustomStyle.InitStyle(); + } + private void OnGUI() { GUI.skin.box.alignment = TextAnchor.MiddleCenter; @@ -65,11 +81,6 @@ private void OnGUI() } } - void Start() - { - CustomStyle.InitStyle(); - } - void ShowStudio() { showUI = !showUI; @@ -167,15 +178,15 @@ private void Update() if (SUS == null) { - if (UIScreen.currentScreens[1]?.screenType == ScreenType.UNLOCKS_SKINS) + if (ScreenApi.CurrentScreens[1]?.screenType == ScreenType.UNLOCKS_SKINS) { - SUS = UIScreen.currentScreens[1] as ScreenUnlocksSkins; + SUS = ScreenApi.CurrentScreens[1] as ScreenUnlocksSkins; } } else { - if (Input.GetKeyDown(showcaseStudioHideHud)) hideGUI = !hideGUI; + if (Input.GetKeyDown(showcaseStudioHideHud.Value)) hideGUI = !hideGUI; Renderer[] rends = FindObjectsOfType(); foreach (Renderer r in rends) @@ -183,7 +194,7 @@ private void Update() if (r.material.shader != mainShader && r.name.Contains("Effect")) r.material.shader = mainShader; } - if (Input.GetKeyDown(enterShowcaseStudio) || (!showUI && (Controller.all.GetButtonDown(InputAction.ESC) || Controller.all.GetButtonDown(InputAction.BACK) || Controller.all.GetButtonDown(InputAction.OK) || Input.GetKeyDown(KeyCode.Mouse1)))) + if (Input.GetKeyDown(enterShowcaseStudio.Value) || (!showUI && (Controller.all.GetButtonDown(InputAction.ESC) || Controller.all.GetButtonDown(InputAction.BACK) || Controller.all.GetButtonDown(InputAction.OK) || Input.GetKeyDown(KeyCode.Mouse1)))) { ShowStudio(); } @@ -218,28 +229,15 @@ private void Update() private void FixedUpdate() { - if (TextureMod.Instance.MMI != null) - { - if (TextureMod.Instance.tc.InMenu()) - { - var mmi = TextureMod.Instance.MMI; - enterShowcaseStudio = mmi.GetKeyCode(mmi.configKeys["(key)enterShowcaseStudio"]); - showcaseStudioHideHud = mmi.GetKeyCode(mmi.configKeys["(key)showcaseStudioHideHud"]); - showcaseStudioRotateCharacter = mmi.GetKeyCode(mmi.configKeys["(key)showcaseStudioRotateCharacter"]); - showcaseStudioMoveCamera = mmi.GetKeyCode(mmi.configKeys["(key)showcaseStudioMoveCamera"]); - showcaseStudioMoveLight = mmi.GetKeyCode(mmi.configKeys["(key)showcaseStudioMoveLight"]); - } - } - if (cameraController != null) { - if (Input.GetKey(showcaseStudioMoveCamera)) cameraController.GetComponent().isActive = true; + if (Input.GetKey(showcaseStudioMoveCamera.Value)) cameraController.GetComponent().isActive = true; else cameraController.GetComponent().isActive = false; } if (lightController != null) { - if (Input.GetKey(showcaseStudioMoveLight)) + if (Input.GetKey(showcaseStudioMoveLight.Value)) { lightControllerCam.enabled = true; camControllerCam.enabled = false; @@ -255,7 +253,7 @@ private void FixedUpdate() if (characterModel != null) { - if (Input.GetKey(showcaseStudioRotateCharacter)) + if (Input.GetKey(showcaseStudioRotateCharacter.Value)) { int speed = 3; if (Input.GetKey(KeyCode.A)) diff --git a/TextureMod/TextureChanger.cs b/TextureMod/TextureChanger.cs old mode 100644 new mode 100755 index 021287c..1e2afed --- a/TextureMod/TextureChanger.cs +++ b/TextureMod/TextureChanger.cs @@ -1,23 +1,29 @@ -using GameplayEntities; +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using GameplayEntities; using LLGUI; using LLHandlers; using LLScreen; using Multiplayer; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; +using BepInEx; +using BepInEx.Configuration; +using HarmonyLib; +using LLBML; namespace TextureMod { public class TextureChanger : MonoBehaviour { #region General Fields - public static string resourceFolder = Application.dataPath.Replace("/", @"\") + @"\Managed\TextureModResources\Images\"; - private JOFJHDJHJGI gameState => DNPFJHMAIBP.HHMOGKIMBNM(); - private GameMode currentGameMode => JOMBNFKIHIC.GIGAKBJGFDI.PNJOKAICMNN; - private bool IsOnline => JOMBNFKIHIC.GDNFJCCCKDM; + public static string imageFolder = Path.Combine(TextureMod.ResourceFolder, "Images"); + + private JOFJHDJHJGI gameState => StateApi.CurrentGameState; + private GameMode currentGameMode => StateApi.CurrentGameMode; + private bool IsOnline => NetworkApi.IsOnline; + public static bool InMatch => World.instance != null && (DNPFJHMAIBP.HHMOGKIMBNM() == JOFJHDJHJGI.CDOFDJMLGLO || DNPFJHMAIBP.HHMOGKIMBNM() == JOFJHDJHJGI.LGILIJKMKOD) && !LLScreen.UIScreen.loadingScreenActive; public string[] debug = new string[20]; public bool doSkinPost = false; @@ -43,19 +49,19 @@ public class TextureChanger : MonoBehaviour #endregion #region Config Fields - private KeyCode holdKey1 = KeyCode.LeftShift; - private KeyCode nextSkin = KeyCode.Mouse0; - private KeyCode previousSkin = KeyCode.Mouse1; - private KeyCode cancelKey = KeyCode.A; - public KeyCode reloadCustomSkin = KeyCode.F5; - public KeyCode reloadEntireSkinLibrary = KeyCode.F9; - private bool useOnlySetKey = false; - private bool neverApplyOpponentsSkin = false; - public bool showDebugInfo = false; - private bool lockButtonsOnRandom = false; - public bool reloadCustomSkinOnInterval = true; - public int skinReloadIntervalInFrames = 60; - public bool assignFirstSkinOnCharacterSelection = false; + private ConfigEntry holdKey1; + private ConfigEntry nextSkin; + private ConfigEntry previousSkin; + private ConfigEntry cancelKey; + public ConfigEntry reloadCustomSkin; + public ConfigEntry reloadEntireSkinLibrary; + private ConfigEntry useOnlySetKey; + private ConfigEntry neverApplyOpponentsSkin; + public ConfigEntry showDebugInfo; + private ConfigEntry lockButtonsOnRandom; + public ConfigEntry reloadCustomSkinOnInterval; + public ConfigEntry skinReloadIntervalInFrames; + public ConfigEntry assignFirstSkinOnCharacterSelection; #endregion #region LocalPlayer Fields public ALDOKEMAOMB localLobbyPlayer => ALDOKEMAOMB.BJDPHEHJJJK(P2P.localPeer?.playerNr ?? 0); @@ -108,17 +114,44 @@ public class TextureChanger : MonoBehaviour private void Start() { - candySplashWhite = TextureHelper.LoadPNG(resourceFolder + @"Effects\candySplashWhite.png"); + string effectsFolder = Path.Combine(imageFolder, "Effects"); + + candySplashWhite = TextureHelper.LoadPNG(Path.Combine(effectsFolder, "candySplashWhite.png")); + + gridStartBG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "GridSpecial", "gridStartBG.png")); + gridStartFG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "GridSpecial", "gridStartFG.png")); + gridTrail = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "GridSpecial", "gridTrail.png")); + gridArrive = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "GridSpecial", "gridArrive.png")); + + bubbleBG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "JetSpecial", "bubbleBG.png")); + bubbleFG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "JetSpecial", "bubbleFG.png")); + bubblePopBG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "JetSpecial", "bubblePopBG.png")); + bubblePopFG = TextureHelper.LoadPNG(Utility.CombinePaths(effectsFolder, "JetSpecial", "bubblePopFG.png")); + + + ConfigFile config = TextureMod.Instance.Config; + + config.Bind("TextureChanger", "lobby_settings_header", "Lobby Settings:", "modmenu_header"); + holdKey1 = config.Bind("TextureChanger", "holdKey1", KeyCode.LeftShift); + nextSkin = config.Bind("TextureChanger", "nextSkin", KeyCode.Mouse0); + previousSkin = config.Bind("TextureChanger", "previousSkin", KeyCode.Mouse1); + cancelKey = config.Bind("TextureChanger", "cancelKey", KeyCode.A); + useOnlySetKey = config.Bind("TextureChanger", "useOnlySetKey", false); + neverApplyOpponentsSkin = config.Bind("TextureChanger", "neverApplyOpponentsSkin", false); + lockButtonsOnRandom = config.Bind("TextureChanger", "lockButtonsOnRandom", false); + assignFirstSkinOnCharacterSelection = config.Bind("TextureChanger", "assignFirstSkinOnCharacterSelection", false); + config.Bind("TextureChanger", "gap1", "20", "modmenu_gap"); - gridStartBG = TextureHelper.LoadPNG(resourceFolder + @"Effects\GridSpecial\gridStartBG.png"); - gridStartFG = TextureHelper.LoadPNG(resourceFolder + @"Effects\GridSpecial\gridStartFG.png"); - gridTrail = TextureHelper.LoadPNG(resourceFolder + @"Effects\GridSpecial\gridTrail.png"); - gridArrive = TextureHelper.LoadPNG(resourceFolder + @"Effects\GridSpecial\gridArrive.png"); + config.Bind("TextureChanger", "rt_skin_edit_header", "Real-time Skin editing:", "modmenu_header"); + reloadCustomSkin = config.Bind("TextureChanger", "reloadCustomSkin", KeyCode.F5); + reloadEntireSkinLibrary = config.Bind("TextureChanger", "reloadEntireSkinLibrary", KeyCode.F9); + reloadCustomSkinOnInterval = config.Bind("TextureChanger", "reloadCustomSkinOnInterval", true); + skinReloadIntervalInFrames = config.Bind("TextureChanger", "skinReloadIntervalInFrames", 60); + config.Bind("TextureChanger", "gap2", "20", "modmenu_gap"); - bubbleBG = TextureHelper.LoadPNG(resourceFolder + @"Effects\JetSpecial\bubbleBG.png"); - bubbleFG = TextureHelper.LoadPNG(resourceFolder + @"Effects\JetSpecial\bubbleFG.png"); - bubblePopBG = TextureHelper.LoadPNG(resourceFolder + @"Effects\JetSpecial\bubblePopBG.png"); - bubblePopFG = TextureHelper.LoadPNG(resourceFolder + @"Effects\JetSpecial\bubblePopFG.png"); + config.Bind("TextureChanger", "general_header", "General:", "modmenu_header"); + showDebugInfo = config.Bind("TextureChanger", "showDebugInfo", false); + config.Bind("TextureChanger", "gap3", "20", "modmenu_gap"); } private void OnGUI() @@ -133,9 +166,12 @@ private void OnGUI() else content = new GUIContent(labelTxt + " (Refresh " + "[" + reloadCustomSkinTimer + "]" + ")"); GUI.skin.box.alignment = TextAnchor.MiddleCenter; GUI.skin.box.fontSize = 22; + + ScreenBase screenOne = ScreenApi.CurrentScreens[1]; + if (InLobby(GameType.Any)) { - if (UIScreen.currentScreens[1] == null) + if (screenOne == null) { switch (currentGameMode) { @@ -156,9 +192,9 @@ private void OnGUI() } } - if (UIScreen.currentScreens[1] != null) + if (screenOne != null) { - if (UIScreen.currentScreens[1].screenType == ScreenType.UNLOCKS_SKINS) + if (screenOne.screenType == ScreenType.UNLOCKS_SKINS) { if (TextureMod.Instance.showcaseStudio.showUI == false) { @@ -178,7 +214,7 @@ private void OnGUI() private void FixedUpdate() { - if (!neverApplyOpponentsSkin) + if (!neverApplyOpponentsSkin.Value) { if (doSkinPost) { postTimer++; } if (localLobbyPlayer != null && localCustomSkin != null) @@ -227,12 +263,12 @@ private void FixedUpdate() bool OnSkinChangeButtonDown() { - if (Input.GetKeyDown(nextSkin) || Controller.all.GetButtonDown(InputAction.EXPRESS_RIGHT)) + if (Input.GetKeyDown(nextSkin.Value) || Controller.all.GetButtonDown(InputAction.EXPRESS_RIGHT)) { localSkinIndex++; return true; } - else if (Input.GetKeyDown(previousSkin) || Controller.all.GetButtonDown(InputAction.EXPRESS_LEFT)) + else if (Input.GetKeyDown(previousSkin.Value) || Controller.all.GetButtonDown(InputAction.EXPRESS_LEFT)) { localSkinIndex--; return true; @@ -241,31 +277,10 @@ bool OnSkinChangeButtonDown() } - void ModMenuInit() - { - if (TextureMod.Instance.MMI != null) - { - var mmi = TextureMod.Instance.MMI; - holdKey1 = mmi.GetKeyCode(mmi.configKeys["(key)enableSkinChanger"]); - nextSkin = mmi.GetKeyCode(mmi.configKeys["(key)nextSkin"]); - previousSkin = mmi.GetKeyCode(mmi.configKeys["(key)previousSkin"]); - cancelKey = mmi.GetKeyCode(mmi.configKeys["(key)cancelOpponentCustomSkin"]); - reloadCustomSkin = mmi.GetKeyCode(mmi.configKeys["(key)reloadCustomSkin"]); - reloadEntireSkinLibrary = mmi.GetKeyCode(mmi.configKeys["(key)reloadEntireSkinLibrary"]); - useOnlySetKey = mmi.GetTrueFalse(mmi.configBools["(bool)noHoldMode"]); - neverApplyOpponentsSkin = mmi.GetTrueFalse(mmi.configBools["(bool)neverApplyOpponentsSkin"]); - showDebugInfo = mmi.GetTrueFalse(mmi.configBools["(bool)showDebugInfo"]); - lockButtonsOnRandom = mmi.GetTrueFalse(mmi.configBools["(bool)lockButtonsOnRandom"]); - reloadCustomSkinOnInterval = mmi.GetTrueFalse(mmi.configBools["(bool)reloadCustomSkinOnInterval"]); - skinReloadIntervalInFrames = mmi.GetSliderValue("(slider)skinReloadIntervalInFrames"); - assignFirstSkinOnCharacterSelection = mmi.GetTrueFalse(mmi.configBools["(bool)assignFirstSkinOnCharacterSelection"]); - } - } - void DebugOptions() { #region Set Debug Vars - if (showDebugInfo) + if (showDebugInfo.Value) { ModDebugging md = TextureMod.Instance.md; try { md.AddToWindow("General", "Gamestate", gameState.ToString()); } catch { } @@ -274,9 +289,9 @@ void DebugOptions() try { md.AddToWindow("General", "In Lobby", InLobby(GameType.Any).ToString()); } catch { } try { md.AddToWindow("General", "In Game", InGame(GameType.Any).ToString()); } catch { } try { md.AddToWindow("General", "In Post Game", InPostGame().ToString()); } catch { } - try { md.AddToWindow("General", "CurrentScreen[0]", UIScreen.currentScreens[0]?.screenType.ToString()); } catch { } - try { md.AddToWindow("General", "CurrentScreen[1]", UIScreen.currentScreens[1]?.screenType.ToString()); } catch { } - try { md.AddToWindow("General", "CurrentScreen[2]", UIScreen.currentScreens[2]?.screenType.ToString()); } catch { } + try { md.AddToWindow("General", "CurrentScreen[0]", ScreenApi.CurrentScreens[0]?.screenType.ToString()); } catch { } + try { md.AddToWindow("General", "CurrentScreen[1]", ScreenApi.CurrentScreens[1]?.screenType.ToString()); } catch { } + try { md.AddToWindow("General", "CurrentScreen[2]", ScreenApi.CurrentScreens[2]?.screenType.ToString()); } catch { } try { md.AddToWindow("Skin Exchange", "Do Skin Post", doSkinPost.ToString()); } catch { } try { md.AddToWindow("Skin Exchange", "Post Timer", postTimer.ToString()); } catch { } @@ -390,7 +405,10 @@ void OpponetCustomCharacter() { if (opponentPlayer != null && opponentLobbyCharacterModel != null) { - if ((opponentLobbyCharacterModel.character != opponentCustomSkinCharacter || opponentLobbyCharacterModel.characterVariant != opponentCustomSkinCharacterVariant) && (opponentPlayer.DOFCCEDJODB != Character.NONE || opponentPlayer.AIINAIDBHJI != CharacterVariant.CORPSE)) + Traverse tv_opponentLobbyCharacterModel = Traverse.Create(opponentLobbyCharacterModel); + Character opponentModelCharacter = tv_opponentLobbyCharacterModel.Field("character").Value; + CharacterVariant opponentModelCharacterVariant = tv_opponentLobbyCharacterModel.Field("characterVariant").Value; + if ((opponentModelCharacter != opponentCustomSkinCharacter || opponentModelCharacterVariant != opponentCustomSkinCharacterVariant) && (opponentPlayer.DOFCCEDJODB != Character.NONE || opponentPlayer.AIINAIDBHJI != CharacterVariant.CORPSE)) { if (packetSkinCharacter != Character.NONE && opponentPlayer.DOFCCEDJODB != (Character)32 && packetSkinCharacterVariant != CharacterVariant.CORPSE) { @@ -419,7 +437,7 @@ void OpponetCustomCharacter() { if (opponentCustomSkinCharacter == packetSkinCharacter || opponentCustomSkinCharacterVariant == packetSkinCharacterVariant) { - opponentCustomTexture = TextureHelper.LoadPNG(Application.dataPath.Replace("/", @"\") + @"\Managed\TextureModResources\Images\opponent.png"); + opponentCustomTexture = TextureHelper.LoadPNG(Path.Combine(imageFolder, "opponent.png")); packetSkinCharacter = Character.NONE; packetSkinCharacterVariant = CharacterVariant.CORPSE; opponentLobbyCharacterModel.PlayCamAnim(); @@ -448,7 +466,6 @@ private void Update() InitOpponentPlayer(); } #endif - ModMenuInit(); DebugOptions(); @@ -469,7 +486,7 @@ private void Update() void LateUpdate() { - if (Input.GetKeyDown(reloadEntireSkinLibrary)) + if (Input.GetKeyDown(reloadEntireSkinLibrary.Value)) { TextureMod.Instance.tl.LoadLibrary(); //Reloads the entire texture folder } @@ -477,9 +494,10 @@ void LateUpdate() void DisableCharacterButtons() { - if (randomizedChar && UIScreen.currentScreens[1] != null) // If you have randomized your character, activate buttons again + ScreenBase screenOne = ScreenApi.CurrentScreens[1]; + if (randomizedChar && screenOne != null) // If you have randomized your character, activate buttons again { - if (UIScreen.currentScreens[1].screenType == ScreenType.PLAYERS_STAGE || UIScreen.currentScreens[1].screenType == ScreenType.PLAYERS_STAGE_RANKED) + if (screenOne.screenType == ScreenType.PLAYERS_STAGE || screenOne.screenType == ScreenType.PLAYERS_STAGE_RANKED) { LLButton[] buttons = FindObjectsOfType(); foreach (LLButton b in buttons) b.SetActive(true); @@ -583,7 +601,7 @@ void InLobbyOrGameChecks() { if (localCustomSkin != null) { - if (Input.GetKeyDown(reloadCustomSkin)) + if (Input.GetKeyDown(reloadCustomSkin.Value)) { try { localCustomSkin.ReloadSkin(); } catch { AudioHandler.PlaySfx(Sfx.MENU_BACK); } @@ -600,7 +618,7 @@ void InLobbyOrGameChecks() case GameMode.COMPETITIVE: #region In ranked and online lobby - if (Input.GetKeyDown(cancelKey)) + if (Input.GetKeyDown(cancelKey.Value)) { cancelOpponentSkin = !cancelOpponentSkin; if (opponentLobbyCharacterModel != null) @@ -749,7 +767,7 @@ void AssignSkinToLocalPlayer() if (localPlayerChar != localLobbyPlayer.DOFCCEDJODB || localPlayerCharVar != localLobbyPlayer.AIINAIDBHJI) { localCustomSkin = null; - if (assignFirstSkinOnCharacterSelection && localPlayerChar != localLobbyPlayer.DOFCCEDJODB && localLobbyPlayer.DOFCCEDJODB != Character.RANDOM) + if (assignFirstSkinOnCharacterSelection.Value && localPlayerChar != localLobbyPlayer.DOFCCEDJODB && localLobbyPlayer.DOFCCEDJODB != Character.RANDOM) { localSkinIndex = 0; changeSkin = true; @@ -765,9 +783,9 @@ void AssignSkinToLocalPlayer() LLButton[] buttons = FindObjectsOfType(); HDLIJDBFGKN gameStatesOnlineLobby = FindObjectOfType(); - if (useOnlySetKey == false) + if (useOnlySetKey.Value == false) { - if (Input.GetKey(holdKey1) && buttons.Length > 0) + if (Input.GetKey(holdKey1.Value) && buttons.Length > 0) { if (OnSkinChangeButtonDown()) { @@ -779,7 +797,7 @@ void AssignSkinToLocalPlayer() b.SetActive(false); //Deactivate buttons } } - else if (Input.GetKeyUp(holdKey1) && buttons.Length > 0) + else if (Input.GetKeyUp(holdKey1.Value) && buttons.Length > 0) { foreach (LLButton b in buttons) b.SetActive(true); //Reactivate buttons } @@ -799,10 +817,17 @@ void AssignSkinToLocalPlayer() if (InLobby(GameType.Online)) { + AccessTools.Method(typeof(HDLIJDBFGKN), "JPNNBHNHHJC").Invoke(gameStatesOnlineLobby, null); // AutoReadyReset + AccessTools.Method(typeof(HDLIJDBFGKN), "EMFKKOJEIPN").Invoke(gameStatesOnlineLobby, new object[] { localLobbyPlayer.CJFLMDNNMIE, false }); // SetReady + + AccessTools.Method(typeof(HDLIJDBFGKN), "BFIGLDLHKPO").Invoke(gameStatesOnlineLobby, null); // UpdateReadyButton + AccessTools.Method(typeof(HDLIJDBFGKN), "OFGNNIBJOLH").Invoke(gameStatesOnlineLobby, new object[] { localLobbyPlayer }); // SendPlayerState + /* gameStatesOnlineLobby.JPNNBHNHHJC(); // gameStatesOnlineLobby.AutoReadyReset - gameStatesOnlineLobby.EMFKKOJEIPN(localLobbyPlayer.CJFLMDNNMIE, false); //Set Ready + gameStatesOnlineLobby.EMFKKOJEIPN(localLobbyPlayer.CJFLMDNNMIE, false); // SetReady gameStatesOnlineLobby.BFIGLDLHKPO(); // gameStatesOnlineLobby.UpdateReadyButton gameStatesOnlineLobby.OFGNNIBJOLH(localLobbyPlayer); // gameStatesOnlineLobby.SendPlayerState + */ } bool isRandom = false; @@ -823,10 +848,14 @@ void AssignSkinToLocalPlayer() if (InLobby(GameType.Online)) { + AccessTools.Method(typeof(HDLIJDBFGKN), "EMFKKOJEIPN").Invoke(gameStatesOnlineLobby, new object[] { localLobbyPlayer.CJFLMDNNMIE, true }); // SetReady + AccessTools.Method(typeof(HDLIJDBFGKN), "OFGNNIBJOLH").Invoke(gameStatesOnlineLobby, new object[] { localLobbyPlayer }); // SendPlayerState + /* gameStatesOnlineLobby.EMFKKOJEIPN(localLobbyPlayer.CJFLMDNNMIE, true); // SetReady gameStatesOnlineLobby.OFGNNIBJOLH(localLobbyPlayer); //Send player state (Signalizes that we have changes characters and that we are ready) + */ - if (lockButtonsOnRandom) + if (lockButtonsOnRandom.Value) { foreach (LLButton b in buttons) b.SetActive(false); randomizedChar = true; @@ -856,10 +885,11 @@ void AssignSkinToLocalPlayer() void UpdateCustomSkinsInMenu() { + ScreenBase screenOne = ScreenApi.CurrentScreens[1]; if (InMenu()) { sendCancelRequestToServer = true; - if (UIScreen.currentScreens[1]?.screenType != ScreenType.UNLOCKS_SKINS) + if (screenOne?.screenType != ScreenType.UNLOCKS_SKINS) { InitLocalPlayer(); } @@ -870,11 +900,11 @@ void UpdateCustomSkinsInMenu() } } - if (UIScreen.currentScreens[1] != null) + if (screenOne != null) { - if (UIScreen.currentScreens[1]?.screenType == ScreenType.UNLOCKS_SKINS) + if (screenOne?.screenType == ScreenType.UNLOCKS_SKINS) { - var screenUnlocksSkins = UIScreen.currentScreens[1] as ScreenUnlocksSkins; + var screenUnlocksSkins = screenOne as ScreenUnlocksSkins; CharacterModel characterModel = screenUnlocksSkins.previewModel; if (siluetteTimer > 0) @@ -886,7 +916,7 @@ void UpdateCustomSkinsInMenu() } } - if (Input.GetKey(holdKey1)) + if (Input.GetKey(holdKey1.Value)) { if (OnSkinChangeButtonDown()) { @@ -896,14 +926,14 @@ void UpdateCustomSkinsInMenu() if (localCustomSkin != null) // Reload a skin from its file { - if (Input.GetKeyDown(reloadCustomSkin)) + if (Input.GetKeyDown(reloadCustomSkin.Value)) { if (!intervalMode) { - if (reloadCustomSkinOnInterval) + if (reloadCustomSkinOnInterval.Value) { intervalMode = true; - reloadCustomSkinTimer = skinReloadIntervalInFrames; + reloadCustomSkinTimer = skinReloadIntervalInFrames.Value; } } else intervalMode = false; @@ -929,16 +959,16 @@ void UpdateCustomSkinsInMenu() SetUnlocksCharacterModel(localCustomSkin.SkinTexture); } catch { LLHandlers.AudioHandler.PlaySfx(LLHandlers.Sfx.MENU_BACK); } - reloadCustomSkinTimer = skinReloadIntervalInFrames; + reloadCustomSkinTimer = skinReloadIntervalInFrames.Value; } } } } - else if (UIScreen.currentScreens[1]?.screenType == ScreenType.UNLOCKS_CHARACTERS) + else if (screenOne?.screenType == ScreenType.UNLOCKS_CHARACTERS) { localCustomSkin = null; intervalMode = false; - reloadCustomSkinTimer = skinReloadIntervalInFrames; + reloadCustomSkinTimer = skinReloadIntervalInFrames.Value; } } @@ -959,7 +989,7 @@ public List GetCharactersInGame() public bool InMenu() { - if (UIScreen.currentScreens[0]?.screenType == ScreenType.MENU) + if (ScreenApi.CurrentScreens[0]?.screenType == ScreenType.MENU) { return true; } @@ -1113,7 +1143,8 @@ private int AssignTextureToHud(PlayerEntity playerEntity, Texture tex) { foreach (GameHudPlayerInfo ghpi in ghpis) { - if (ghpi.shownPlayer == playerEntity.player) + ALDOKEMAOMB shownPlayer = Traverse.Create(ghpi).Field("shownPlayer").Value; + if (shownPlayer == playerEntity.player) { Renderer[] rs = ghpi.gameObject.transform.GetComponentsInChildren(); if (rs.Length > 0) @@ -1123,7 +1154,7 @@ private int AssignTextureToHud(PlayerEntity playerEntity, Texture tex) AssignTextureToRenderer(r, tex); } } - ret = ghpi.shownPlayer.CJFLMDNNMIE; + ret = shownPlayer.CJFLMDNNMIE; } } } @@ -1132,9 +1163,10 @@ private int AssignTextureToHud(PlayerEntity playerEntity, Texture tex) private void AssignTextureToPostGameHud(int playerNr, Texture tex) { - if (UIScreen.currentScreens[0]?.screenType == ScreenType.GAME_RESULTS) + ScreenBase screenZero = ScreenApi.CurrentScreens[0]; + if (screenZero?.screenType == ScreenType.GAME_RESULTS) { - PostScreen postScreen = UIScreen.currentScreens[0] as PostScreen; + PostScreen postScreen = screenZero as PostScreen; Renderer[] rs = postScreen.playerBarsByPlayer[playerNr].gameObject.transform.GetComponentsInChildren(); for (int i = 0; i < rs.Length; i++) @@ -1160,16 +1192,18 @@ void AssignTextureToRenderer(Renderer r, Texture tex, int playerIndex = -1, Play GameHudPlayerInfo playerHud = r.transform.GetComponentInParent(); if (playerHud != null) { - character = playerHud.shownPlayer.DOFCCEDJODB; - characterVariant = playerHud.shownPlayer.AIINAIDBHJI; + ALDOKEMAOMB shownPlayer = Traverse.Create(playerHud).Field("shownPlayer").Value; + character = shownPlayer.DOFCCEDJODB; + characterVariant = shownPlayer.AIINAIDBHJI; } else { CharacterModel characterModel = r.transform.GetComponentInParent(); if (characterModel != null) { - character = characterModel.character; - characterVariant = characterModel.characterVariant; + Traverse tv_charModel = Traverse.Create(characterModel); + character = tv_charModel.Field("character").Value; + characterVariant = tv_charModel.Field("characterVariant").Value; } else { @@ -1239,9 +1273,10 @@ void AssignTextureToRenderer(Renderer r, Texture tex, int playerIndex = -1, Play private void AssignSkinToWinnerModel() { - if (UIScreen.currentScreens[0]?.screenType == ScreenType.GAME_RESULTS) + ScreenBase screenZero = ScreenApi.CurrentScreens[0]; + if (screenZero?.screenType == ScreenType.GAME_RESULTS) { - PostScreen ps = UIScreen.currentScreens[0] as PostScreen; + PostScreen ps = screenZero as PostScreen; if (localCustomSkin != null) { @@ -1339,19 +1374,22 @@ private void SetLocalCustomSkin(Character character, bool isRandom = false) private CharacterModel GetCurrentCharacterModel(int playerNr = 0) { - if (UIScreen.currentScreens[0]?.screenType == ScreenType.PLAYERS) + ScreenBase screenZero = ScreenApi.CurrentScreens[0]; + ScreenBase screenOne = ScreenApi.CurrentScreens[1]; + + if (screenZero?.screenType == ScreenType.PLAYERS) { - var screenPlayers = UIScreen.currentScreens[0] as ScreenPlayers; + var screenPlayers = screenZero as ScreenPlayers; return screenPlayers.playerSelections[playerNr].characterModel; } - else if (UIScreen.currentScreens[1]?.screenType == ScreenType.UNLOCKS_SKINS) + else if (screenOne?.screenType == ScreenType.UNLOCKS_SKINS) { - var screenUnlocksSkins = UIScreen.currentScreens[1] as ScreenUnlocksSkins; + var screenUnlocksSkins = screenOne as ScreenUnlocksSkins; return screenUnlocksSkins.previewModel; } - else if (UIScreen.currentScreens[1]?.screenType == ScreenType.UNLOCKS_CHARACTERS) + else if (screenOne?.screenType == ScreenType.UNLOCKS_CHARACTERS) { - var screenUnlocksCharacters = UIScreen.currentScreens[1] as ScreenUnlocksCharacters; + var screenUnlocksCharacters = screenOne as ScreenUnlocksCharacters; return screenUnlocksCharacters.previewModel; } return null; @@ -1528,8 +1566,11 @@ private Texture2D GetLoadedTexture(Character c, Texture2D currentTexture, bool p private void GetSkinForUnlocksModel(ScreenUnlocksCharacters screen, sbyte next = 0) { - Character character = screen.previewModel.character; - List customSkins = TextureMod.Instance.tl.newCharacterTextures[character]; + Traverse tv_previewModel = Traverse.Create(screen.previewModel); + Character character = tv_previewModel.Field("character").Value; + CharacterVariant characterVariant = tv_previewModel.Field("characterVariant").Value; + + List customSkins = TextureMod.Instance.tl.newCharacterTextures[character]; if (customSkins.Count == 0) { Debug.Log($"[LLBMM] TextureMod: No skins for {character}"); @@ -1537,21 +1578,23 @@ private void GetSkinForUnlocksModel(ScreenUnlocksCharacters screen, sbyte next = } localCustomSkin = GetCustomSkin(character); - screen.previewModel.SetCharacterResultScreen(0, character, GetCustomSkinVariant(localCustomSkin.Variant, screen.previewModel.characterVariant)); + screen.previewModel.SetCharacterResultScreen(0, character, GetCustomSkinVariant(localCustomSkin.Variant, characterVariant)); siluetteTimer = 5; } private void SetSkinForUnlocksModel(ScreenUnlocksSkins screenUnlocksSkins, sbyte next = 0) { - List customSkins = TextureMod.Instance.tl.newCharacterTextures[screenUnlocksSkins.character]; + + Character susCharacter = Traverse.Create(screenUnlocksSkins).Field("character").Value; + List customSkins = TextureMod.Instance.tl.newCharacterTextures[susCharacter]; if (customSkins.Count == 0) { - Debug.Log($"[LLBMM] TextureMod: No skins for {screenUnlocksSkins.character}"); + Debug.Log($"[LLBMM] TextureMod: No skins for {susCharacter}"); return; } - localCustomSkin = GetCustomSkin(screenUnlocksSkins.character); - screenUnlocksSkins.ShowCharacter(screenUnlocksSkins.character, GetCustomSkinVariantShowcase(localCustomSkin.Variant), true); + localCustomSkin = GetCustomSkin(susCharacter); + screenUnlocksSkins.ShowCharacter(susCharacter, GetCustomSkinVariantShowcase(localCustomSkin.Variant), true); siluetteTimer = 5; SetCharacterModelTex(screenUnlocksSkins.previewModel, localCustomSkin?.SkinTexture); } @@ -1968,7 +2011,7 @@ void AssignVisualizer(Character character, Renderer r, Texture2D tex) { Color c1 = character == Character.BOSS ? tex.GetPixel(493, 510) : tex.GetPixel(82, 10); Color c2 = character == Character.BOSS ? tex.GetPixel(508, 510) : tex.GetPixel(96, 10); - Material vismat = visualizer.FHAMOPAJHNJ; + Material vismat = Traverse.Create(visualizer).Field("FHAMOPAJHNJ").Value; try { vismat.mainTexture = tex; diff --git a/TextureMod/TextureHelper.cs b/TextureMod/TextureHelper.cs index 5be11d2..3204bfa 100644 --- a/TextureMod/TextureHelper.cs +++ b/TextureMod/TextureHelper.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Text; using UnityEngine; namespace TextureMod @@ -10,7 +9,7 @@ class TextureHelper { public static Texture2D LoadPNG(string _path, string _fileName = "") //Loads a png from a file and returns it (Loads the asset into memory, do only load it once) { - var fullPath = _path + _fileName; + string fullPath = Path.Combine(_path, _fileName); if (!File.Exists(fullPath)) { Debug.Log("Could not find " + fullPath); diff --git a/TextureMod/TextureLoader.cs b/TextureMod/TextureLoader.cs index 5f4f35f..c0781a8 100644 --- a/TextureMod/TextureLoader.cs +++ b/TextureMod/TextureLoader.cs @@ -11,7 +11,7 @@ namespace TextureMod { public class TextureLoader : MonoBehaviour { - private readonly string resourceFolder = Application.dataPath.Replace("/", @"\") + @"\Managed\TextureModResources\Images\Characters\"; + private static readonly string charactersFolder = BepInEx.Utility.CombinePaths(TextureMod.ResourceFolder, "Images", "Characters"); public List chars; //public Dictionary> characterTextures = new Dictionary>(); public Dictionary> newCharacterTextures = new Dictionary>(); @@ -27,7 +27,7 @@ private void Start() private List GetCharacterFolders() { - return new List(Directory.GetDirectories(resourceFolder.Replace("/", @"\"))); + return new List(Directory.GetDirectories(charactersFolder)); } public void ReloadChacterSpecificSkins(Character character) diff --git a/TextureMod/TextureMod.cs b/TextureMod/TextureMod.cs old mode 100644 new mode 100755 index b02d2b0..e6c5151 --- a/TextureMod/TextureMod.cs +++ b/TextureMod/TextureMod.cs @@ -1,35 +1,39 @@ -using LLHandlers; -using LLModMenu; -using LLScreen; -using Multiplayer; -using Steamworks; -using System; +using System; using System.Collections.Generic; using UnityEngine; +using LLHandlers; +using LLScreen; +using Steamworks; +using BepInEx; +using LLBML; + namespace TextureMod { - public class TextureMod : MonoBehaviour + [BepInPlugin(PluginInfos.PLUGIN_ID, PluginInfos.PLUGIN_NAME, PluginInfos.PLUGIN_VERSION)] + [BepInProcess("LLBlaze.exe")] + [BepInDependency(LLBML.PluginInfos.PLUGIN_ID, BepInDependency.DependencyFlags.HardDependency)] + [BepInDependency("no.mrgentle.plugins.llb.modmenu", BepInDependency.DependencyFlags.SoftDependency)] + public class TextureMod : BaseUnityPlugin { - public static TextureMod Instance { get; private set; } - public static void Initialize() - { - GameObject gameObject = new GameObject("TextureMod", typeof(TextureMod)); - Instance = gameObject.GetComponent(); - DontDestroyOnLoad(gameObject); - } - - private const string modVersion = "1.4.9"; + #region legacystrings + private const string modVersion = PluginInfos.PLUGIN_VERSION; private const string repositoryOwner = "Daioutzu"; private const string repositoryName = "LLBMM-TextureMod"; + #endregion public string debug = ""; + #region instances + public static TextureMod Instance { get; private set; } = null; public TextureChanger tc = null; - public ModMenuIntegration MMI = null; public TextureLoader tl = null; public ExchangeClient ec = null; public ModDebugging md = null; + #endregion + + public static string ResourceFolder { get { return BepInEx.Utility.CombinePaths(Paths.ManagedPath, "TextureModResources"); } } + public string retSkin = ""; public EffectChanger effectChanger = null; public ShowcaseStudio showcaseStudio = null; @@ -38,17 +42,38 @@ public static void Initialize() public static bool hasDLC = false; public static string loadingText = $"TextureMod is loading External Textures..."; + public void Awake() + { + Instance = this; + } + private void Start() { UIScreen.SetLoadingScreen(true, false, false, Stage.NONE); CheckIfPLayerHasDLC(); if (ownedDLCs.Count > 0) hasDLC = true; + + + LLBML.Utils.ModDependenciesUtils.RegisterToModMenu(this.Info, new List { + "Wondering how to assign skins and in what part of the game you can do so?", + "Simply hold the 'Enable Skin Changer' button and press either the `Next skin` or the `Previous Skin` buttons to cycle skins", + "Skins can be assigned in Ranked Lobbies, 1v1 Lobbies, FFA Lobbies(Only for player 1 and 2) and in the skin unlock screen for a character or in ShowcaseStudio", + "If you select random in the lobby and try to assign a custom skin you will be given a random character and random skin. In online lobbies you will be set to ready, and your buttons will become unavailable unless you've deactivated 'Lock Buttons On Random'", + " ", + "If you wish to real time edit your skins, use the F5 button to reload your skin whenever you're in training mode or in the character skin unlock screen", + "You can also enable the interval mode and have it automatically reload the current custom skin every so often. Great for dual screen, or windowed mode setups (Does not work in training mode)", + "This mod was written by MrGentle" + }); + } private void Update() { - if (MMI == null) { MMI = gameObject.AddComponent(); } - if (tl == null) { tl = gameObject.AddComponent(); } + if (tl == null) { + tl = gameObject.AddComponent(); + } else if(tl.loadingExternalFiles == false) { + LoadingScreen.SetLoading(this.Info, false); + } if (tc == null) { tc = gameObject.AddComponent(); } if (ec == null) { ec = gameObject.AddComponent(); } if (md == null) { md = gameObject.AddComponent(); } @@ -58,6 +83,7 @@ private void Update() private void OnGUI() { + /* var OriginalColor = GUI.contentColor; var OriginalLabelFontSize = GUI.skin.label.fontSize; var OriginalLabelAlignment = GUI.skin.label.alignment; @@ -76,7 +102,7 @@ private void OnGUI() GUI.contentColor = OriginalColor; GUI.skin.label.fontSize = OriginalLabelFontSize; GUI.skin.label.alignment = OriginalLabelAlignment; - + */ GUI.Label(new Rect(5f, 5f, 1920f, 25f), debug); } diff --git a/TextureMod/TextureMod.csproj b/TextureMod/TextureMod.csproj index c3fa46e..27a4fb1 100644 --- a/TextureMod/TextureMod.csproj +++ b/TextureMod/TextureMod.csproj @@ -1,5 +1,5 @@  - + Debug @@ -9,7 +9,7 @@ Properties TextureMod TextureMod - v4.5 + v3.5 512 true @@ -34,344 +34,75 @@ false - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\Assembly-CSharp.dll - - - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\Assembly-CSharp-firstpass.dll - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\ModMenu.dll - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\Rewired_Core.dll - - - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\Rewired_Windows.dll - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\TextMeshPro.dll - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.AccessibilityModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.AIModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.AnimationModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ARModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.AssetBundleModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.AudioModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.BaselibModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ClothModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ClusterInputModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ClusterRendererModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.CoreModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.CrashReportingModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.DirectorModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.FileSystemHttpModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.GameCenterModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.GridModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.HotReloadModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ImageConversionModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.IMGUIModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.InputModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.JSONSerializeModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.LocalizationModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.Networking.dll + + Libs\0Harmony.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ParticleSystemModule.dll + + Libs\Assembly-CSharp.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.PerformanceReportingModule.dll + + Libs\BepInEx.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.Physics2DModule.dll + + Libs\BepInEx.Harmony.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.PhysicsModule.dll + + Libs\LLBModdingLib.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ProfilerModule.dll + + Libs\TextMeshPro.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.ScreenCaptureModule.dll + + Libs\UnityEngine.AnimationModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.SharedInternalsModule.dll + + Libs\UnityEngine.CoreModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.SpatialTracking.dll + + Libs\UnityEngine.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.SpriteMaskModule.dll + + Libs\UnityEngine.ImageConversionModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.SpriteShapeModule.dll + + Libs\UnityEngine.IMGUIModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.StreamingModule.dll + + Libs\UnityEngine.PhysicsModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.StyleSheetsModule.dll + + Libs\UnityEngine.TextCoreModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.SubstanceModule.dll + + Libs\UnityEngine.TextRenderingModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TerrainModule.dll + + Libs\UnityEngine.UnityWebRequestModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TerrainPhysicsModule.dll + + Libs\UnityEngine.UnityWebRequestWWWModule.dll False - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TextCoreModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TextRenderingModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TilemapModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.Timeline.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TimelineModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.TLSModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UI.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UIElementsModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UIModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UmbraModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UNETModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityAnalyticsModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityConnectModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityTestProtocolModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityWebRequestModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.VehiclesModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.VFXModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.VideoModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.VRModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.WindModule.dll - False - - - False - ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed\UnityEngine.XRModule.dll + + Libs\ModMenu.dll False @@ -381,7 +112,6 @@ - @@ -389,13 +119,10 @@ + - - Xcopy $(TargetPath) "C:\Users\Dazer\Desktop\LLBMM 1.3.1\mods\$(ProjectName)" /y -Xcopy $(TargetPath) "C:\Program Files (x86)\Steam\steamapps\common\LLBlaze\LLBlaze_Data\Managed" /y - - \ No newline at end of file +