Decompiled source of WolfoAlternateSkins v2.2.4
WolfoSkinsMod.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; 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.Missions.LunarScavengerEncounter; using EntityStates.VoidRaidCrab; using HG; using On.EntityStates.BrotherMonster; using On.EntityStates.Commando; using On.EntityStates.FalseSon; 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 Rewired; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Rendering; [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+2488026516fa87d4da5d75dc7e6d953b945e885b")] [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 || self.waveIndex == 51) { GrantUnlockAndAchievement("CLEAR_SIMU_"); } } internal void <Hooks>b__9_1(orig_OnEnter orig, FadeOut self) { orig.Invoke(self); GrantUnlockAndAchievement("CLEAR_LUNARSCAV_"); } } public static event Action unlockSkins_One; public static event Action unlockSkins_Two; public static event Action unlockSkins_Three; 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 || self.waveIndex == 51) { GrantUnlockAndAchievement("CLEAR_SIMU_"); } }; <>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); GrantUnlockAndAchievement("CLEAR_LUNARSCAV_"); }; <>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(Eclipse_Unlock); Run.onClientGameOverGlobal += BackupInCaseMainFailed; } public static void BackupInCaseMainFailed(Run run, RunReport runReport) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Invalid comparison between Unknown and I4 if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin) { if (runReport.gameEnding.cachedName.Equals("InfiniteTowerEnding")) { GrantUnlockAndAchievement("CLEAR_SIMU_"); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.MainEnding && (int)run.selectedDifficulty >= 6) { GrantUnlockAndAchievement("CLEAR_LUNARSCAV_"); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.LimboEnding) { GrantUnlockAndAchievement("CLEAR_ECLIPSE_"); } else if ((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.VoidEnding) { GrantUnlockAndAchievement("CLEAR_VOIDLING_"); } } } public static void GrantUnlockAndAchievement(string achievement) { if (LocalUserManager.readOnlyLocalUsersList.Count == 0) { return; } UserProfile userProfile = LocalUserManager.readOnlyLocalUsersList[0].userProfile; SurvivorDef survivorPreference = userProfile.GetSurvivorPreference(); if (Object.op_Implicit((Object)(object)survivorPreference)) { string text = survivorPreference.cachedName.ToUpperInvariant(); if (!userProfile.HasAchievement(achievement + text)) { userProfile.AddAchievement(achievement + text, false); } int num = 0; int token = 0; if (userProfile.HasAchievement("CLEAR_LUNARSCAV_" + text)) { num++; token = 1; } if (userProfile.HasAchievement("CLEAR_VOIDLING_" + text)) { num++; token = 2; } if (userProfile.HasAchievement("CLEAR_SIMU_" + text)) { num++; token = 3; } if (userProfile.HasAchievement("CLEAR_ECLIPSE_" + text)) { num++; token = 4; } Achievements.unlockSkins_One?.Invoke(); if (num >= 2) { Achievements.unlockSkins_Two?.Invoke(); Unlocks.UpdateTier2Objective_Specific(userProfile, survivorPreference, 0); } else { Unlocks.UpdateTier2Objective_Specific(userProfile, survivorPreference, token); } } } 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")) { GrantUnlockAndAchievement("CLEAR_VOIDLING_"); } } private static void Eclipse_Unlock(orig_OnEnter orig, TrueDeathState self) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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 >= 6) { GrantUnlockAndAchievement("CLEAR_ECLIPSE_"); } } } public class ACHIEVEMENT_BASE : BaseAchievement { public void Unlock() { base.achievementDef.nameToken = Language.GetString(base.achievementDef.nameToken); ((BaseAchievement)this).Grant(); } } public class Achievement_TWO_THINGS : ACHIEVEMENT_BASE { public override void OnBodyRequirementMet() { if (HasBaseAchievement()) { ((BaseAchievement)this).OnBodyRequirementMet(); Achievements.unlockSkins_Two += base.Unlock; } } public override void OnBodyRequirementBroken() { if (HasBaseAchievement()) { ((BaseAchievement)this).OnBodyRequirementBroken(); Achievements.unlockSkins_Two -= base.Unlock; } } public bool HasBaseAchievement() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Invalid comparison between Unknown and I4 //IL_002d: 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_0034: Unknown result type (might be due to invalid IL or missing references) if (((BaseAchievement)this).owner == null) { return false; } BodyIndex val = ((BaseAchievement)this).LookUpRequiredBodyIndex(); if ((int)val == -1) { return false; } SurvivorIndex survivorIndexFromBodyIndex = SurvivorCatalog.GetSurvivorIndexFromBodyIndex(val); SurvivorDef survivorDef = SurvivorCatalog.GetSurvivorDef(survivorIndexFromBodyIndex); string text = "CLEAR_ANY_" + survivorDef.cachedName.ToUpperInvariant(); AchievementDef achievementDef = AchievementManager.GetAchievementDef(text); if (achievementDef == null) { return false; } return ((BaseAchievement)this).owner.userProfile.HasAchievement(text); } } public class Achievement_ONE_THINGS : ACHIEVEMENT_BASE { public override void OnBodyRequirementMet() { Achievements.unlockSkins_One += base.Unlock; ((BaseAchievement)this).OnBodyRequirementMet(); } public override void OnBodyRequirementBroken() { Achievements.unlockSkins_One -= base.Unlock; ((BaseAchievement)this).OnBodyRequirementBroken(); } } public class FakeAchievementMessage : SubjectFormatChatMessage { public override string ConstructChatString() { return ((SubjectFormatChatMessage)this).ConstructChatString(); } } 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> RemoveSkinUnlocks; 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> cfgDump; public static ConfigEntry<bool> RemoveAllTrackers; public static ConfigEntry<bool> cfgTest; public static void InitConfig() { cfgTest = ConfigFileUNSORTED.Bind<bool>("Test", "cfgTest", false, "Don't"); RemoveAllTrackers = ConfigFileUNSORTED.Bind<bool>("Test", "Remove all unlock trackers", false, "Testing "); 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, "Checks for Eclipse 4+ and Simu Wave 50 completion."); RemoveSkinUnlocks = 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", false, "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 v3", true, "For whenever an update adds, changes or breaks something."); cfgClearAchievementView = ConfigFileUNSORTED.Bind<bool>("Main", "Clear Achievement Notifs", false, "Clears any remaining notifiations if pressed in game."); cfgDump = ConfigFileUNSORTED.Bind<bool>("Test", "cfgDump", false, "cfgDump"); cfgRunAutoUnlocker.SettingChanged += CfgRunAutoUnlocker_SettingChanged; cfgClearAchievementView.SettingChanged += CfgClearAchievementView_SettingChanged; RemoveAllTrackers.SettingChanged += RemoveAllIdentifiers_SettingChanged; RemoveSkinUnlocks.SettingChanged += RemoveAllIdentifiers_SettingChanged; cfgUnlockAll.SettingChanged += CfgUnlockAll_SettingChanged; cfgDump.SettingChanged += CfgDump_SettingChanged; } private static void CfgDump_SettingChanged(object sender, EventArgs e) { if (cfgDump.Value) { H.DumpInfo(); } cfgDump.Value = false; } private static void CfgUnlockAll_SettingChanged(object sender, EventArgs e) { Unlocks.AssignUnlockables(); } private static void RemoveAllIdentifiers_SettingChanged(object sender, EventArgs e) { if (RemoveSkinUnlocks.Value || RemoveAllTrackers.Value) { Unlocks.LockEverything(null, RemoveAllTrackers.Value); Unlocks.UpdateTier2_ForAll(null); } } 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 CfgRunAutoUnlocker_SettingChanged(object sender, EventArgs e) { if (cfgRunAutoUnlocker.Value) { Unlocks.CheckForPreviouslyEarned(null, clearView: false); Unlocks.UpdateTier2_ForAll(null); } } internal static void RiskConfig() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ModSettingsManager.SetModIcon(Assets.Bundle.LoadAsset<Sprite>("Assets/Skins/icon.png")); ModSettingsManager.SetModDescription("Too many skins"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgUnlockAll, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgSort, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgRunAutoUnlocker, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RemoveSkinUnlocks, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgClearAchievementView, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(RemoveAllTrackers, false)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgTest, true)); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(cfgDump, false)); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Wolfo.WolfoSkins", "WolfoSkins", "2.2.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class WolfoSkins : BaseUnityPlugin { public void Awake() { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown WConfig.InitConfig(); if (WConfig.cfgTest.Value) { WConfig.cfgTest.Value = false; Object.Destroy((Object)(object)this); return; } Assets.Init(((BaseUnityPlugin)this).Info); 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 RuleCatalog.availability)).CallWhenAvailable((Action)ModSupport); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)SortSkinsLate); SkinDef.ApplyAsync += new hook_ApplyAsync(SkinDef_ApplyAsync); TemporaryOverlay.AddToCharacerModel += new hook_AddToCharacerModel(ReplaceTemporaryOverlayMaterial); ChatMessageBase.chatMessageTypeToIndex.Add(typeof(FakeAchievementMessage), (byte)ChatMessageBase.chatMessageIndexToType.Count); ChatMessageBase.chatMessageIndexToType.Add(typeof(FakeAchievementMessage)); SkinDef.BakeAsync += new hook_BakeAsync(SkinDef_BakeAsync); } private IEnumerator SkinDef_ApplyAsync(orig_ApplyAsync orig, SkinDef self, GameObject modelObject, List<AssetReferenceT<Material>> loadedMaterials, List<AssetReferenceT<Mesh>> loadedMeshes, AsyncReferenceHandleUnloadType unloadType) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) IEnumerator temp = orig.Invoke(self, modelObject, loadedMaterials, loadedMeshes, unloadType); while (temp.MoveNext()) { yield return temp.Current; } if (Object.op_Implicit((Object)(object)modelObject.GetComponent<SkinDefWolfoTracker>())) { modelObject.GetComponent<SkinDefWolfoTracker>().UndoWolfoSkin(); } if (self is SkinDefWolfo) { (self as SkinDefWolfo).ApplyExtras(modelObject); } } private IEnumerator SkinDef_BakeAsync(orig_BakeAsync orig, SkinDef self) { if (self.runtimeSkin == null && self is SkinDefPrioritizeDirect) { for (int i = 0; self.skinDefParams.rendererInfos.Length > i; i++) { if ((Object)(object)self.skinDefParams.rendererInfos[i].defaultMaterial != (Object)null) { self.skinDefParams.rendererInfos[i].defaultMaterialAddress = null; } } } return orig.Invoke(self); } 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_00eb: 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_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) if (!WConfig.cfgSort.Value) { return; } 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()); SkinCatalog.skinsByBody[bodyIndex] = array; SkinCatalog.skinsByBody[bodyIndex] = array; } } } GC.Collect(); } internal static void ModSupport() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) WConfig.RiskConfig(); SkinsFalseSon.falseSonBodyIndex = Survivors.FalseSon.bodyPrefab.GetComponent<CharacterBody>().bodyIndex; GameObject 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 SkinDefPrioritizeDirect : SkinDef { } public class SkinDefWolfo : SkinDefPrioritizeDirect { [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 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 = ArrayUtils.Join<RendererInfo>(component.baseRendererInfos, component4.rendererInfos); component4.RefreshRenderers(); } } } 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_009e: 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 = ((SkinDef)this).skinDefParams.minionSkinReplacements[0].minionSkin.skinDefParams.rendererInfos[0].defaultMaterial; GameObject val2 = Object.Instantiate<GameObject>(((SkinDef)this).skinDefParams.projectileGhostReplacements[1].projectileGhostReplacementPrefab, val.GetChild(0)); GameObject val3 = Object.Instantiate<GameObject>(((SkinDef)this).skinDefParams.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 FakeSkinId : SubjectChatMessage { public override string ConstructChatString() { return null; } } 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_ONE_THINGS { 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_TWO_THINGS { 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() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) SkinDef skinBandit2Default = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Bandit2/skinBandit2Default.asset").WaitForCompletion(); SkinDefParams skinBandit2Alt = Addressables.LoadAssetAsync<SkinDefParams>((object)"RoR2/Base/Bandit2/skinBandit2Alt_params.asset").WaitForCompletion(); SkinDef skinBandit2AltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Bandit2/skinBandit2AltColossus.asset").WaitForCompletion(); Bandit_Red(skinBandit2Default, skinBandit2Alt); Bandit_AltColossus(skinBandit2AltColossus); Bandit_Green(skinBandit2Default, skinBandit2Alt); Bandit_Purple(skinBandit2Default, skinBandit2Alt); } internal static void Bandit_AltColossus(SkinDef skinBandit2AltColossus) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinBandit2AltColossus_DLC2"; skinInfo.nameToken = "SIMU_SKIN_BANDIT_COLOSSUS"; skinInfo.icon = H.GetIcon("bandit_dlc2"); skinInfo.original = skinBandit2AltColossus; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; Material val2 = H.CloneMat(rendererInfos, 0); Material val3 = H.CloneMat(rendererInfos, 4); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusDiffuse.png"); val2.SetColor("_EmColor", new Color(1f, 0.5f, 0f, 1f)); val2.SetFloat("_EmPower", 2.22f); val2.SetFloat("_GreenChannelBias", -5f); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusWeaponsDiffuse.png"); val3.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Colossus/texBandit2AltColossusWeaponsEmissive.png")); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val2; rendererInfos[3].defaultMaterial = val2; rendererInfos[4].defaultMaterial = val3; rendererInfos[5].defaultMaterial = val3; rendererInfos[6].defaultMaterial = val3; rendererInfos[7].defaultMaterial = val3; } internal static void Bandit_Red(SkinDef skinBandit2Default, SkinDefParams skinBandit2Alt) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinBandit2R_Red_1"; skinInfo.nameToken = "SIMU_SKIN_BANDIT"; skinInfo.icon = H.GetIcon("bandit_red"); skinInfo.original = skinBandit2Default; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; val.skinDefParams.meshReplacements[3] = skinBandit2Alt.meshReplacements[2]; Material val2 = H.CloneMat(rendererInfos, 0); Material val3 = H.CloneMat(rendererInfos, 3); Material val4 = H.CloneMat(rendererInfos, 3); Material val5 = H.CloneMat(rendererInfos, 4); Material val6 = H.CloneMat(rendererInfos, 5); Material val7 = H.CloneMat(rendererInfos, 7); Texture2D mainTexture = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedCoatDiffuse.png"); Texture2D mainTexture2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditShotgunDiffuse.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedDiffuse.png"); val3.mainTexture = (Texture)(object)mainTexture; val4.mainTexture = (Texture)(object)mainTexture; val5.mainTexture = (Texture)(object)mainTexture2; val6.mainTexture = (Texture)(object)mainTexture2; val7.mainTexture = (Texture)(object)mainTexture2; val2.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Red/texBanditRedEmission.png")); val2.SetColor("_EmColor", new Color(1.1f, 0.88f, 1.1f)); val5.SetColor("_EmColor", new Color(0.5f, 0.15f, 0.25f)); val3.color = new Color(0.95f, 0.95f, 0.87f); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val2; rendererInfos[3].defaultMaterial = val3; rendererInfos[4].defaultMaterial = val5; rendererInfos[5].defaultMaterial = val6; rendererInfos[6].defaultMaterial = val4; rendererInfos[7].defaultMaterial = val7; } internal static void Bandit_Purple(SkinDef skinBandit2Default, SkinDefParams skinBandit2Alt) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinBandit2R_Purple_1"; skinInfo.nameToken = "SIMU_SKIN_BANDIT2"; skinInfo.icon = H.GetIcon("bandit_purple"); skinInfo.original = skinBandit2Default; skinInfo.cloneMesh = true; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; val.skinDefParams.meshReplacements[3] = skinBandit2Alt.meshReplacements[2]; Material val2 = H.CloneMat(rendererInfos, 0); Material val3 = H.CloneMat(rendererInfos, 3); Material val4 = H.CloneMat(rendererInfos, 3); Material val5 = H.CloneMat(rendererInfos, 4); Material val6 = H.CloneMat(rendererInfos, 5); Material val7 = H.CloneMat(rendererInfos, 7); Texture2D mainTexture = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedCoatDiffusePURPLE.png"); Texture2D mainTexture2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditShotgunDiffusePURPLE.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedDiffusePURPLE.png"); val3.mainTexture = (Texture)(object)mainTexture; val4.mainTexture = (Texture)(object)mainTexture; val5.mainTexture = (Texture)(object)mainTexture2; val6.mainTexture = (Texture)(object)mainTexture2; val7.mainTexture = (Texture)(object)mainTexture2; val2.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Purple/texBanditRedEmissionPURPLE.png")); val2.SetColor("_EmColor", new Color(1.2f, 1.2f, 0.5f)); val5.SetColor("_EmColor", new Color(0.8f, 0.7f, 0f)); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val2; rendererInfos[3].defaultMaterial = val3; rendererInfos[4].defaultMaterial = val5; rendererInfos[5].defaultMaterial = val6; rendererInfos[6].defaultMaterial = val4; rendererInfos[7].defaultMaterial = val7; } internal static void Bandit_Green(SkinDef skinBandit2Default, SkinDefParams skinBandit2Alt) { //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinBandit2R_Green_1"; skinInfo.nameToken = "SIMU_SKIN_BANDIT_GREEN"; skinInfo.icon = H.GetIcon("bandit_green"); skinInfo.original = skinBandit2Default; skinInfo.cloneMesh = true; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; val.skinDefParams.meshReplacements[3] = skinBandit2Alt.meshReplacements[2]; Material val2 = H.CloneMat(rendererInfos, 0); Material val3 = H.CloneMat(rendererInfos, 3); Material val4 = H.CloneMat(rendererInfos, 3); Material val5 = H.CloneMat(rendererInfos, 4); Material val6 = H.CloneMat(rendererInfos, 5); Material val7 = H.CloneMat(rendererInfos, 7); Texture2D mainTexture = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedCoatDiffuseGREEN.png"); Texture2D mainTexture2 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditShotgunDiffuseGREEN.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedDiffuseGREEN.png"); val3.mainTexture = (Texture)(object)mainTexture; val4.mainTexture = (Texture)(object)mainTexture; val5.mainTexture = (Texture)(object)mainTexture2; val6.mainTexture = (Texture)(object)mainTexture2; val7.mainTexture = (Texture)(object)mainTexture2; val2.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Bandit2/Green/texBanditRedEmissionGREEN.png")); val2.SetColor("_EmColor", new Color(1f, 1.2f, 0.7f)); val5.SetColor("_EmColor", new Color(0.4f, 0.5f, 0.15f)); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val2; rendererInfos[3].defaultMaterial = val3; rendererInfos[4].defaultMaterial = val5; rendererInfos[5].defaultMaterial = val6; rendererInfos[6].defaultMaterial = val4; rendererInfos[7].defaultMaterial = val7; } } public class SkinsCaptain { [RegisterAchievement("CLEAR_ANY_CAPTAIN", "Skins.Captain.Wolfo.First", "CompleteMainEnding", 5u, null)] public class Bandit2ClearGameMonsoonAchievement : Achievement_ONE_THINGS { 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_TWO_THINGS { 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() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) SkinDef skinCaptainAlt = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Captain/skinCaptainAlt.asset").WaitForCompletion(); SkinDef skinCaptainAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Captain/skinCaptainAltColossus.asset").WaitForCompletion(); Captain_Pink(skinCaptainAlt); Captain_Blue(skinCaptainAlt); AltColossus(skinCaptainAltColossus); } internal static void AltColossus(SkinDef skinCaptainAltColossus) { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_CAPTAIN_COLOSSUS"; skinInfo.name = "skinCaptainAltColossus_DLC2"; skinInfo.icon = H.GetIcon("captain_dlc2"); skinInfo.original = skinCaptainAltColossus; skinInfo.unsetMat = true; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); Material val2 = H.CloneMat(array, 1); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusClothesDiffuse.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusDiffuse.png"); val2.SetTexture("_NormalTex", (Texture)null); val2.SetTexture("_GreenChannelTex", (Texture)null); val2.SetTexture("_GreenChannelNormalTex", (Texture)null); val2.SetColor("_EmColor", new Color(1.5f, 0.45f, 0.3f, 1f)); Material val3 = Object.Instantiate<Material>(val2); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Colossus/texCaptainColossusDiffuseHat.png"); array[0].defaultMaterial = val; array[1].defaultMaterial = val3; array[2].defaultMaterial = val2; array[3].defaultMaterial = val; array[4].defaultMaterial = val2; array[5].defaultMaterial = val2; array[6].defaultMaterial = val; } internal static void Captain_Pink(SkinDef skinCaptainAlt) { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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) //IL_013d: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_CAPTAIN"; skinInfo.name = "skinCaptain_1"; skinInfo.icon = H.GetIcon("captain_pink"); skinInfo.original = skinCaptainAlt; skinInfo.unsetMat = true; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); Material val2 = H.CloneMat(array, 0); Material val3 = H.CloneMat(array, 0); Material val4 = H.CloneMat(array, 2); Material val5 = H.CloneMat(array, 3); Material val6 = H.CloneMat(array, 4); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW2.png"); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainPaletteW3.png"); val4.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)190, (byte)135, byte.MaxValue)); val5.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Pink/PinktexCaptainJacketDiffuseW.png"); val6.SetColor("_EmColor", new Color(1.2f, 0.6f, 1.2f, 1f)); val6.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)190, (byte)135, byte.MaxValue)); array[0].defaultMaterial = val; array[1].defaultMaterial = val3; array[2].defaultMaterial = val4; array[3].defaultMaterial = val5; array[4].defaultMaterial = val6; array[5].defaultMaterial = val6; array[6].defaultMaterial = val2; } internal static void Captain_Blue(SkinDef skinCaptainAlt) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_CAPTAIN_BLUE"; skinInfo.name = "skinCaptain_Blue_1"; skinInfo.icon = H.GetIcon("captain_blue"); skinInfo.original = skinCaptainAlt; skinInfo.unsetMat = true; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); Material val2 = H.CloneMat(array, 0); Material val3 = H.CloneMat(array, 2); Material val4 = H.CloneMat(array, 3); Material val5 = H.CloneMat(array, 4); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainPaletteAltBLUE.png"); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainPaletteAltBLUE2.png"); val2.color = new Color(0.8f, 0.8f, 0.8f); val3.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)225, (byte)135, byte.MaxValue)); val4.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Captain/Blue/texCaptainJacketDiffuseAltBLUE.png"); val5.color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)225, (byte)135, byte.MaxValue)); val5.SetColor("_EmColor", new Color(1f, 1f, 0.3f, 1f)); array[0].defaultMaterial = val; array[1].defaultMaterial = val; array[2].defaultMaterial = val3; array[3].defaultMaterial = val4; array[4].defaultMaterial = val5; array[5].defaultMaterial = val5; array[6].defaultMaterial = val2; } } public class SkinsCommando { [RegisterAchievement("CLEAR_ANY_COMMANDO", "Skins.Commando.Wolfo.First", null, 5u, null)] public class CommandoClearAlt1 : Achievement_ONE_THINGS { 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_TWO_THINGS { 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_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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_004c: Expected O, but got Unknown //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Expected O, but got Unknown SkinDef skinCommandoAlt = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Commando/skinCommandoAlt.asset").WaitForCompletion(); SkinDef skinCommandoAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Commando/skinCommandoAltColossus.asset").WaitForCompletion(); Unused_SotVSkin(); CommandoSkin_Provi(skinCommandoAlt); Commando_AltColossus(skinCommandoAltColossus); DodgeState.OnEnter += new hook_OnEnter(DodgeState_OnEnter); SlideState.OnEnter += new hook_OnEnter(SlideState_OnEnter); } internal static void Commando_AltColossus(SkinDef skinCommandoAltColossus) { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_COMMANDO_COLOSSUS"; skinInfo.name = "skinCommandoAltColossus_DLC2"; skinInfo.icon = H.GetIcon("commando_dlc2"); skinInfo.original = skinCommandoAltColossus; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; Material val2 = H.CloneMat(rendererInfos, 2); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/Colossus/texCommandoAltColossusDiffuse.png"); val2.SetTexture("_FlowHeightRamp", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/Colossus/texRampBeetleQueen.png")); val2.SetFloat("_FlowEmissionStrength", 2f); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val2; GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(); GameObject val3 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeGhost.prefab").WaitForCompletion(), "CommandoGrenadeGhostPROVI", false); ((Renderer)((Component)val3.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val2; ((Component)val3.transform.GetChild(4)).GetComponent<Light>().color = new Color(0.34f, 0.67f, 1f); val.skinDefParams.projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val3 } }; } internal static void Unused_SotVSkin() { //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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/DLC1/skinCommandoMarine.asset").WaitForCompletion(); H.AddSkinToCharacterPublic(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(SkinDef skinCommandoAlt) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinCommandoWolfoProvi_1"; skinInfo.nameToken = "SIMU_SKIN_COMMANDO"; skinInfo.icon = H.GetIcon("commando_provi"); skinInfo.original = skinCommandoAlt; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = val.skinDefParams.rendererInfos; Material val2 = H.CloneMat(rendererInfos, 2); Material val3 = H.CloneMat(rendererInfos, 2); val2.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/texCommandoPaletteDiffuse.png"); val2.color = new Color(1.1f, 1f, 0.8f); val2.SetColor("_EmColor", new Color(0.2f, 0.9f, 0.9f)); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Commando/texCommandoPaletteDiffuseGUN.png"); val3.color = new Color(1.2f, 1.4f, 1.4f); val3.SetColor("_EmColor", new Color(1f, 2f, 3f)); rendererInfos[0].defaultMaterial = val3; rendererInfos[1].defaultMaterial = val3; rendererInfos[2].defaultMaterial = val2; GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(); GameObject val4 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeGhost.prefab").WaitForCompletion(), "CommandoGrenadeGhostPROVI", false); ((Renderer)((Component)val4.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val2; ((Component)val4.transform.GetChild(4)).GetComponent<Light>().color = new Color(0.34f, 0.67f, 1f); 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); val.skinDefParams.projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val4 } }; } 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_ONE_THINGS { 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_TWO_THINGS { 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() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) SkinDef skinCrocoDefault = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoDefault.asset").WaitForCompletion(); SkinDef skinCrocoAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Croco/skinCrocoAltColossus.asset").WaitForCompletion(); AcridSkinBlack(skinCrocoDefault); RoRR_Lunar(skinCrocoDefault); Acrid_AltColossus(skinCrocoAltColossus); Acrid_AltColossus_Default(skinCrocoAltColossus); AcridSkinLemurian(skinCrocoDefault); } internal static void Acrid_AltColossus_Default(SkinDef skinCrocoAltColossus) { SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "CROCO_SKIN_ALT2_NAME2"; skinInfo.name = "skinCrocoAltColossus_Green_DLC2"; skinInfo.icon = H.GetIcon("acrid_dlc2"); skinInfo.original = skinCrocoAltColossus; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusDiffuse2.png"); val.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusEmissive.png")); array[0].defaultMaterial = val; array[2].defaultMaterial = val; } internal static void Acrid_AltColossus(SkinDef skinCrocoAltColossus) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_CROCO_COLOSSUS"; skinInfo.name = "skinCrocoAltColossus_DLC2"; skinInfo.icon = H.GetIcon("acrid_dlc2_purple"); skinInfo.original = skinCrocoAltColossus; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusDiffuse.png"); val.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Colossus/texCrocoColossusEmissive.png")); val.SetTexture("_FlowHeightRamp", (Texture)null); val.SetColor("_EmColor", new Color(0.8f, 0.45f, 1f, 1f)); array[0].defaultMaterial = val; array[2].defaultMaterial = val; } internal static void RoRR_Lunar(SkinDef skinCrocoDefault) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.nameToken = "SIMU_SKIN_CROCO"; skinInfo.name = "skinCroco_1"; skinInfo.icon = H.GetIcon("acrid_white"); skinInfo.original = skinCrocoDefault; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); Material val2 = H.CloneMat(array, 1); Material val3 = H.CloneMat(array, 2); Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoPoisonMask.png"); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoDiffuse.png"); val.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoEmission.png")); val.SetTexture("_FlowHeightRamp", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texRampCrocoDiseaseDark.png")); val.SetTexture("_FlowHeightmap", (Texture)(object)val4); val.SetColor("_EmColor", new Color(0.2f, 0.8f, 1f)); val2.SetTexture("_FlowHeightmap", (Texture)(object)val4); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lunar/texCrocoSpinesDiffuse.png"); val3.SetTexture("_EmTex", val3.mainTexture); val3.SetColor("_EmColor", new Color(0.3f, 0.3f, 0.3f)); array[0].defaultMaterial = val; array[1].defaultMaterial = val2; array[2].defaultMaterial = val3; } internal static void AcridSkinBlack(SkinDef skinCrocoDefault) { //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinCrocoWolfoBlack_1"; skinInfo.nameToken = "SIMU_SKIN_CROCO_BLACK"; skinInfo.icon = H.GetIcon("acrid_black"); skinInfo.original = skinCrocoDefault; RendererInfo[] array = H.CreateNewSkinR(skinInfo); Material val = H.CloneMat(array, 0); Material val2 = H.CloneMat(array, 1); Material val3 = H.CloneMat(array, 2); Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoPoisonMaskBLACK.png"); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoDiffuseBLACK.png"); val.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoEmissionBLACK.png")); val.SetTexture("_FlowHeightRamp", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texRampCrocoDiseaseDarkBLACK.png")); val.SetTexture("_FlowHeightmap", (Texture)(object)val4); val.SetColor("_EmColor", new Color(0.3f, 1.2f, 0.2f)); val2.SetTexture("_FlowHeightmap", (Texture)(object)val4); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoSpinesDiffuseBLACK.png"); val3.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Black/texCrocoSpinesDiffuseBLACK_EM.png")); val3.SetColor("_EmColor", new Color(0.66f, 0.88f, 0.22f)); array[0].defaultMaterial = val; array[1].defaultMaterial = val2; array[2].defaultMaterial = val3; } internal static void AcridSkinLemurian(SkinDef skinCrocoDefault) { //IL_00ca: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinCrocoWolfoLemurian"; skinInfo.nameToken = "LEMURIAN_BODY_NAME"; skinInfo.icon = H.GetIcon("acrid_lemurian"); skinInfo.original = skinCrocoDefault; skinInfo.w = true; skinInfo.unsetMat = true; SkinDefWolfo skinDefWolfo = (SkinDefWolfo)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = ((SkinDef)skinDefWolfo).skinDefParams.rendererInfos; Material val = H.CloneMat(rendererInfos, 0); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lemurian/texCrocoDiffuseLEMURIAN.png"); val.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Croco/Lemurian/texCrocoEmissionLEMURIAN.png")); val.SetTexture("_FlowHeightRamp", (Texture)null); val.SetTexture("_FlowHeightmap", (Texture)null); val.SetColor("_EmColor", new Color(0.8f, 0.8f, 0.8f)); rendererInfos[0].defaultMaterial = val; rendererInfos[1].defaultMaterial = null; rendererInfos[2].defaultMaterial = null; skinDefWolfo.disableThis = skinCrocoDefault.rootObject.transform.GetChild(7); } } public class SkinsEngineer { [RegisterAchievement("CLEAR_ANY_ENGI", "Skins.Engi.Wolfo.First", "Complete30StagesCareer", 5u, null)] public class ClearSimulacrumTreebotBody : Achievement_ONE_THINGS { 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_TWO_THINGS { 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() { //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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) SkinDef skinEngiDefault = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Engi/skinEngiDefault.asset").WaitForCompletion(); SkinDef skinEngiAlt = Addressables.LoadAssetAsync<SkinDef>((object)"17628d80f4c9ee8468fec38d89586df1").WaitForCompletion(); SkinDef skinEngiAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Engi/skinEngiAltColossus.asset").WaitForCompletion(); SkinDef skinEngiTurretDefault = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Engi/skinEngiTurretDefault.asset").WaitForCompletion(); SkinDef skinEngiTurretAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Engi/skinEngiTurretAltColossus.asset").WaitForCompletion(); SkinDef skinEngiWalkerTurretDefault = Addressables.LoadAssetAsync<SkinDef>((object)"80a2e7bddd0c9c4499107e5521978bd6").WaitForCompletion(); SkinDef skinEngiWalkerTurretAltColossus = Addressables.LoadAssetAsync<SkinDef>((object)"1d85a8d3e48de684ba627a415aa2a6ec").WaitForCompletion(); EngiSkin(skinEngiDefault, skinEngiTurretDefault, skinEngiWalkerTurretDefault); EngiSkinBLUE(skinEngiAlt, skinEngiTurretDefault, skinEngiWalkerTurretDefault); Engi_AltColossus(skinEngiAltColossus, skinEngiTurretAltColossus, skinEngiWalkerTurretAltColossus, skinEngiTurretDefault); } internal static void Engi_AltColossus(SkinDef skinEngiAltColossus, SkinDef skinEngiTurretAltColossus, SkinDef skinEngiWalkerTurretAltColossus, SkinDef skinEngiTurretDefault) { //IL_0160: 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_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06f6: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Unknown result type (might be due to invalid IL or missing references) //IL_072e: Unknown result type (might be due to invalid IL or missing references) //IL_0733: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinEngiAltColossus_DLC2"; skinInfo.nameToken = "SIMU_SKIN_ENGINEER_COLOSSUS"; skinInfo.icon = H.GetIcon("engineer_dlc2"); skinInfo.original = skinEngiAltColossus; skinInfo.unsetMat = true; SkinDefWolfo skinDefWolfo = H.CreateNewSkinW(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiTurretAltColossus_DLC2"; skinInfo.original = skinEngiTurretAltColossus; SkinDefWolfo skinDefWolfo2 = H.CreateNewSkinW(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiWalkerTurretAltColossus_DLC2"; skinInfo.original = skinEngiWalkerTurretAltColossus; SkinDefWolfo skinDefWolfo3 = H.CreateNewSkinW(skinInfo); RendererInfo[] rendererInfos = ((SkinDef)skinDefWolfo).skinDefParams.rendererInfos; RendererInfo[] rendererInfos2 = ((SkinDef)skinDefWolfo2).skinDefParams.rendererInfos; ProjectileGhostReplacement[] array = ArrayUtils.Clone<ProjectileGhostReplacement>(((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements); Array.Resize(ref array, array.Length + 1); MinionSkinReplacement[] array2 = ArrayUtils.Clone<MinionSkinReplacement>(((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements); ((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements = array; ((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements = array2; Material val = H.CloneMat(rendererInfos, 2); Material val2 = H.CloneMat(rendererInfos, 0); Material val3 = H.CloneMat(rendererInfos2, 0); Texture2D val4 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/Colossus/texRampEngiAltColossus.png"); val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/Colossus/texEngiTurretAltColossusDiffuse.png"); val3.SetTexture("_PrintRamp", (Texture)(object)val4); val3.SetColor("_EmColor", new Color(1.1f, 0.1f, 0.1f)); val.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/Colossus/texEngiAltColossusDiffuse.png"); val.SetColor("_EmColor", new Color(1.5f, 0f, 0f, 1f)); val.SetTexture("_FlowHeightRamp", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/Colossus/texRampLightning2.png")); val.SetTexture("_FresnelRamp", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/Colossus/texRampCrocoDiseaseDark.png")); val.SetFloat("_FlowEmissionStrength", 5f); val.SetFloat("_FresnelPower", 2f); val.SetFloat("_FresnelBoost", 15f); val2.SetTexture("_RemapTex", (Texture)(object)val4); rendererInfos[0].defaultMaterial = val2; rendererInfos[1].defaultMaterial = val2; rendererInfos[2].defaultMaterial = val; ((SkinDef)skinDefWolfo3).skinDefParams.rendererInfos[0].defaultMaterial = val3; GameObject val5 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiGrenadeGhostSkin2.prefab").WaitForCompletion(), "EngiGrenadeGhostSkinW_Red", false); GameObject val6 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiMineGhost2.prefab").WaitForCompletion(), "EngiMineGhostW_Red", false); GameObject val7 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/SpiderMineGhost2.prefab").WaitForCompletion(), "SpiderMineGhostW_Red", false); GameObject val8 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiBubbleShieldGhost2.prefab").WaitForCompletion(), "EngiBubbleShieldGhostW_Red", false); GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiHarpoon.prefab").WaitForCompletion(); GameObject val9 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiHarpoonGhost.prefab").WaitForCompletion(), "EngiHarpoonGhostSkinW_Red", false); ((Renderer)((Component)val5.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val3; ((Renderer)((Component)val6.transform.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = val3; ((Renderer)((Component)val7.transform.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = val3; ((Renderer)((Component)val8.transform.GetChild(0).GetChild(0)).GetComponent<MeshRenderer>()).material = val3; ((Renderer)((Component)val8.transform.GetChild(0).GetChild(1)).GetComponent<MeshRenderer>()).material = val3; ((Renderer)((Component)val8.transform.GetChild(0).GetChild(2)).GetComponent<MeshRenderer>()).material = val3; Transform val10 = val7.transform.Find("mdlEngiSpiderMine/EngiSpiderMineArmature/Base/Screw"); Color color = default(Color); ((Color)(ref color))..ctor(0.75f, 0.25f, 0.2f); Color startColor = default(Color); ((Color)(ref startColor))..ctor(1f, 0.25f, 0.2f); ((Component)val10.GetChild(1)).GetComponent<Light>().color = color; ((Component)val10.GetChild(1)).GetComponent<LineRenderer>().startColor = startColor; ((Component)val10.GetChild(2)).GetComponent<Light>().color = color; ((Component)val10.GetChild(2)).GetComponent<LineRenderer>().startColor = startColor; ((Component)val10.GetChild(2).GetChild(0)).GetComponent<Light>().color = color; ((Component)val10.GetChild(2).GetChild(1)).GetComponent<TrailRenderer>().startColor = startColor; ((Component)val10.GetChild(3)).GetComponent<Light>().color = new Color(0.75f, 0.75f, 0.25f); ((Component)val10.GetChild(3)).GetComponent<LineRenderer>().startColor = new Color(1f, 1f, 0.25f); ((Component)val10.GetChild(3).GetChild(0)).GetComponent<Light>().color = color; ParticleSystemRenderer component = ((Component)val9.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); Material val11 = Object.Instantiate<Material>(((Renderer)component).material); val11.SetColor("_TintColor", new Color(1f, 0.2f, 0.2f, 1f)); ((Renderer)component).material = val11; ((Renderer)((Component)val9.transform.GetChild(1)).GetComponent<MeshRenderer>()).material = val; TrailRenderer component2 = ((Component)val9.transform.GetChild(1).GetChild(0)).GetComponent<TrailRenderer>(); component2.startColor = new Color(1f, 1f, 1f, 0f); component2.endColor = new Color(0.5f, 0.5f, 0.5f, 0f); Material val12 = Object.Instantiate<Material>(((Renderer)component2).material); val12.SetTexture("_RemapTex", (Texture)(object)val4); ((Renderer)component2).material = val12; component = ((Component)val9.transform.GetChild(3)).GetComponent<ParticleSystemRenderer>(); val11 = Object.Instantiate<Material>(((Renderer)component).material); val11.SetTexture("_RemapTex", (Texture)(object)val4); val11.SetColor("_TintColor", new Color(1f, 1f, 0f, 1f)); ((Renderer)component).material = val11; array2[0].minionSkin = (SkinDef)(object)skinDefWolfo2; array2[1].minionSkin = (SkinDef)(object)skinDefWolfo3; array[0].projectileGhostReplacementPrefab = val5; array[1].projectileGhostReplacementPrefab = val6; array[2].projectileGhostReplacementPrefab = val7; array[3].projectileGhostReplacementPrefab = val8; array[4] = new ProjectileGhostReplacement { projectileGhostReplacementPrefab = val9, projectilePrefab = projectilePrefab }; skinDefWolfo.lightColorsChanges = new SkinDefWolfo.LightColorChanges[2] { new SkinDefWolfo.LightColorChanges { color = new Color(0.9f, 0.1f, 0f), lightPath = "EngiArmature/ROOT/base/stomach/chest/cannonJoint1.l/cannonJoint2.l/cannonHead.l/EngiJet/Point Light" }, new SkinDefWolfo.LightColorChanges { color = new Color(0.9f, 0.1f, 0f), lightPath = "EngiArmature/ROOT/base/stomach/chest/cannonJoint1.r/cannonJoint2.r/cannonHead.r/EngiJet/Point Light (1)" } }; H.AddSkinToObject(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/EngiWalkerTurretBody"), (SkinDef)(object)skinDefWolfo2); } internal static void EngiSkin(SkinDef skinEngiDefault, SkinDef skinEngiTurretDefault, SkinDef skinEngiWalkerTurretDefault) { //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_029e: 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) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinEngi_1"; skinInfo.nameToken = "SIMU_SKIN_ENGINEER"; skinInfo.icon = H.GetIcon("engineer_red"); skinInfo.original = skinEngiDefault; skinInfo.unsetMat = true; SkinDefWolfo skinDefWolfo = H.CreateNewSkinW(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiTurret_1"; skinInfo.original = skinEngiTurretDefault; SkinDef val = (SkinDef)(object)H.CreateNewSkin(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiWalkerTurretDefault_1"; skinInfo.original = skinEngiWalkerTurretDefault; SkinDef val2 = (SkinDef)(object)H.CreateNewSkin(skinInfo); RendererInfo[] rendererInfos = ((SkinDef)skinDefWolfo).skinDefParams.rendererInfos; RendererInfo[] rendererInfos2 = val.skinDefParams.rendererInfos; ProjectileGhostReplacement[] array = ArrayUtils.Clone<ProjectileGhostReplacement>(((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements); Array.Resize(ref array, array.Length + 1); MinionSkinReplacement[] array2 = ArrayUtils.Clone<MinionSkinReplacement>(((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements); ((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements = array; ((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements = array2; Material val3 = H.CloneMat(rendererInfos, 2); Material val4 = H.CloneMat(rendererInfos, 0); Material val5 = H.CloneMat(rendererInfos2, 0); Texture2D val6 = Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/wine/texRampEngiAlt2.png"); Color color = default(Color); ((Color)(ref color))..ctor(1.1f, 1f, 1f); val5.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/wine/texEngiTurretDiffuseAlt2.png"); val5.SetTexture("_PrintRamp", (Texture)(object)val6); val5.SetColor("_EmColor", new Color(0.845f, 0.8f, 0.365f)); val5.color = color; val3.mainTexture = (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/wine/texEngiDiffuseAlt2.png"); val3.SetTexture("_EmTex", (Texture)(object)Assets.Bundle.LoadAsset<Texture2D>("Assets/Skins/base/Engi/wine/texEngiEmissionAlt2.png")); val3.color = color; val4.SetTexture("_RemapTex", (Texture)(object)val6); rendererInfos[0].defaultMaterial = val4; rendererInfos[1].defaultMaterial = val4; rendererInfos[2].defaultMaterial = val3; val2.skinDefParams.rendererInfos[0].defaultMaterial = val5; GameObject val7 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiGrenadeGhostSkin2.prefab").WaitForCompletion(), "EngiGrenadeGhostSkinW", false); GameObject val8 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiMineGhost2.prefab").WaitForCompletion(), "EngiMineGhostW", false); GameObject val9 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/SpiderMineGhost2.prefab").WaitForCompletion(), "SpiderMineGhostW", false); GameObject val10 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiBubbleShieldGhost2.prefab").WaitForCompletion(), "EngiBubbleShieldGhostW", false); GameObject projectilePrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiHarpoon.prefab").WaitForCompletion(); GameObject val11 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiHarpoonGhost.prefab").WaitForCompletion(), "EngiHarpoonGhostSkinW", false); ((Renderer)((Component)val7.transform.GetChild(0)).GetComponent<MeshRenderer>()).material = val5; ((Renderer)((Component)val8.transform.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = val5; ((Renderer)((Component)val9.transform.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = val5; ((Renderer)((Component)val10.transform.GetChild(0).GetChild(0)).GetComponent<MeshRenderer>()).material = val5; ((Renderer)((Component)val10.transform.GetChild(0).GetChild(1)).GetComponent<MeshRenderer>()).material = val5; ((Renderer)((Component)val10.transform.GetChild(0).GetChild(2)).GetComponent<MeshRenderer>()).material = val5; Transform val12 = val9.transform.Find("mdlEngiSpiderMine/EngiSpiderMineArmature/Base/Screw"); Color color2 = default(Color); ((Color)(ref color2))..ctor(0.75f, 0.75f, 0.25f); Color startColor = default(Color); ((Color)(ref startColor))..ctor(1f, 1f, 0.25f); ((Component)val12.GetChild(1)).GetComponent<Light>().color = color2; ((Component)val12.GetChild(1)).GetComponent<LineRenderer>().startColor = startColor; ((Component)val12.GetChild(2)).GetComponent<Light>().color = color2; ((Component)val12.GetChild(2)).GetComponent<LineRenderer>().startColor = startColor; ((Component)val12.GetChild(2).GetChild(0)).GetComponent<Light>().color = color2; ((Component)val12.GetChild(2).GetChild(1)).GetComponent<TrailRenderer>().startColor = startColor; ((Component)val12.GetChild(3)).GetComponent<Light>().color = new Color(0.75f, 0.75f, 0.25f); ((Component)val12.GetChild(3)).GetComponent<LineRenderer>().startColor = new Color(1f, 1f, 0.25f); ((Component)val12.GetChild(3).GetChild(0)).GetComponent<Light>().color = color2; ParticleSystemRenderer component = ((Component)val11.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>(); Material val13 = Object.Instantiate<Material>(((Renderer)component).material); val13.SetColor("_TintColor", new Color(1f, 1f, 0.2f, 1f)); ((Renderer)component).material = val13; ((Renderer)((Component)val11.transform.GetChild(1)).GetComponent<MeshRenderer>()).material = val3; TrailRenderer component2 = ((Component)val11.transform.GetChild(1).GetChild(0)).GetComponent<TrailRenderer>(); component2.startColor = new Color(1f, 1f, 0.75f, 0f); component2.endColor = new Color(0.6f, 1f, 0.25f, 0f); Material val14 = Object.Instantiate<Material>(((Renderer)component2).material); val14.SetTexture("_RemapTex", (Texture)(object)val6); ((Renderer)component2).material = val14; component = ((Component)val11.transform.GetChild(3)).GetComponent<ParticleSystemRenderer>(); val13 = Object.Instantiate<Material>(((Renderer)component).material); val13.SetTexture("_RemapTex", (Texture)(object)val6); val13.SetColor("_TintColor", new Color(1f, 1f, 0f, 1f)); ((Renderer)component).material = val13; array2[0].minionSkin = val; array2[1].minionSkin = val2; array[0].projectileGhostReplacementPrefab = val7; array[1].projectileGhostReplacementPrefab = val8; array[2].projectileGhostReplacementPrefab = val9; array[3].projectileGhostReplacementPrefab = val10; array[4] = new ProjectileGhostReplacement { projectileGhostReplacementPrefab = val11, projectilePrefab = projectilePrefab }; skinDefWolfo.lightColorsChanges = new SkinDefWolfo.LightColorChanges[2] { new SkinDefWolfo.LightColorChanges { color = new Color(0.9f, 0.9f, 0f), lightPath = "EngiArmature/ROOT/base/stomach/chest/cannonJoint1.l/cannonJoint2.l/cannonHead.l/EngiJet/Point Light" }, new SkinDefWolfo.LightColorChanges { color = new Color(0.9f, 0.9f, 0f), lightPath = "EngiArmature/ROOT/base/stomach/chest/cannonJoint1.r/cannonJoint2.r/cannonHead.r/EngiJet/Point Light (1)" } }; H.AddSkinToObject(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/EngiWalkerTurretBody"), val); } internal static void EngiSkinBLUE(SkinDef skinEngiAlt, SkinDef skinEngiTurretDefault, SkinDef skinEngiWalkerTurretDefault) { //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_0651: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) SkinInfo skinInfo = default(SkinInfo); skinInfo.name = "skinEngiAltWolfoBlue_1"; skinInfo.nameToken = "SIMU_SKIN_ENGINEER_BLUE"; skinInfo.icon = H.GetIcon("engineer_blue"); skinInfo.original = skinEngiAlt; skinInfo.unsetMat = true; SkinDefWolfo skinDefWolfo = H.CreateNewSkinW(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiTurretAlt_1"; skinInfo.original = skinEngiTurretDefault; SkinDefWolfo skinDefWolfo2 = H.CreateNewSkinW(skinInfo); skinInfo = default(SkinInfo); skinInfo.name = "skinEngiWalkerTurretAlt_1"; skinInfo.original = skinEngiWalkerTurretDefault; SkinDefWolfo skinDefWolfo3 = H.CreateNewSkinW(skinInfo); RendererInfo[] rendererInfos = ((SkinDef)skinDefWolfo).skinDefParams.rendererInfos; RendererInfo[] rendererInfos2 = ((SkinDef)skinDefWolfo2).skinDefParams.rendererInfos; ProjectileGhostReplacement[] array = ArrayUtils.Clone<ProjectileGhostReplacement>(((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements); Array.Resize(ref array, array.Length + 1); MinionSkinReplacement[] array2 = ArrayUtils.Clone<MinionSkinReplacement>(((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements); ((SkinDef)skinDefWolfo).skinDefParams.projectileGhostReplacements = array; ((SkinDef)skinDefWolfo).skinDefParams.minionSkinReplacements = array2; Material val = H.CloneMat(rendererInfos, 2); Material val2 = H.CloneMat(rendererInfos, 0);