Decompiled source of WolfoAlternateSkins v2.1.1
WolfoSkinsMod.dll
Decompiled 3 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.Commando; using EntityStates.FalseSon; using EntityStates.FalseSonMeteorPod; using EntityStates.Missions.LunarScavengerEncounter; using EntityStates.VoidRaidCrab; using On.EntityStates.BrotherMonster; using On.EntityStates.Commando; using On.EntityStates.FalseSon; using On.EntityStates.FalseSonMeteorPod; using On.EntityStates.Missions.LunarScavengerEncounter; using On.EntityStates.VoidRaidCrab; using On.RoR2; using On.RoR2.UI.LogBook; using On.RoR2.UI.MainMenu; using R2API; using R2API.Utils; using RA2Mod.General.Components; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.ExpansionManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Rendering; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("WolfoSkinsMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+bd877b4383bf6abf9e0cca60730234da6caca2e2")] [assembly: AssemblyProduct("WolfoSkinsMod")] [assembly: AssemblyTitle("WolfoSkinsMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace WolfoSkinsMod { public class Achievements { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_PlayAllEnemiesDefeatedSound <>9__9_0; public static hook_OnEnter <>9__9_1; internal void <Hooks>b__9_0(orig_PlayAllEnemiesDefeatedSound orig, InfiniteTowerWaveController self) { orig.Invoke(self); if (self.waveIndex >= 50) { Grant(".Wolfo.Simu", "CLEAR_SIMU_", isAltBoss: false); Achievements.unlockSkins_Simu?.Invoke(Run.instance); } } internal void <Hooks>b__9_1(orig_OnEnter orig, FadeOut self) { orig.Invoke(self); Grant(".Wolfo.LunarScav", "CLEAR_LUNARSCAV_", isAltBoss: true); Achievements.unlockSkins_AltBoss?.Invoke(Run.instance); } } public static event Action<Run> unlockSkins_Both; public static event Action<Run> unlockSkins_Simu; public static event Action<Run> unlockSkins_AltBoss; internal static void Hooks() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown object obj = <>c.<>9__9_0; if (obj == null) { hook_PlayAllEnemiesDefeatedSound val = delegate(orig_PlayAllEnemiesDefeatedSound orig, InfiniteTowerWaveController self) { orig.Invoke(self); if (self.waveIndex >= 50) { Grant(".Wolfo.Simu", "CLEAR_SIMU_", isAltBoss: false); Achievements.unlockSkins_Simu?.Invoke(Run.instance); } }; <>c.<>9__9_0 = val; obj = (object)val; } InfiniteTowerWaveController.PlayAllEnemiesDefeatedSound += (hook_PlayAllEnemiesDefeatedSound)obj; object obj2 = <>c.<>9__9_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, FadeOut self) { orig.Invoke(self); Grant(".Wolfo.LunarScav", "CLEAR_LUNARSCAV_", isAltBoss: true); Achievements.unlockSkins_AltBoss?.Invoke(Run.instance); }; <>c.<>9__9_1 = val2; obj2 = (object)val2; } FadeOut.OnEnter += (hook_OnEnter)obj2; DeathState.OnEnter += new hook_OnEnter(Voidling_Unlock); TrueDeathState.OnEnter += new hook_OnEnter(Eclipse8_Unlock); } public static void Grant(string unlockable, string achievement, bool isAltBoss) { Debug.LogWarning((object)("Attempting Unlockable :" + unlockable)); ReadOnlyCollection<PlayerCharacterMasterController> instances = PlayerCharacterMasterController.instances; for (int i = 0; i < instances.Count; i++) { PlayerCharacterMasterController val = instances[i]; NetworkUser networkUser = instances[i].networkUser; if (!Object.op_Implicit((Object)(object)networkUser) || networkUser.localUser == null) { continue; } UserProfile userProfile = networkUser.localUser.userProfile; SurvivorDef survivorPreference = networkUser.GetSurvivorPreference(); if (!Object.op_Implicit((Object)(object)survivorPreference)) { continue; } string text = survivorPreference.cachedName.ToUpperInvariant(); string text2 = "Skins." + survivorPreference.cachedName + unlockable; UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(text2); if (Object.op_Implicit((Object)(object)unlockableDef)) { Debug.Log((object)("Granting Unlockable:" + text2)); if (!userProfile.HasUnlockable(unlockableDef)) { networkUser.ServerHandleUnlock(unlockableDef); } } if (!userProfile.HasAchievement(achievement + text)) { userProfile.AddAchievement(achievement + text, false); } if (isAltBoss && !userProfile.HasAchievement("CLEAR_ALTBOSS_" + text)) { userProfile.AddAchievement("CLEAR_ALTBOSS_" + text, false); } UnlockableDef unlockableDef2 = UnlockableCatalog.GetUnlockableDef("Skins." + survivorPreference.cachedName + ".Wolfo.First"); if (Object.op_Implicit((Object)(object)unlockableDef2)) { Debug.Log((object)("Granting Unlockable: Skins." + survivorPreference.cachedName + ".Wolfo.First")); if (!userProfile.HasUnlockable(unlockableDef2)) { networkUser.ServerHandleUnlock(unlockableDef2); } } if (!userProfile.HasAchievement("CLEAR_ANY_" + text)) { userProfile.AddAchievement("CLEAR_ANY_" + text, false); } bool flag = isAltBoss || userProfile.HasAchievement("CLEAR_ALTBOSS_" + text); bool flag2 = unlockable.EndsWith("Simu") || userProfile.HasAchievement("CLEAR_SIMU_" + text); if (flag && flag2) { Achievements.unlockSkins_Both?.Invoke(Run.instance); UnlockableDef unlockableDef3 = UnlockableCatalog.GetUnlockableDef("Skins." + survivorPreference.cachedName + ".Wolfo.Both"); if (Object.op_Implicit((Object)(object)unlockableDef3) && !userProfile.HasUnlockable(unlockableDef3)) { Debug.Log((object)("Granting Unlockable:" + unlockableDef3.cachedName)); networkUser.ServerHandleUnlock(unlockableDef3); } if (!userProfile.HasAchievement("CLEAR_BOTH_" + text)) { userProfile.AddAchievement("CLEAR_BOTH_" + text, false); } } Unlocks.UpdateBothObjective_Specific(userProfile, survivorPreference); } } private static void Voidling_Unlock(orig_OnEnter orig, DeathState self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)SceneInfo.instance) && SceneInfo.instance.sceneDef.cachedName.Equals("voidraid")) { Grant(".Wolfo.Voidling", "CLEAR_VOIDLING", isAltBoss: true); Achievements.unlockSkins_AltBoss?.Invoke(Run.instance); } } private static void Eclipse8_Unlock(orig_OnEnter orig, TrueDeathState self) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 orig.Invoke(self); if (Object.op_Implicit((Object)(object)SceneInfo.instance) && SceneInfo.instance.sceneDef.cachedName == "moon2" && (int)Run.instance.selectedDifficulty >= 10) { Grant(".Wolfo.Eclipse", "CLEAR_ECLIPSE_", isAltBoss: false); } } } public class Achievement_Simu : BaseAchievement { public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Achievements.unlockSkins_Simu += Unlock; Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Achievements.unlockSkins_Simu -= Unlock; Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && runReport.gameEnding.cachedName.Equals("InfiniteTowerEnding")) { ((BaseAchievement)this).Grant(); } } private void Unlock(Run run) { ((BaseAchievement)this).Grant(); } } public class Achievement_AltBoss_AND_Simu : BaseAchievement { public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Achievements.unlockSkins_Both += Unlock; } public override void OnBodyRequirementBroken() { Achievements.unlockSkins_Both -= Unlock; ((BaseAchievement)this).OnBodyRequirementBroken(); } public void IsValid() { } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.LimboEnding) { ((BaseAchievement)this).Grant(); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.VoidEnding) { ((BaseAchievement)this).Grant(); } } } private void Unlock(Run run) { ((BaseAchievement)this).Grant(); } } public class Achievement_AltBoss_Simu : BaseAchievement { public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Achievements.unlockSkins_Simu += Unlock; Achievements.unlockSkins_AltBoss += Unlock; Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Achievements.unlockSkins_Simu -= Unlock; Achievements.unlockSkins_AltBoss -= Unlock; Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { if (runReport.gameEnding.cachedName.Equals("InfiniteTowerEnding")) { ((BaseAchievement)this).Grant(); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.LimboEnding) { ((BaseAchievement)this).Grant(); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.VoidEnding) { ((BaseAchievement)this).Grant(); } } } private void Unlock(Run run) { ((BaseAchievement)this).Grant(); } } internal static class Assets { public static AssetBundle Bundle; public static PluginInfo PluginInfo; public static string Folder = "Skins"; internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location); internal static void Init(PluginInfo info) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Expected O, but got Unknown PluginInfo = info; if (!Directory.Exists(GetPathToFile(Folder))) { Debug.LogWarning((object)(Folder + " | Folder does not exist")); Folder = "plugins\\" + Folder; if (!Directory.Exists(GetPathToFile(Folder))) { Debug.LogWarning((object)(Folder + " | Folder does not exist")); } } if (Directory.Exists(GetPathToFile(Folder + "\\Languages"))) { Language.SetFolders += new hook_SetFolders(SetFolders); } else { Debug.LogWarning((object)(Folder + "\\Languages | Folder does not exist")); } if (Directory.Exists(GetPathToFile(Folder + "\\AssetBundles"))) { Bundle = AssetBundle.LoadFromFile(GetPathToFile(Folder + "\\AssetBundles", "altskins")); } else { Debug.LogWarning((object)(Folder + "\\AssetBundles | Folder does not exist")); } } private static void SetFolders(orig_SetFolders orig, Language self, IEnumerable<string> newFolders) { IEnumerable<string> second = Directory.EnumerateDirectories(Path.Combine(GetPathToFile(Folder + "\\Languages")), self.name); orig.Invoke(self, newFolders.Union(second)); } internal static string GetPathToFile(string folderName) { return Path.Combine(assemblyDir, folderName); } internal static string GetPathToFile(string folderName, string fileName) { return Path.Combine(assemblyDir, folderName, fileName); } } public class WConfig { public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Wolfo_Skins.cfg", true); public static ConfigEntry<bool> cfgUnlockAll; public static ConfigEntry<bool> cfgRunAutoUnlocker; public static ConfigEntry<bool> cfgLockEverything; public static ConfigEntry<bool> cfgClientHost; public static ConfigEntry<bool> cfgSort; public static ConfigEntry<bool> cfgLegacySkins; public static ConfigEntry<bool> cfgSilentRelockReunlock; public static ConfigEntry<bool> cfgClearAchievementView; public static ConfigEntry<bool> cfgFalseSonAttackColors; public static void InitConfig() { cfgUnlockAll = ConfigFileUNSORTED.Bind<bool>("Main", "Unlock all skins", false, "Makes skins not require unlocks.\n\nUnlocks and Achievements remain to be collected."); cfgRunAutoUnlocker = ConfigFileUNSORTED.Bind<bool>("Main", "Check for missing unlocks", true, "Automatically grants Simu achievements for characters you already beat wave 50.\n\nGrants the AltBoss tracker if you have the old achievement but did not beat Wave 50.\n\nAnd just generally makes sure you didn't lose anything."); cfgLockEverything = ConfigFileUNSORTED.Bind<bool>("Main", "Re-lock Everything", false, "Revoke all achievements related to this mod that you have.\n\nRemoves AltBoss/Simu tracker unlock so you need to reearn them or have the auto unlocker give them to you.\n\nDoes Not remove LunarScav/Voidling Tracker unlock."); cfgSort = ConfigFileUNSORTED.Bind<bool>("Main", "Sort skins later", true, "Sort skins at the end of the skin list. This is mostly here in case it causes issues."); cfgSilentRelockReunlock = ConfigFileUNSORTED.Bind<bool>("Other", "Silently ReLockReUnlock v2", true, "For whenever an update breaks smth"); cfgClearAchievementView = ConfigFileUNSORTED.Bind<bool>("Other", "Clear Achievement Notifs", false, "Clears any remaining notifiations if pressed in game."); cfgRunAutoUnlocker.SettingChanged += CfgRunAutoUnlocker_SettingChanged; cfgLockEverything.SettingChanged += CfgLockEverything_SettingChanged; cfgClearAchievementView.SettingChanged += CfgClearAchievementView_SettingChanged; RiskConfig(); } private static void CfgClearAchievementView_SettingChanged(object sender, EventArgs e) { LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser(); if (firstLocalUser == null) { Debug.LogError((object)"NO LOCAL USER"); return; } UserProfile userProfile = firstLocalUser.userProfile; if (userProfile == null) { Debug.LogError((object)"NO LOCAL USER"); return; } userProfile.ClearAllAchievementNotifications(); cfgClearAchievementView.Value = false; } private static void CfgLockEverything_SettingChanged(object sender, EventArgs e) { if (cfgLockEverything.Value) { Unlocks.LockEverything(null); Unlocks.UpdateBothObjective_AtStartForAll(null); } } private static void CfgRunAutoUnlocker_SettingChanged(object sender, EventArgs e) { if (cfgRunAutoUnlocker.Value) { Unlocks.CheckForPreviouslyEarned(null, clearView: false); Unlocks.UpdateBothObjective_AtStartForAll(null); } } internal static void RiskConfig() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown Sprite modIcon = WRect.MakeIcon256(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/icon.png")); ModSettingsManager.SetModIcon(modIcon); ModSettingsManager.SetModDescription("Too many skins"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgRunAutoUnlocker, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgUnlockAll, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgLockEverything, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgClearAchievementView, false)); } } public static class ArrayUtil { public static T[] Add<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray(); } public static T[] Remove<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Except(items).ToArray(); } } public class WRect { public static readonly Random random = new Random(); public static Rect recnothing = new Rect(0f, 0f, 0f, 0f); public static Rect recwide = new Rect(0f, 0f, 384f, 256f); public static Rect rechalftall = new Rect(0f, 0f, 256f, 320f); public static Rect rechalfwide = new Rect(0f, 0f, 320f, 256f); public static Rect rectall = new Rect(0f, 0f, 256f, 384f); public static Rect rec512 = new Rect(0f, 0f, 512f, 512f); public static Rect rec320 = new Rect(0f, 0f, 320f, 320f); public static Rect rec256 = new Rect(0f, 0f, 256f, 256f); public static Rect rec192 = new Rect(0f, 0f, 192f, 192f); public static Rect rec128 = new Rect(0f, 0f, 128f, 128f); public static Rect rec106 = new Rect(0f, 0f, 106f, 106f); public static Rect rec64 = new Rect(0f, 0f, 64f, 64f); public static Rect rec32 = new Rect(0f, 0f, 32f, 32f); public static Vector2 half = new Vector2(0.5f, 0.5f); public static Texture MakeTexture(TextureWrapMode filter, Texture2D texture2) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) ((Texture)texture2).wrapMode = filter; return (Texture)(object)texture2; } public static Sprite MakeIcon(Texture2D texture) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Sprite.Create(texture, rec128, half); } public static Sprite MakeIcon256(Texture2D texture) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Sprite.Create(texture, rec256, half); } public static Sprite MakeIcon32(Texture2D texture) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Sprite.Create(texture, rec32, half); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Wolfo.WolfoSkins", "WolfoSkins", "2.1.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class WolfoSkins : BaseUnityPlugin { public void Awake() { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown Assets.Init(((BaseUnityPlugin)this).Info); WConfig.InitConfig(); Unlocks.Hooks(); SkinsCommando.Start(); SkinsHuntress.Start(); SkinsBandit2.Start(); SkinsToolbot_MULT.Start(); SkinsEngineer.Start(); SkinsMage_Artificer.Start(); SkinsMerc.Start(); SkinsTreebot_REX.Start(); SkinsLoader.Start(); SkinsCroco_Acrid.Start(); SkinsCaptain.Start(); SkinsRailGunner.Start(); SkinsVoidFiend.Start(); SkinsSeeker.Start(); SkinsChef.Start(); SkinsFalseSon.Start(); ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)ModSupport); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)SortSkinsLate); SkinDef.Apply += new hook_Apply(SkinDef_Apply); TemporaryOverlay.AddToCharacerModel += new hook_AddToCharacerModel(ReplaceTemporaryOverlayMaterial); GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/AssassinBody"); if (Object.op_Implicit((Object)(object)val)) { val.GetComponent<CharacterBody>().baseNameToken = "ASSASSIN"; } } private void SkinDef_Apply(orig_Apply orig, SkinDef self, GameObject model) { orig.Invoke(self, model); if (Object.op_Implicit((Object)(object)model.GetComponent<SkinDefWolfoTracker>())) { model.GetComponent<SkinDefWolfoTracker>().UndoWolfoSkin(); } if (self is SkinDefWolfo) { (self as SkinDefWolfo).ApplyExtras(model); } } internal static void SortSkinsLate() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) List<string> list = new List<string> { "Enforcer", "HANDOverclocked", "Miner", "GnomeChefBody", "RobPaladin" }; for (int i = 0; i < SurvivorCatalog.survivorDefs.Length; i++) { if (list.Contains(SurvivorCatalog.survivorDefs[i].cachedName)) { continue; } GameObject bodyPrefab = SurvivorCatalog.survivorDefs[i].bodyPrefab; ModelSkinController componentInChildren = bodyPrefab.GetComponentInChildren<ModelSkinController>(); if (!Object.op_Implicit((Object)(object)componentInChildren)) { Debug.LogWarning((object)(((object)SurvivorCatalog.survivorDefs[i])?.ToString() + " has no ModelSkinController")); } else { if (componentInChildren.skins.Length <= 4) { continue; } BodyIndex bodyIndex = bodyPrefab.GetComponent<CharacterBody>().bodyIndex; List<SkinDef> list2 = new List<SkinDef>(); List<SkinDef> list3 = new List<SkinDef>(); for (int j = 0; j < componentInChildren.skins.Length; j++) { if (((Object)componentInChildren.skins[j]).name.Contains("Wolfo")) { list3.Add(componentInChildren.skins[j]); } else { list2.Add(componentInChildren.skins[j]); } } if (list3.Count > 0) { list2.AddRange(list3); SkinDef[] array = (componentInChildren.skins = list2.ToArray()); BodyCatalog.skins[bodyIndex] = array; SkinCatalog.skinsByBody[bodyIndex] = array; } } } GC.Collect(); } internal static void ModSupport() { GameObject val = BodyCatalog.FindBodyPrefab("GnomeChefBody"); if ((Object)(object)val != (Object)null) { SkinsCHEFMod.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("HANDOverclockedBody"); if ((Object)(object)val != (Object)null) { SkinsHand.ModdedSkin(val); } if (Chainloader.PluginInfos.ContainsKey("com.EnforcerGang.Enforcer")) { val = BodyCatalog.FindBodyPrefab("EnforcerBody"); if ((Object)(object)val != (Object)null) { SkinsEnforcer.ModdedSkin(val); } } val = BodyCatalog.FindBodyPrefab("Executioner2Body"); if ((Object)(object)val != (Object)null) { SkinsExecutioner.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("SniperClassicBody"); if ((Object)(object)val != (Object)null) { SkinsSniper.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("RobRavagerBody"); if ((Object)(object)val != (Object)null) { SkinsRavager.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("RocketSurvivorBody"); if ((Object)(object)val != (Object)null) { SkinsRocket.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("MoffeinPilotBody"); if ((Object)(object)val != (Object)null) { SkinsPilot.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("MinerBody"); if ((Object)(object)val != (Object)null) { SkinsMiner.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("ChirrBody"); if ((Object)(object)val != (Object)null) { SkinsChirr.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("ArsonistBody"); if ((Object)(object)val != (Object)null) { SkinsArsonist.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("TeslaTrooperBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToTeslaTrooper(val); } val = BodyCatalog.FindBodyPrefab("TeslaTowerBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToTeslaTower(val); } val = BodyCatalog.FindBodyPrefab("DesolatorBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToDesolator(val); } val = BodyCatalog.FindBodyPrefab("RobPaladinBody"); if ((Object)(object)val != (Object)null) { SkinsPaladin.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("NemesisEnforcerBody"); if ((Object)(object)val != (Object)null) { SkinsNemEnforcer.ModdedSkin(val); } } private void ReplaceTemporaryOverlayMaterial(orig_AddToCharacerModel orig, TemporaryOverlay self, CharacterModel characterModel) { if (Object.op_Implicit((Object)(object)characterModel)) { OverlayMaterialReplacer component = ((Component)characterModel).GetComponent<OverlayMaterialReplacer>(); if (Object.op_Implicit((Object)(object)component) && (Object)(object)self.originalMaterial == (Object)(object)component.targetMaterial) { self.originalMaterial = component.replacementMaterial; } } orig.Invoke(self, characterModel); } } public class SkinDefWolfo : SkinDef { [Serializable] public struct MaterialChanger { public Material targetMaterial; public Material replacementMaterial; } [Serializable] public struct LightColorChanges { public string lightPath; public Color color; public Color color2; } public LightColorChanges[] lightColorsChanges = Array.Empty<LightColorChanges>(); public ItemDisplayRule[] addGameObjects = Array.Empty<ItemDisplayRule>(); public MaterialChanger changeMaterial; public Transform disableThis; public void Awake() { } public void ApplyExtras(GameObject modelObject) { //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) CharacterModel component = modelObject.GetComponent<CharacterModel>(); SkinDefWolfoTracker skinDefWolfoTracker = default(SkinDefWolfoTracker); if (!modelObject.TryGetComponent<SkinDefWolfoTracker>(ref skinDefWolfoTracker)) { skinDefWolfoTracker = modelObject.AddComponent<SkinDefWolfoTracker>(); } if (Object.op_Implicit((Object)(object)changeMaterial.targetMaterial)) { OverlayMaterialReplacer overlayMaterialReplacer = modelObject.AddComponent<OverlayMaterialReplacer>(); overlayMaterialReplacer.targetMaterial = changeMaterial.targetMaterial; overlayMaterialReplacer.replacementMaterial = changeMaterial.replacementMaterial; } skinDefWolfoTracker.model = component; skinDefWolfoTracker.changedLights = new SkinDefWolfoTracker.ChangedLightColors[lightColorsChanges.Length]; for (int i = 0; lightColorsChanges.Length > i; i++) { Transform val = modelObject.transform.Find(lightColorsChanges[i].lightPath); if (Object.op_Implicit((Object)(object)val)) { Light component2 = ((Component)val).GetComponent<Light>(); if (Object.op_Implicit((Object)(object)component2)) { skinDefWolfoTracker.changedLights[i] = new SkinDefWolfoTracker.ChangedLightColors { light = component2, originalColor = component2.color }; component2.color = lightColorsChanges[i].color; for (int j = 0; component.baseLightInfos.Length > j; j++) { if ((Object)(object)component.baseLightInfos[j].light == (Object)(object)component2) { component.baseLightInfos[j].defaultColor = lightColorsChanges[i].color; } } } TrailRenderer component3 = ((Component)val).GetComponent<TrailRenderer>(); if (Object.op_Implicit((Object)(object)component3)) { skinDefWolfoTracker.changedLights[i] = new SkinDefWolfoTracker.ChangedLightColors { trail = component3, originalColor = component3.startColor, trailEndColor = component3.endColor }; component3.startColor = lightColorsChanges[i].color; component3.endColor = lightColorsChanges[i].color2; } if (!Object.op_Implicit((Object)(object)component2) && !Object.op_Implicit((Object)(object)component3)) { Debug.LogWarning((object)(lightColorsChanges[i].lightPath + " : Not Light or Trail attached")); } } else { Debug.LogWarning((object)(lightColorsChanges[i].lightPath + " : Not Found")); } } skinDefWolfoTracker.addedObjects = (GameObject[])(object)new GameObject[addGameObjects.Length]; for (int k = 0; addGameObjects.Length > k; k++) { Transform val2 = component.childLocator.FindChild(addGameObjects[k].childName); if (Object.op_Implicit((Object)(object)val2)) { GameObject val3 = Object.Instantiate<GameObject>(addGameObjects[k].followerPrefab, val2); val3.transform.localPosition = addGameObjects[k].localPos; val3.transform.localEulerAngles = addGameObjects[k].localAngles; val3.transform.localScale = addGameObjects[k].localScale; skinDefWolfoTracker.addedObjects[k] = val3; ItemDisplay component4 = val3.GetComponent<ItemDisplay>(); if (Object.op_Implicit((Object)(object)component4)) { component.baseRendererInfos = component.baseRendererInfos.Add(component4.rendererInfos); } } } if (!Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)modelObject.transform.parent) && ((Object)modelObject).name.EndsWith("Engi")) { EngiDisplay(modelObject, skinDefWolfoTracker); } if (Object.op_Implicit((Object)(object)disableThis)) { ((Component)disableThis).gameObject.SetActive(false); skinDefWolfoTracker.disabledTransform = disableThis; } } public void EngiDisplay(GameObject modelObject, SkinDefWolfoTracker tracker) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) Transform val = modelObject.transform.parent.Find("mdlEngi/EngiArmature/ROOT/base/stomach/chest/upper_arm.l/lower_arm.l/hand.l/IKBoneStart/IKBoneMid/MineHolder"); Material defaultMaterial = base.minionSkinReplacements[0].minionSkin.rendererInfos[0].defaultMaterial; GameObject val2 = Object.Instantiate<GameObject>(base.projectileGhostReplacements[1].projectileGhostReplacementPrefab, val.GetChild(0)); GameObject val3 = Object.Instantiate<GameObject>(base.projectileGhostReplacements[2].projectileGhostReplacementPrefab, val.GetChild(1)); val3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); tracker.addedObjects = (GameObject[])(object)new GameObject[2] { val2, val3 }; ((Component)val.GetChild(0).GetChild(1)).gameObject.SetActive(false); ((Component)val.GetChild(0).GetChild(2)).gameObject.SetActive(false); ((Component)val.GetChild(1).GetChild(1)).gameObject.SetActive(false); ((Component)val.GetChild(1).GetChild(0)).gameObject.SetActive(false); ((Renderer)((Component)modelObject.transform.parent.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = defaultMaterial; } } public class SkinDefWolfoTracker : MonoBehaviour { [Serializable] public struct ChangedLightColors { public Light light; public TrailRenderer trail; public Color originalColor; public Color trailEndColor; } public GameObject[] addedObjects; public ChangedLightColors[] changedLights; public CharacterModel model; public Transform disabledTransform; public void UndoWolfoSkin() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)disabledTransform)) { ((Component)disabledTransform).gameObject.SetActive(true); } if (changedLights != null) { for (int i = 0; changedLights.Length > i; i++) { if (Object.op_Implicit((Object)(object)changedLights[i].light)) { changedLights[i].light.color = changedLights[i].originalColor; for (int j = 0; model.baseLightInfos.Length > j; j++) { if ((Object)(object)model.baseLightInfos[j].light == (Object)(object)changedLights[i].light) { model.baseLightInfos[j].defaultColor = changedLights[i].originalColor; } } } if (Object.op_Implicit((Object)(object)changedLights[i].trail)) { changedLights[i].trail.startColor = changedLights[i].originalColor; changedLights[i].trail.endColor = changedLights[i].trailEndColor; } } } if (addedObjects != null) { for (int k = 0; addedObjects.Length > k; k++) { Object.Destroy((Object)(object)addedObjects[k]); } } Object.DestroyImmediate((Object)(object)this); } } public class OverlayMaterialReplacer : MonoBehaviour { public Material targetMaterial; public Material replacementMaterial; } public class SkinsBandit2 { [RegisterAchievement("CLEAR_ANY_BANDIT2", "Skins.Bandit2.Wolfo.First", null, 5u, null)] public class ClearSimulacrumBandit2Body : Achievement_AltBoss_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("Bandit2Body"); } } [RegisterAchievement("CLEAR_BOTH_BANDIT2", "Skins.Bandit2.Wolfo.Both", null, 5u, null)] public class ClearSimulacrumBandit2Body2 : Achievement_AltBoss_AND_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("Bandit2Body"); } } internal static void Start() { BanditSkin(); Bandit_AltColossus(); BanditSkinGreen(); BanditSkinPurple(); } internal static void Bandit_AltColossus() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Bandit2/skinBandit2AltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val3 = Object.Instantiate<Material>(val.rendererInfos[4].defaultMaterial); Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusDiffuse.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusWeaponsDiffuse.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; Texture2D val6 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusWeaponsEmissive.png"); ((Texture)val6).wrapMode = (TextureWrapMode)1; val2.mainTexture = (Texture)(object)val4; val2.SetColor("_EmColor", new Color(1f, 0.5f, 0f, 1f)); val2.SetFloat("_EmPower", 2.22f); val2.SetFloat("_GreenChannelBias", -5f); val3.mainTexture = (Texture)(object)val5; val3.SetTexture("_EmTex", (Texture)(object)val6); array[0].defaultMaterial = val2; array[1].defaultMaterial = val2; array[2].defaultMaterial = val2; array[3].defaultMaterial = val2; array[4].defaultMaterial = val3; array[5].defaultMaterial = val3; array[6].defaultMaterial = val3; array[7].defaultMaterial = val3; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinBandit2AltColossusWolfo_AltBoss"; ((SkinDef)skinDefWolfo).nameToken = "SIMU_SKIN_BANDIT_COLOSSUS"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/icon.png")); ((SkinDef)skinDefWolfo).baseSkins = val.baseSkins; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body"), (SkinDef)(object)skinDefWolfo); } internal static void BanditSkin() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[0]; SkinDef val2 = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[1]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[8]; Array.Copy(val.rendererInfos, array, 8); Material val3 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val6 = Object.Instantiate<Material>(val.rendererInfos[4].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[5].defaultMaterial); Material val8 = Object.Instantiate<Material>(val.rendererInfos[7].defaultMaterial); Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedDiffuse.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; Texture2D val10 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedCoatDiffuse.png"); ((Texture)val10).wrapMode = (TextureWrapMode)1; Texture2D val11 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedEmission.png"); ((Texture)val11).wrapMode = (TextureWrapMode)1; Texture2D val12 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditShotgunDiffuse.png"); ((Texture)val12).wrapMode = (TextureWrapMode)1; val3.mainTexture = (Texture)(object)val9; val4.mainTexture = (Texture)(object)val10; val5.mainTexture = (Texture)(object)val10; val6.mainTexture = (Texture)(object)val12; val7.mainTexture = (Texture)(object)val12; val8.mainTexture = (Texture)(object)val12; val3.SetTexture("_EmTex", (Texture)(object)val11); val3.SetColor("_EmColor", new Color(1.1f, 0.88f, 1.1f)); val6.SetColor("_EmColor", new Color(0.5f, 0.15f, 0.25f)); val4.color = new Color(0.95f, 0.95f, 0.87f); array[0].defaultMaterial = val3; array[1].defaultMaterial = val3; array[2].defaultMaterial = val3; array[3].defaultMaterial = val4; array[4].defaultMaterial = val6; array[5].defaultMaterial = val7; array[6].defaultMaterial = val5; array[7].defaultMaterial = val8; MeshReplacement[] array2 = (MeshReplacement[])(object)new MeshReplacement[val.meshReplacements.Length]; val.meshReplacements.CopyTo(array2, 0); array2[3] = val2.meshReplacements[2]; SkinDefInfo val13 = default(SkinDefInfo); val13.Name = "skinBandit2Wolfo_Simu"; val13.NameToken = "SIMU_SKIN_BANDIT"; val13.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedSkinIcon.png")); val13.BaseSkins = val2.baseSkins; val13.MeshReplacements = array2; val13.ProjectileGhostReplacements = val.projectileGhostReplacements; val13.RendererInfos = array; val13.RootObject = val.rootObject; SkinDefInfo val14 = val13; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body"), val14); } internal static void BanditSkinPurple() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[0]; SkinDef val2 = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[1]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[8]; Array.Copy(val.rendererInfos, array, 8); Material val3 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val6 = Object.Instantiate<Material>(val.rendererInfos[4].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[5].defaultMaterial); Material val8 = Object.Instantiate<Material>(val.rendererInfos[7].defaultMaterial); Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedDiffusePURPLE.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; Texture2D val10 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedCoatDiffusePURPLE.png"); ((Texture)val10).wrapMode = (TextureWrapMode)1; Texture2D val11 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedEmissionPURPLE.png"); ((Texture)val11).wrapMode = (TextureWrapMode)1; Texture2D val12 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditShotgunDiffusePURPLE.png"); ((Texture)val12).wrapMode = (TextureWrapMode)1; val3.mainTexture = (Texture)(object)val9; val4.mainTexture = (Texture)(object)val10; val5.mainTexture = (Texture)(object)val10; val6.mainTexture = (Texture)(object)val12; val7.mainTexture = (Texture)(object)val12; val8.mainTexture = (Texture)(object)val12; val3.SetTexture("_EmTex", (Texture)(object)val11); val3.SetColor("_EmColor", new Color(1.2f, 1.2f, 0.5f)); val6.SetColor("_EmColor", new Color(0.8f, 0.7f, 0f)); array[0].defaultMaterial = val3; array[1].defaultMaterial = val3; array[2].defaultMaterial = val3; array[3].defaultMaterial = val4; array[4].defaultMaterial = val6; array[5].defaultMaterial = val7; array[6].defaultMaterial = val5; array[7].defaultMaterial = val8; MeshReplacement[] array2 = (MeshReplacement[])(object)new MeshReplacement[val.meshReplacements.Length]; val.meshReplacements.CopyTo(array2, 0); array2[3] = val2.meshReplacements[2]; SkinDefInfo val13 = default(SkinDefInfo); val13.Name = "skinBandit2WolfoPurple_Simu"; val13.NameToken = "SIMU_SKIN_BANDIT2"; val13.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/icon.png")); val13.BaseSkins = val2.baseSkins; val13.MeshReplacements = array2; val13.ProjectileGhostReplacements = val.projectileGhostReplacements; val13.RendererInfos = array; val13.RootObject = val.rootObject; SkinDefInfo val14 = val13; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body"), val14); } internal static void BanditSkinGreen() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[0]; SkinDef val2 = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[1]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[8]; Array.Copy(val.rendererInfos, array, 8); Material val3 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val6 = Object.Instantiate<Material>(val.rendererInfos[4].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[5].defaultMaterial); Material val8 = Object.Instantiate<Material>(val.rendererInfos[7].defaultMaterial); Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedDiffuseGREEN.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; Texture2D val10 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedCoatDiffuseGREEN.png"); ((Texture)val10).wrapMode = (TextureWrapMode)1; Texture2D val11 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedEmissionGREEN.png"); ((Texture)val11).wrapMode = (TextureWrapMode)1; Texture2D val12 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditShotgunDiffuseGREEN.png"); ((Texture)val12).wrapMode = (TextureWrapMode)1; val3.mainTexture = (Texture)(object)val9; val4.mainTexture = (Texture)(object)val10; val5.mainTexture = (Texture)(object)val10; val6.mainTexture = (Texture)(object)val12; val7.mainTexture = (Texture)(object)val12; val8.mainTexture = (Texture)(object)val12; val3.SetTexture("_EmTex", (Texture)(object)val11); val3.SetColor("_EmColor", new Color(1f, 1.2f, 0.7f)); val6.SetColor("_EmColor", new Color(0.4f, 0.5f, 0.15f)); array[0].defaultMaterial = val3; array[1].defaultMaterial = val3; array[2].defaultMaterial = val3; array[3].defaultMaterial = val4; array[4].defaultMaterial = val6; array[5].defaultMaterial = val7; array[6].defaultMaterial = val5; array[7].defaultMaterial = val8; MeshReplacement[] array2 = (MeshReplacement[])(object)new MeshReplacement[val.meshReplacements.Length]; val.meshReplacements.CopyTo(array2, 0); array2[3] = val2.meshReplacements[2]; SkinDefInfo val13 = default(SkinDefInfo); val13.Name = "skinBandit2Wolfo_Green_Simu"; val13.NameToken = "SIMU_SKIN_BANDIT_GREEN"; val13.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/icon.png")); val13.BaseSkins = val2.baseSkins; val13.MeshReplacements = array2; val13.ProjectileGhostReplacements = val.projectileGhostReplacements; val13.RendererInfos = array; val13.RootObject = val.rootObject; SkinDefInfo val14 = val13; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/Bandit2Body"), val14); } } public class SkinsCaptain { [RegisterAchievement("CLEAR_ANY_CAPTAIN", "Skins.Captain.Wolfo.First", "CompleteMainEnding", 5u, null)] public class Bandit2ClearGameMonsoonAchievement : Achievement_AltBoss_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CaptainBody"); } } [RegisterAchievement("CLEAR_BOTH_CAPTAIN", "Skins.Captain.Wolfo.Both", "CompleteMainEnding", 5u, null)] public class Bandit2ClearGameMonsoonAchievement2 : Achievement_AltBoss_AND_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CaptainBody"); } } internal static void Start() { Captain_Pink(); Captain_Blue(); AltColossus(); } internal static void AltColossus() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Captain/skinCaptainAltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[7]; Array.Copy(val.rendererInfos, array, 7); Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusClothesDiffuse.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusDiffuse.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusDiffuseHat.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusFresnelMask.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; val.rendererInfos[1].defaultMaterial.SetTexture("_NormalTex", (Texture)null); val.rendererInfos[1].defaultMaterial.SetTexture("_GreenChannelNormalTex", (Texture)null); Material val6 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[1].defaultMaterial); val6.mainTexture = (Texture)(object)val2; val7.mainTexture = (Texture)(object)val3; val7.SetTexture("_NormalTex", (Texture)null); val7.SetTexture("_GreenChannelTex", (Texture)null); val7.SetTexture("_GreenChannelNormalTex", (Texture)null); val7.SetColor("_EmColor", new Color(1.5f, 0.45f, 0.3f, 1f)); Material val8 = Object.Instantiate<Material>(val7); val8.mainTexture = (Texture)(object)val4; array[0].defaultMaterial = val6; array[1].defaultMaterial = val8; array[2].defaultMaterial = val7; array[3].defaultMaterial = val6; array[4].defaultMaterial = val7; array[5].defaultMaterial = val7; array[6].defaultMaterial = val6; SkinDefInfo val9 = default(SkinDefInfo); val9.NameToken = "SIMU_SKIN_CAPTAIN_COLOSSUS"; val9.Name = "skinCaptainAltColossusWolfo_AltBoss"; val9.BaseSkins = val.baseSkins; val9.RootObject = val.rootObject; val9.RendererInfos = array; val9.MeshReplacements = val.meshReplacements; val9.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/Captain.png")); SkinDefInfo val10 = val9; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody"), val10); } internal static void Colossus_Orange() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Captain/skinCaptainAltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[7]; Array.Copy(val.rendererInfos, array, 7); Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/ColossusOrange/texCaptainColossusClothesDiffuse.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/ColossusOrange/texCaptainColossusDiffuse.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/ColossusOrange/texCaptainColossusDiffuseHat.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/ColossusOrange/texCaptainColossusFresnelMask.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; val.rendererInfos[1].defaultMaterial.SetTexture("_NormalTex", (Texture)null); val.rendererInfos[1].defaultMaterial.SetTexture("_GreenChannelNormalTex", (Texture)null); Material val6 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[1].defaultMaterial); val6.mainTexture = (Texture)(object)val2; val7.mainTexture = (Texture)(object)val3; val7.SetTexture("_NormalTex", (Texture)null); val7.SetTexture("_GreenChannelTex", (Texture)null); val7.SetTexture("_GreenChannelNormalTex", (Texture)null); val7.SetColor("_EmColor", new Color(1f, 1f, 0.2f, 1f)); Material val8 = Object.Instantiate<Material>(val7); val8.mainTexture = (Texture)(object)val4; array[0].defaultMaterial = val6; array[1].defaultMaterial = val8; array[2].defaultMaterial = val7; array[3].defaultMaterial = val6; array[4].defaultMaterial = val7; array[5].defaultMaterial = val7; array[6].defaultMaterial = val6; SkinDefInfo val9 = default(SkinDefInfo); val9.NameToken = "SIMU_SKIN_CAPTAIN_COLOSSUS"; val9.Name = "skinCaptainAltColossusWolfo_AltBoss2"; val9.BaseSkins = val.baseSkins; val9.RootObject = val.rootObject; val9.RendererInfos = array; val9.MeshReplacements = val.meshReplacements; val9.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/ColossusOrange/Captain.png")); SkinDefInfo val10 = val9; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody"), val10); } internal static void Captain_Pink() { //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[1]; Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainJacketDiffuseW.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW2.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW3.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[7]; Array.Copy(val.rendererInfos, array, 7); Material val6 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val7 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val8 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val9 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Material val10 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Material val11 = Object.Instantiate<Material>(val.rendererInfos[4].defaultMaterial); val6.mainTexture = (Texture)(object)val3; val7.mainTexture = (Texture)(object)val4; val8.mainTexture = (Texture)(object)val5; val9.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)190, (byte)135, byte.MaxValue)); val10.mainTexture = (Texture)(object)val2; val11.SetColor("_EmColor", new Color(1.2f, 0.6f, 1.2f, 1f)); val11.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)190, (byte)135, byte.MaxValue)); array[0].defaultMaterial = val6; array[1].defaultMaterial = val8; array[2].defaultMaterial = val9; array[3].defaultMaterial = val10; array[4].defaultMaterial = val11; array[5].defaultMaterial = val11; array[6].defaultMaterial = val7; SkinDefInfo val12 = default(SkinDefInfo); val12.BaseSkins = val.baseSkins; val12.NameToken = "SIMU_SKIN_CAPTAIN"; val12.RootObject = val.rootObject; val12.RendererInfos = array; val12.Name = "skinCaptainWolfo_Simu"; val12.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/texCaptainPinkSkinIcon.png")); SkinDefInfo val13 = val12; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody"), val13); } internal static void Captain_Blue() { //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) SkinDef val = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[0]; SkinDef val2 = ((Component)LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody").transform.GetChild(0).GetChild(0)).gameObject.GetComponent<ModelSkinController>().skins[1]; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainJacketDiffuseAltBLUE.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainPaletteAltBLUE.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainPaletteAltBLUE2.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[7]; Array.Copy(val2.rendererInfos, array, 7); Material val6 = Object.Instantiate<Material>(val2.rendererInfos[0].defaultMaterial); Material val7 = Object.Instantiate<Material>(val2.rendererInfos[0].defaultMaterial); Material val8 = Object.Instantiate<Material>(val2.rendererInfos[2].defaultMaterial); Material val9 = Object.Instantiate<Material>(val2.rendererInfos[3].defaultMaterial); Material val10 = Object.Instantiate<Material>(val2.rendererInfos[4].defaultMaterial); val6.mainTexture = (Texture)(object)val4; val7.mainTexture = (Texture)(object)val5; val7.color = new Color(0.8f, 0.8f, 0.8f); val8.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)225, (byte)135, byte.MaxValue)); val9.mainTexture = (Texture)(object)val3; val10.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)225, (byte)135, byte.MaxValue)); val10.SetColor("_EmColor", new Color(1f, 1f, 0.3f, 1f)); array[0].defaultMaterial = val6; array[1].defaultMaterial = val6; array[2].defaultMaterial = val8; array[3].defaultMaterial = val9; array[4].defaultMaterial = val10; array[5].defaultMaterial = val10; array[6].defaultMaterial = val7; SkinDefInfo val11 = default(SkinDefInfo); val11.BaseSkins = val2.baseSkins; val11.NameToken = "SIMU_SKIN_CAPTAIN_BLUE"; val11.RootObject = val2.rootObject; val11.RendererInfos = array; val11.Name = "skinCaptainWolfo_Blue_Simu"; val11.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texSkinSwatches_25BLUE.png")); SkinDefInfo val12 = val11; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CaptainBody"), val12); } } public class SkinsCommando { [RegisterAchievement("CLEAR_ANY_COMMANDO", "Skins.Commando.Wolfo.First", null, 5u, null)] public class CommandoClearAlt1 : Achievement_AltBoss_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CommandoBody"); } } [RegisterAchievement("CLEAR_BOTH_COMMANDO", "Skins.Commando.Wolfo.Both", null, 5u, null)] public class CommandoClearAlt2 : Achievement_AltBoss_AND_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CommandoBody"); } } public static GameObject CommandoDashJetsBlue = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoDashJets.prefab").WaitForCompletion(), "CommandoDashJetsBlue", false); internal static void Start() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown CommandoSkin_Unused(); CommandoSkin_Provi(); Commando_AltColossus(); DodgeState.OnEnter += new hook_OnEnter(DodgeState_OnEnter); SlideState.OnEnter += new hook_OnEnter(SlideState_OnEnter); } internal static void Commando_AltColossus() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Commando/skinCommandoAltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/Colossus/texCommandoAltColossusDiffuse.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/Colossus/texRampBeetleQueen.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; val2.mainTexture = (Texture)(object)val3; val2.SetTexture("_FlowHeightRamp", (Texture)(object)val4); val2.SetFloat("_FlowEmissionStrength", 2f); array[0].defaultMaterial = val2; array[1].defaultMaterial = val2; array[2].defaultMaterial = val2; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinCommandoAltColossusWolfo_AltBoss"; ((SkinDef)skinDefWolfo).nameToken = "SIMU_SKIN_COMMANDO_COLOSSUS"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/Colossus/commando.png")); ((SkinDef)skinDefWolfo).baseSkins = val.baseSkins; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(); GameObject val5 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeGhost.prefab").WaitForCompletion(), "CommandoGrenadeGhostPROVI", false); ((Renderer)((Component)val5.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val2; ((Component)val5.transform.GetChild(4)).GetComponent<Light>().color = new Color(0.34f, 0.67f, 1f); ((SkinDef)skinDefWolfo).projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val5 } }; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), (SkinDef)(object)skinDefWolfo); } internal static void Commando_AltColossusRed() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Commando/skinCommandoAltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/ColossusRed/texCommandoAltColossusDiffuse.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/ColossusRed/texRampBeetleQueen.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; Texture2D val5 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/ColossusRed/texCommandoAltColossusEmissive.png"); ((Texture)val5).wrapMode = (TextureWrapMode)1; val2.mainTexture = (Texture)(object)val3; val2.SetTexture("_FlowHeightRamp", (Texture)(object)val4); val2.SetFloat("_FlowEmissionStrength", 2f); array[0].defaultMaterial = val2; array[1].defaultMaterial = val2; array[2].defaultMaterial = val2; GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(); GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeGhost.prefab").WaitForCompletion(), "CommandoGrenadeGhostPROVI", false); ((Renderer)((Component)val6.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val2; ((Component)val6.transform.GetChild(4)).GetComponent<Light>().color = new Color(0.34f, 0.67f, 1f); SkinDefInfo val7 = default(SkinDefInfo); val7.Name = "skinCommandoAltColossusWolfoRed_AltBoss"; val7.NameToken = "SIMU_SKIN_COMMANDO_COLOSSUSRED"; val7.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/ColossusRed/commando.png")); val7.BaseSkins = val.baseSkins; val7.MeshReplacements = val.meshReplacements; val7.RendererInfos = array; val7.RootObject = val.rootObject; val7.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val6 } }; SkinDefInfo val8 = val7; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), val8); } internal static void CommandoSkin_Unused() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/DLC1/skinCommandoMarine.asset").WaitForCompletion(); Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), val); Material val2 = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/matCommandoDualiesMarine.mat").WaitForCompletion(); val2.DisableKeyword("LIMBREMOVAL"); val.nameToken = "SIMU_SKIN_COMMANDO_SOTV"; } internal static void CommandoSkin_Provi() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Commando/skinCommandoAlt.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/texCommandoPaletteDiffuse.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/texCommandoPaletteDiffuseGUN.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Material val4 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); val4.mainTexture = (Texture)(object)val2; val4.color = new Color(1.1f, 1f, 0.8f); val4.SetColor("_EmColor", new Color(0.2f, 0.9f, 0.9f)); val5.mainTexture = (Texture)(object)val3; val5.color = new Color(1.2f, 1.4f, 1.4f); val5.SetColor("_EmColor", new Color(1f, 2f, 3f)); array[0].defaultMaterial = val5; array[1].defaultMaterial = val5; array[2].defaultMaterial = val4; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinCommandoWolfoProvi_Simu"; ((SkinDef)skinDefWolfo).nameToken = "SIMU_SKIN_COMMANDO"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/skinIconCommando.png")); ((SkinDef)skinDefWolfo).baseSkins = val.baseSkins; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(); GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeGhost.prefab").WaitForCompletion(), "CommandoGrenadeGhostPROVI", false); ((Renderer)((Component)val6.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val4; ((Component)val6.transform.GetChild(4)).GetComponent<Light>().color = new Color(0.34f, 0.67f, 1f); ((SkinDef)skinDefWolfo).projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val6 } }; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), (SkinDef)(object)skinDefWolfo); CommandoDashJetsBlue.GetComponent<Light>().color = new Color(0f, 0.7f, 1f); ((Component)CommandoDashJetsBlue.transform.GetChild(0)).GetComponent<ParticleSystem>().startColor = new Color(0f, 0.425f, 1f); ColorOverLifetimeModule colorOverLifetime = ((Component)CommandoDashJetsBlue.transform.GetChild(0)).GetComponent<ParticleSystem>().colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = false; ((Component)CommandoDashJetsBlue.transform.GetChild(3)).GetComponent<ParticleSystem>().startColor = new Color(0f, 0.3f, 0.3f); ((Component)CommandoDashJetsBlue.transform.GetChild(4)).GetComponent<ParticleSystem>().startColor = new Color(0.3f, 0.8f, 1f, 1f); } private static void SlideState_OnEnter(orig_OnEnter orig, SlideState self) { if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).modelLocator.modelTransform).GetComponent<SkinDefWolfoTracker>())) { GameObject jetEffectPrefab = SlideState.jetEffectPrefab; SlideState.jetEffectPrefab = CommandoDashJetsBlue; orig.Invoke(self); SlideState.jetEffectPrefab = jetEffectPrefab; } else { orig.Invoke(self); } } private static void DodgeState_OnEnter(orig_OnEnter orig, DodgeState self) { if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).modelLocator.modelTransform).GetComponent<SkinDefWolfoTracker>())) { GameObject jetEffect = DodgeState.jetEffect; DodgeState.jetEffect = CommandoDashJetsBlue; orig.Invoke(self); DodgeState.jetEffect = jetEffect; } else { orig.Invoke(self); } } } public class SkinsCroco_Acrid { [RegisterAchievement("CLEAR_ANY_CROCO", "Skins.Croco.Wolfo.First", "BeatArena", 5u, null)] public class CrocoBodyAltEndings : Achievement_AltBoss_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CrocoBody"); } } [RegisterAchievement("CLEAR_BOTH_CROCO", "Skins.Croco.Wolfo.Both", "BeatArena", 5u, null)] public class CrocoBodyAltEndings2 : Achievement_AltBoss_AND_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("CrocoBody"); } } internal static void Start() { AcridSkinBlack(); RoRR_Lunar(); Acrid_AltColossus(); Acrid_AltColossus_Default(); AcridSkinLemurian(); } internal static void Acrid_AltColossus_Default() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoAltColossus.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusDiffuse2.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusEmissive.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Material val4 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); val4.mainTexture = (Texture)(object)val2; val4.SetTexture("_EmTex", (Texture)(object)val3); array[0].defaultMaterial = val4; array[3].defaultMaterial = val4; SkinDefInfo val5 = default(SkinDefInfo); val5.NameToken = "CROCO_SKIN_ALT2_NAME2"; val5.Name = "skinCrocoAltColossusWolfo_Green_AltBoss"; val5.BaseSkins = val.baseSkins; val5.RootObject = val.rootObject; val5.RendererInfos = array; val5.MeshReplacements = val.meshReplacements; val5.UnlockableDef = val.unlockableDef; val5.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/icon2.png")); SkinDefInfo val6 = val5; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CrocoBody"), val6); } internal static void Acrid_AltColossus() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoAltColossus.asset").WaitForCompletion(); val.runtimeSkin = null; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Texture2D val2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusDiffuse.png"); ((Texture)val2).wrapMode = (TextureWrapMode)1; Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusEmissive.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Material val4 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); val4.mainTexture = (Texture)(object)val2; val4.SetTexture("_EmTex", (Texture)(object)val3); val4.SetTexture("_FlowHeightRamp", (Texture)null); val4.SetColor("_EmColor", new Color(0.8f, 0.45f, 1f, 1f)); array[0].defaultMaterial = val4; array[3].defaultMaterial = val4; SkinDefInfo val5 = default(SkinDefInfo); val5.NameToken = "SIMU_SKIN_CROCO_COLOSSUS"; val5.Name = "skinCrocoAltColossusWolfo_AltBoss"; val5.BaseSkins = val.baseSkins; val5.RootObject = val.rootObject; val5.RendererInfos = array; val5.MeshReplacements = val.meshReplacements; val5.Icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/icon.png")); SkinDefInfo val6 = val5; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CrocoBody"), val6); } internal static void RoRR_Lunar() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoDefault.asset").WaitForCompletion(); SkinDef val2 = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoAlt.asset").WaitForCompletion(); val2.runtimeSkin = null; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val3 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Texture2D val6 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoDiffuse.png"); ((Texture)val6).wrapMode = (TextureWrapMode)1; Texture2D val7 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoEmission.png"); ((Texture)val7).wrapMode = (TextureWrapMode)1; Texture2D val8 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoPoisonMask.png"); ((Texture)val8).wrapMode = (TextureWrapMode)1; Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoSpinesDiffuse.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; Texture2D val10 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texRampCrocoDiseaseDark.png"); ((Texture)val10).wrapMode = (TextureWrapMode)1; val3.mainTexture = (Texture)(object)val6; val3.SetTexture("_EmTex", (Texture)(object)val7); val3.SetTexture("_FlowHeightRamp", (Texture)(object)val10); val3.SetTexture("_FlowHeightmap", (Texture)(object)val8); val3.SetColor("_EmColor", new Color(0.2f, 0.8f, 1f)); val4.SetTexture("_FlowHeightmap", (Texture)(object)val8); val5.mainTexture = (Texture)(object)val9; val5.SetTexture("_EmTex", (Texture)(object)val9); val5.SetColor("_EmColor", new Color(0.3f, 0.3f, 0.3f)); array[0].defaultMaterial = val3; array[2].defaultMaterial = val4; array[3].defaultMaterial = val5; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinCrocoWolfo_Simu"; ((SkinDef)skinDefWolfo).nameToken = "SIMU_SKIN_CROCO"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/skinIconCroco.png")); ((SkinDef)skinDefWolfo).baseSkins = val2.baseSkins; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CrocoBody"), (SkinDef)(object)skinDefWolfo); } internal static void AcridSkinBlack() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoDefault.asset").WaitForCompletion(); SkinDef val2 = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoAlt.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val3 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[2].defaultMaterial); Material val5 = Object.Instantiate<Material>(val.rendererInfos[3].defaultMaterial); Texture2D val6 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoDiffuseBLACK.png"); ((Texture)val6).wrapMode = (TextureWrapMode)1; Texture2D val7 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoEmissionBLACK.png"); ((Texture)val7).wrapMode = (TextureWrapMode)1; Texture2D val8 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoPoisonMaskBLACK.png"); ((Texture)val8).wrapMode = (TextureWrapMode)1; Texture2D val9 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoSpinesDiffuseBLACK.png"); ((Texture)val9).wrapMode = (TextureWrapMode)1; Texture2D val10 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoSpinesDiffuseBLACK_EM.png"); ((Texture)val10).wrapMode = (TextureWrapMode)1; Texture2D val11 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texRampCrocoDiseaseDarkBLACK.png"); ((Texture)val11).wrapMode = (TextureWrapMode)1; val3.mainTexture = (Texture)(object)val6; val3.SetTexture("_EmTex", (Texture)(object)val7); val3.SetTexture("_FlowHeightRamp", (Texture)(object)val11); val3.SetTexture("_FlowHeightmap", (Texture)(object)val8); val3.SetColor("_EmColor", new Color(0.3f, 1.2f, 0.2f)); val4.SetTexture("_FlowHeightmap", (Texture)(object)val8); val5.mainTexture = (Texture)(object)val9; val5.SetTexture("_EmTex", (Texture)(object)val10); val5.SetColor("_EmColor", new Color(0.66f, 0.88f, 0.22f)); array[0].defaultMaterial = val3; array[2].defaultMaterial = val4; array[3].defaultMaterial = val5; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinCrocoWolfoBlack_Simu"; ((SkinDef)skinDefWolfo).nameToken = "SIMU_SKIN_CROCO_BLACK"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/skinIconCrocoBLACK.png")); ((SkinDef)skinDefWolfo).baseSkins = val2.baseSkins; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CrocoBody"), (SkinDef)(object)skinDefWolfo); } internal static void AcridSkinLemurian() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoDefault.asset").WaitForCompletion(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Texture2D val3 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lemurian/texCrocoDiffuseLEMURIAN.png"); ((Texture)val3).wrapMode = (TextureWrapMode)1; Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lemurian/texCrocoEmissionLEMURIAN.png"); ((Texture)val4).wrapMode = (TextureWrapMode)1; val2.mainTexture = (Texture)(object)val3; val2.SetTexture("_EmTex", (Texture)(object)val4); val2.SetTexture("_FlowHeightRamp", (Texture)null); val2.SetTexture("_FlowHeightmap", (Texture)null); val2.SetColor("_EmColor", new Color(0.8f, 0.8f, 0.8f)); array[0].defaultMaterial = val2; array[1].defaultMaterial = null; array[2].defaultMaterial = null; array[3].defaultMaterial = null; SkinDefWolfo skinDefWolfo = ScriptableObject.CreateInstance<SkinDefWolfo>(); ((Object)skinDefWolfo).name = "skinCrocoWolfoLemurian"; ((SkinDef)skinDefWolfo).nameToken = "LEMURIAN_BODY_NAME"; ((SkinDef)skinDefWolfo).icon = WRect.MakeIcon(Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lemurian/skinIconCrocoLEMURIAN.png")); ((SkinDef)skinDefWolfo).baseSkins = (SkinDef[])(object)new SkinDef[1] { val }; ((SkinDef)skinDefWolfo).meshReplacements = val.meshReplacements; ((SkinDef)skinDefWolfo).rendererInfos = array; ((SkinDef)skinDefWolfo).rootObject = val.rootObject; skinDefWolfo.disableThis = val.rootObject.transform.GetChild(7); Skins.AddSkinToCharacter(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CrocoBody"), (SkinDef)(object)skinDefWolfo); } } public class SkinsEngineer { [RegisterAchievement("CLEAR_ANY_ENGI", "Skins.Engi.Wolfo.First", "Complete30StagesCareer", 5u, null)] public class ClearSimulacrumTreebotBody : Achievement_AltBoss_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("EngiBody"); } } [RegisterAchievement("CLEAR_BOTH_ENGI", "Skins.Engi.Wolfo.Both", "Complete30StagesCareer", 5u, null)] public class ClearSimulacrumTreebotBody2 : Achievement_AltBoss_AND_Simu { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("EngiBody"); } } internal static void Start() { EngiSkin(); EngiSkinBLUE(); Engi_AltColossus(); } internal static void Engi_AltColossus() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0519: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might