Decompiled source of WolfoAlternateSkins v1.6.2
WolfoSkinsMod.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using EntityStates; using EntityStates.Commando; using EntityStates.GameOver; using EntityStates.Missions.LunarScavengerEncounter; using On.EntityStates.Commando; using On.EntityStates.GameOver; using On.EntityStates.Missions.LunarScavengerEncounter; using On.RoR2; using On.RoR2.UI.LogBook; using R2API; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.ExpansionManagement; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Rendering; using WolfoSkinsMod.Properties; [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.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("WolfoSkinsMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [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 WConfig { public static ConfigFile ConfigFileUNSORTED = new ConfigFile(Paths.ConfigPath + "\\Wolfo.Wolfo_Skins.cfg", true); public static ConfigEntry<bool> cfgUnlockAll; public static ConfigEntry<bool> cfgSort; public static ConfigEntry<float> VoidlingHPMultiplier; public static ConfigEntry<float> VoidlingDamageMultiplier; public static ConfigEntry<bool> VoidlingLimitLevel99; public static ConfigEntry<bool> VoidlingNoScaleHPMulti; public static void InitConfig() { cfgUnlockAll = ConfigFileUNSORTED.Bind<bool>("Main", "Unlock all skins", false, "Makes skins not require unlocks."); cfgSort = ConfigFileUNSORTED.Bind<bool>("Main", "Sort skins later", true, "Sort skins at the end of the skin list. This is mostly here in case it causes issues."); VoidlingHPMultiplier = ConfigFileUNSORTED.Bind<float>("Optional Voidling Nerfs", "HP Multiplier", 1f, "Multiply Voidlings HP by this."); VoidlingDamageMultiplier = ConfigFileUNSORTED.Bind<float>("Optional Voidling Nerfs", "Dmg Multiplier", 1f, "Multiply Voidlings HP by this."); VoidlingLimitLevel99 = ConfigFileUNSORTED.Bind<bool>("Optional Voidling Nerfs", "Limit level to 99", true, "Voidling seems to be balanced around level 99 so if you play with a mod that uncaps the levels he gets way too powerful."); } } public static class ArrayUtil { public static T[] Add<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Concat(items).ToArray(); } public static T[] Remove<T>(this T[] array, params T[] items) { return (array ?? Enumerable.Empty<T>()).Except(items).ToArray(); } } public class WRect { public static readonly Random random = new Random(); public static Rect recnothing = new Rect(0f, 0f, 0f, 0f); public static Rect recwide = new Rect(0f, 0f, 384f, 256f); public static Rect rechalftall = new Rect(0f, 0f, 256f, 320f); public static Rect rechalfwide = new Rect(0f, 0f, 320f, 256f); public static Rect rectall = new Rect(0f, 0f, 256f, 384f); public static Rect rec512 = new Rect(0f, 0f, 512f, 512f); public static Rect rec320 = new Rect(0f, 0f, 320f, 320f); public static Rect rec256 = new Rect(0f, 0f, 256f, 256f); public static Rect rec192 = new Rect(0f, 0f, 192f, 192f); public static Rect rec128 = new Rect(0f, 0f, 128f, 128f); public static Rect rec106 = new Rect(0f, 0f, 106f, 106f); public static Rect rec64 = new Rect(0f, 0f, 64f, 64f); public static Rect rec32 = new Rect(0f, 0f, 32f, 32f); public static Vector2 half = new Vector2(0.5f, 0.5f); public static Texture MakeTexture(int w, int h, TextureFormat format, FilterMode filter, TextureWrapMode wrap, byte[] texture) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0016: 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) Texture2D val = new Texture2D(w, h, format, false); ImageConversion.LoadImage(val, texture, true); ((Texture)val).filterMode = filter; ((Texture)val).wrapMode = wrap; return (Texture)(object)val; } public static Sprite MakeIcon(byte[] texture) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(128, 128, (TextureFormat)12, false); ImageConversion.LoadImage(val, texture, true); ((Texture)val).filterMode = (FilterMode)1; return Sprite.Create(val, rec128, half); } public static Sprite MakeIcon256(byte[] texture) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(256, 256, (TextureFormat)12, false); ImageConversion.LoadImage(val, texture, true); ((Texture)val).filterMode = (FilterMode)1; return Sprite.Create(val, rec256, half); } public static Sprite MakeIcon32(byte[] texture) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(32, 32, (TextureFormat)5, false); ImageConversion.LoadImage(val, texture, true); ((Texture)val).filterMode = (FilterMode)1; return Sprite.Create(val, rec32, half); } } public class Unlocks { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_PlayAllEnemiesDefeatedSound <>9__16_0; public static hook_OnEnter <>9__16_1; public static hook_OnEnter <>9__16_2; internal void <Hooks>b__16_0(orig_PlayAllEnemiesDefeatedSound orig, InfiniteTowerWaveController self) { orig.Invoke(self); if (self.waveIndex >= 50) { Unlocks.unlockSkins?.Invoke(Run.instance); } } internal void <Hooks>b__16_1(orig_OnEnter orig, FadeOut self) { orig.Invoke(self); Unlocks.unlockSkins?.Invoke(Run.instance); } internal void <Hooks>b__16_2(orig_OnEnter orig, VoidEndingStart self) { orig.Invoke(self); Debug.Log((object)"EntityStates.GameOver.VoidEndingStart.OnEnter"); Unlocks.unlockSkins?.Invoke(Run.instance); } } public static string unlockName = ": Alternated"; public static string unlockNameGrand = ": Grand Alternation"; public static string unlockNameSimu = " : Simulated"; public static string unlockNamePrism = ": Colorized"; public static string unlockNameDissonance = ": Dissonant"; public static string wip = " Placeholder"; public static string unlockCondition = ", complete wave 50 in Simulacrum, A Moment, Whole or the Planetarium."; public static string unlockConditiontwo = ", complete stage 15, wave 50 in Simulacrum, A Moment, Whole or the Planetarium."; public static string unlockConditionGrand = ", defeat an elite or umbral Mithrix or with Artifact of Dissonance enabled."; public static string unlockConditionPrism = ", beat the game with Artifact of Dissonance enabled or during a Prismatic Trial."; public static event Action<Run> unlockSkins; public static event Action<Run> unlockSkinsEliteMithrix; 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_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 //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown object obj = <>c.<>9__16_0; if (obj == null) { hook_PlayAllEnemiesDefeatedSound val = delegate(orig_PlayAllEnemiesDefeatedSound orig, InfiniteTowerWaveController self) { orig.Invoke(self); if (self.waveIndex >= 50) { Unlocks.unlockSkins?.Invoke(Run.instance); } }; <>c.<>9__16_0 = val; obj = (object)val; } InfiniteTowerWaveController.PlayAllEnemiesDefeatedSound += (hook_PlayAllEnemiesDefeatedSound)obj; object obj2 = <>c.<>9__16_1; if (obj2 == null) { hook_OnEnter val2 = delegate(orig_OnEnter orig, FadeOut self) { orig.Invoke(self); Unlocks.unlockSkins?.Invoke(Run.instance); }; <>c.<>9__16_1 = val2; obj2 = (object)val2; } FadeOut.OnEnter += (hook_OnEnter)obj2; object obj3 = <>c.<>9__16_2; if (obj3 == null) { hook_OnEnter val3 = delegate(orig_OnEnter orig, VoidEndingStart self) { orig.Invoke(self); Debug.Log((object)"EntityStates.GameOver.VoidEndingStart.OnEnter"); Unlocks.unlockSkins?.Invoke(Run.instance); }; <>c.<>9__16_2 = val3; obj3 = (object)val3; } VoidEndingStart.OnEnter += (hook_OnEnter)obj3; LogBookController.CanSelectAchievementEntry += new hook_CanSelectAchievementEntry(HideUnimplementedUnlocks); RoR2Content.CreateEclipseUnlockablesForSurvivor += new hook_CreateEclipseUnlockablesForSurvivor(AutogenerateUnlockableDefs); } private static UnlockableDef[] AutogenerateUnlockableDefs(orig_CreateEclipseUnlockablesForSurvivor orig, SurvivorDef survivorDef, int minEclipseLevel, int maxEclipseLevel) { return orig.Invoke(survivorDef, minEclipseLevel, maxEclipseLevel); } public static bool HideUnimplementedUnlocks(orig_CanSelectAchievementEntry orig, AchievementDef achievementDef, Dictionary<ExpansionDef, bool> expansionAvailability) { if (achievementDef.identifier.StartsWith("SIMU") || achievementDef.identifier.StartsWith("PRIS")) { UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(achievementDef.unlockableRewardIdentifier); if (Object.op_Implicit((Object)(object)unlockableDef) && unlockableDef.hidden) { return false; } } return orig.Invoke(achievementDef, expansionAvailability); } } public class AchievementSimuVoidTwisted : BaseAchievement { public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Unlocks.unlockSkins += Unlock; Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Unlocks.unlockSkins -= Unlock; Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && !((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.MainEnding) && !((Object)(object)runReport.gameEnding == (Object)(object)GameEndings.ObliterationEnding)) { ((BaseAchievement)this).Grant(); } } private void Unlock(Run run) { ((BaseAchievement)this).Grant(); } } public class AchievementPrismaticDisso : BaseAchievement { public override void OnBodyRequirementMet() { ((BaseAchievement)this).OnBodyRequirementMet(); Run.onClientGameOverGlobal += OnClientGameOverGlobal; } public override void OnBodyRequirementBroken() { Run.onClientGameOverGlobal -= OnClientGameOverGlobal; ((BaseAchievement)this).OnBodyRequirementBroken(); } private void OnClientGameOverGlobal(Run run, RunReport runReport) { if (Object.op_Implicit((Object)(object)runReport.gameEnding) && runReport.gameEnding.isWin && (Object)(object)runReport.gameEnding != (Object)(object)GameEndings.ObliterationEnding) { if (Object.op_Implicit((Object)(object)((Component)run).GetComponent<WeeklyRun>())) { ((BaseAchievement)this).Grant(); } else if (Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.MixEnemy)) { ((BaseAchievement)this).Grant(); } } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("Wolfo.WolfoSkins", "WolfoSkins", "1.5.0")] public class WolfoSkins : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Apply <>9__0_0; internal void <Awake>b__0_0(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 (Object.op_Implicit((Object)(object)model.GetComponent<SkinsCHEF.FixChefDisplay>())) { model.GetComponent<SkinsCHEF.FixChefDisplay>().Fix(self); } if (self is SkinDefWolfo) { (self as SkinDefWolfo).ApplyExtras(model); } } } public void Awake() { //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown WConfig.InitConfig(); Unlocks.Hooks(); SkinsCommando.CommandoSkin(); SkinsHuntress.HuntressSkin(); SkinsBandit.Start(); SkinsMULT.ToolbotSkin(); SkinsEngineer.EngiSkin(); SkinsArtificer.Start(); SkinsMerc.MercSkin(); SkinsREX.TreebotSkin(); SkinsLoader.LoaderSkin(); SkinsAcrid.Start(); SkinsCaptain.CaptainSkin(); SkinsRailGunner.RailGunnerSkins(); SkinsVoidFiend.Start(); SkinsHand.CallDuringAwake(); SkinsEnforcer.CallDuringAwake(); SkinsSniper.CallDuringAwake(); SkinsMiner.CallDuringAwake(); SkinsCHEF.CallDuringAwake(); SkinsPilot.CallDuringAwake(); SkinsRocket.CallDuringAwake(); SkinsChirr.CallDuringAwake(); SkinsExecutioner.CallDuringAwake(); SkinsRavager.CallDuringAwake(); SkinsArsonist.CallDuringAwake(); TeslaDesolatorUnlocks.CallDuringAwake(); SkinsPaladin.CallDuringAwake(); SkinsNemCommando.CallDuringAwake(); SkinsNemMercenary.CallDuringAwake(); SkinsNemEnforcer.CallDuringAwake(); SkinsFutureModSupport.CallDuringAwake(); SkinsCommando.PrismAchievement(); SkinsHuntress.PrismAchievement(); SkinsBandit.PrismAchievement(); SkinsMULT.PrismAchievement(); SkinsEngineer.PrismAchievement(); SkinsMerc.PrismAchievement(); SkinsREX.PrismAchievement(); SkinsLoader.PrismAchievement(); SkinsCaptain.PrismAchievement(); SkinsRailGunner.PrismAchievement(); SkinsEnforcer.PrismAchievement(); SkinsHand.PrismAchievement(); ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)ModSupport); ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)SortSkinsLate); object obj = <>c.<>9__0_0; if (obj == null) { hook_Apply val = delegate(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 (Object.op_Implicit((Object)(object)model.GetComponent<SkinsCHEF.FixChefDisplay>())) { model.GetComponent<SkinsCHEF.FixChefDisplay>().Fix(self); } if (self is SkinDefWolfo) { (self as SkinDefWolfo).ApplyExtras(model); } }; <>c.<>9__0_0 = val; obj = (object)val; } SkinDef.Apply += (hook_Apply)obj; TemporaryOverlay.AddToCharacerModel += new hook_AddToCharacerModel(ReplaceTemporaryOverlayMaterial); VoidlingNerfs(); } internal static void SortSkinsLate() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) List<string> list = new List<string> { "Enforcer", "HANDOverclocked", "Miner", "CHEF", "RobPaladin" }; for (int i = 0; i < SurvivorCatalog.survivorDefs.Length; i++) { if (list.Contains(SurvivorCatalog.survivorDefs[i].cachedName)) { continue; } GameObject bodyPrefab = SurvivorCatalog.survivorDefs[i].bodyPrefab; BodyIndex bodyIndex = bodyPrefab.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = bodyPrefab.GetComponentInChildren<ModelSkinController>(); if (componentInChildren.skins.Length <= 4) { continue; } List<SkinDef> list2 = new List<SkinDef>(); List<SkinDef> list3 = new List<SkinDef>(); for (int j = 0; j < componentInChildren.skins.Length; j++) { if (((Object)componentInChildren.skins[j]).name.Contains("Wolfo")) { list3.Add(componentInChildren.skins[j]); } else { list2.Add(componentInChildren.skins[j]); } } if (list3.Count > 0) { list2.AddRange(list3); SkinDef[] array = (componentInChildren.skins = list2.ToArray()); BodyCatalog.skins[bodyIndex] = array; SkinCatalog.skinsByBody[bodyIndex] = array; } } GC.Collect(); } internal static void ModSupport() { GameObject val = BodyCatalog.FindBodyPrefab("CHEF"); if ((Object)(object)val != (Object)null) { SkinsCHEF.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("HANDOverclockedBody"); if ((Object)(object)val != (Object)null) { SkinsHand.ModdedSkin(val); } if (Chainloader.PluginInfos.ContainsKey("com.EnforcerGang.Enforcer")) { val = BodyCatalog.FindBodyPrefab("EnforcerBody"); if ((Object)(object)val != (Object)null) { SkinsEnforcer.ModdedSkin(val); } } val = BodyCatalog.FindBodyPrefab("Executioner2Body"); if ((Object)(object)val != (Object)null) { SkinsExecutioner.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("SniperClassicBody"); if ((Object)(object)val != (Object)null) { SkinsSniper.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("RobRavagerBody"); if ((Object)(object)val != (Object)null) { SkinsRavager.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("RocketSurvivorBody"); if ((Object)(object)val != (Object)null) { SkinsRocket.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("MoffeinPilotBody"); if ((Object)(object)val != (Object)null) { SkinsPilot.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("MinerBody"); if ((Object)(object)val != (Object)null) { SkinsMiner.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("ChirrBody"); if ((Object)(object)val != (Object)null) { SkinsChirr.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("ArsonistBody"); if ((Object)(object)val != (Object)null) { SkinsArsonist.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("TeslaTrooperBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToTeslaTrooper(val); } val = BodyCatalog.FindBodyPrefab("TeslaTowerBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToTeslaTower(val); } val = BodyCatalog.FindBodyPrefab("DesolatorBody"); if ((Object)(object)val != (Object)null) { TeslaDesolatorColors.AddToDesolator(val); } val = BodyCatalog.FindBodyPrefab("RobPaladinBody"); if ((Object)(object)val != (Object)null) { SkinsPaladin.ModdedSkin(val); } val = BodyCatalog.FindBodyPrefab("NemesisEnforcerBody"); if ((Object)(object)val != (Object)null) { SkinsNemEnforcer.ModdedSkin(val); } } private void ReplaceTemporaryOverlayMaterial(orig_AddToCharacerModel orig, TemporaryOverlay self, CharacterModel characterModel) { if (Object.op_Implicit((Object)(object)characterModel)) { OverlayMaterialReplacer component = ((Component)characterModel).GetComponent<OverlayMaterialReplacer>(); if (Object.op_Implicit((Object)(object)component) && (Object)(object)self.originalMaterial == (Object)(object)component.targetMaterial) { self.originalMaterial = component.replacementMaterial; } } orig.Invoke(self, characterModel); } public static void VoidlingNerfs() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0018: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) ScriptedCombatEncounter.BeginEncounter += new hook_BeginEncounter(VoidlingLevelLimit); CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase1.prefab").WaitForCompletion().GetComponent<CharacterBody>(); CharacterBody obj = component; obj.baseDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj2 = component; obj2.levelDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj3 = component; obj3.baseMaxHealth *= WConfig.VoidlingHPMultiplier.Value; CharacterBody obj4 = component; obj4.levelMaxHealth *= WConfig.VoidlingHPMultiplier.Value; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase2.prefab").WaitForCompletion().GetComponent<CharacterBody>(); CharacterBody obj5 = component; obj5.baseDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj6 = component; obj6.levelDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj7 = component; obj7.baseMaxHealth *= WConfig.VoidlingHPMultiplier.Value; CharacterBody obj8 = component; obj8.levelMaxHealth *= WConfig.VoidlingHPMultiplier.Value; component = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidRaidCrab/MiniVoidRaidCrabBodyPhase3.prefab").WaitForCompletion().GetComponent<CharacterBody>(); CharacterBody obj9 = component; obj9.baseDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj10 = component; obj10.levelDamage *= WConfig.VoidlingDamageMultiplier.Value; CharacterBody obj11 = component; obj11.baseMaxHealth *= WConfig.VoidlingHPMultiplier.Value; CharacterBody obj12 = component; obj12.levelMaxHealth *= WConfig.VoidlingHPMultiplier.Value; } private static void VoidlingLevelLimit(orig_BeginEncounter orig, ScriptedCombatEncounter self) { orig.Invoke(self); if (((Object)self).name.StartsWith("VoidRaid") && Run.instance.ambientLevelFloor > 99 && WConfig.VoidlingLimitLevel99.Value) { for (int i = 0; i < self.combatSquad.membersList.Count; i++) { self.combatSquad.membersList[i].inventory.RemoveItem(Items.UseAmbientLevel, 1); self.combatSquad.membersList[i].inventory.GiveItem(Items.LevelBonus, 98); } } } } public class SkinDefWolfo : SkinDef { [Serializable] public struct MaterialChanger { public Material targetMaterial; public Material replacementMaterial; } [Serializable] public struct LightColorChanges { public string lightPath; public Color color; public Color color2; } public LightColorChanges[] lightColorsChanges = Array.Empty<LightColorChanges>(); public ItemDisplayRule[] addGameObjects = Array.Empty<ItemDisplayRule>(); public MaterialChanger changeMaterial; public void Awake() { } public void ApplyExtras(GameObject modelObject) { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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) CharacterModel component = modelObject.GetComponent<CharacterModel>(); SkinDefWolfoTracker skinDefWolfoTracker = modelObject.AddComponent<SkinDefWolfoTracker>(); 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)) { continue; } 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; } } skinDefWolfoTracker.addedObjects = (GameObject[])(object)new GameObject[addGameObjects.Length]; for (int k = 0; addGameObjects.Length > k; k++) { Transform val2 = component.childLocator.FindChild(addGameObjects[k].childName); if (Object.op_Implicit((Object)(object)val2)) { GameObject val3 = Object.Instantiate<GameObject>(addGameObjects[k].followerPrefab, val2); val3.transform.localPosition = addGameObjects[k].localPos; val3.transform.localEulerAngles = addGameObjects[k].localAngles; val3.transform.localScale = addGameObjects[k].localScale; skinDefWolfoTracker.addedObjects[k] = val3; ItemDisplay component4 = val3.GetComponent<ItemDisplay>(); if (Object.op_Implicit((Object)(object)component4)) { component.baseRendererInfos = component.baseRendererInfos.Add(component4.rendererInfos); } } } if (!Object.op_Implicit((Object)(object)Run.instance) && Object.op_Implicit((Object)(object)modelObject.transform.parent) && ((Object)modelObject).name.EndsWith("Engi")) { EngiDisplay(modelObject, skinDefWolfoTracker); } } public void EngiDisplay(GameObject modelObject, SkinDefWolfoTracker tracker) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) Transform val = modelObject.transform.parent.Find("mdlEngi/EngiArmature/ROOT/base/stomach/chest/upper_arm.l/lower_arm.l/hand.l/IKBoneStart/IKBoneMid/MineHolder"); Material defaultMaterial = base.minionSkinReplacements[0].minionSkin.rendererInfos[0].defaultMaterial; GameObject val2 = Object.Instantiate<GameObject>(base.projectileGhostReplacements[1].projectileGhostReplacementPrefab, val.GetChild(0)); GameObject val3 = Object.Instantiate<GameObject>(base.projectileGhostReplacements[2].projectileGhostReplacementPrefab, val.GetChild(1)); val3.transform.localEulerAngles = new Vector3(0f, 0f, 0f); tracker.addedObjects = (GameObject[])(object)new GameObject[2] { val2, val3 }; ((Component)val.GetChild(0).GetChild(1)).gameObject.SetActive(false); ((Component)val.GetChild(0).GetChild(2)).gameObject.SetActive(false); ((Component)val.GetChild(1).GetChild(1)).gameObject.SetActive(false); ((Component)val.GetChild(1).GetChild(0)).gameObject.SetActive(false); ((Renderer)((Component)modelObject.transform.parent.GetChild(0).GetChild(1)).GetComponent<SkinnedMeshRenderer>()).material = defaultMaterial; } } public class SkinDefWolfoTracker : MonoBehaviour { [Serializable] public struct ChangedLightColors { public Light light; public TrailRenderer trail; public Color originalColor; public Color trailEndColor; } public GameObject[] addedObjects; public ChangedLightColors[] changedLights; public CharacterModel model; public void UndoWolfoSkin() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if (changedLights != null) { for (int i = 0; changedLights.Length > i; i++) { if (Object.op_Implicit((Object)(object)changedLights[i].light)) { changedLights[i].light.color = changedLights[i].originalColor; for (int j = 0; model.baseLightInfos.Length > j; j++) { if ((Object)(object)model.baseLightInfos[j].light == (Object)(object)changedLights[i].light) { model.baseLightInfos[j].defaultColor = changedLights[i].originalColor; } } } if (Object.op_Implicit((Object)(object)changedLights[i].trail)) { changedLights[i].trail.startColor = changedLights[i].originalColor; changedLights[i].trail.endColor = changedLights[i].trailEndColor; } } } if (addedObjects != null) { for (int k = 0; addedObjects.Length > k; k++) { Object.Destroy((Object)(object)addedObjects[k]); } } Object.DestroyImmediate((Object)(object)this); } } public class OverlayMaterialReplacer : MonoBehaviour { public Material targetMaterial; public Material replacementMaterial; } public class SkinsNemCommando { [RegisterAchievement("SIMU_SKIN_NEM_COMMANDO", "Skins.NemesisCommando.Wolfo", null, null)] public class ClearSimulacrumNemesisCommando : AchievementSimuVoidTwisted { 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("NemCommandoBody"); } } private static UnlockableDef unlockableDef; internal static void CallDuringAwake() { LanguageAPI.Add("SIMU_SKIN_NEM_COMMANDO", "Orange"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_COMMANDO_NAME", "Nemesis Commando: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_COMMANDO_DESCRIPTION", "As Nemesis Commando" + Unlocks.unlockCondition); unlockableDef = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDef.nameToken = "ACHIEVEMENT_SIMU_SKIN_NEM_COMMANDO_NAME"; unlockableDef.cachedName = "Skins.NemesisCommando.Wolfo"; unlockableDef.achievementIcon = WRect.MakeIcon(Resources.placeHolder); unlockableDef.hidden = true; ContentAddition.AddUnlockableDef(unlockableDef); if (WConfig.cfgUnlockAll.Value) { unlockableDef = null; } } internal static void ModdedSkin(GameObject BodyObject) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Nemesis Commando Skins"); BodyIndex bodyIndex = BodyObject.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = BodyObject.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[0]; } } public class SkinsNemEnforcer { [RegisterAchievement("SIMU_SKIN_NEM_ENFORCER", "Skins.NemesisEnforcer.Wolfo", null, null)] public class ClearSimulacrumNemesisEnforcer : AchievementSimuVoidTwisted { 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("NemesisEnforcerBody"); } } private static UnlockableDef unlockableDef; internal static void CallDuringAwake() { LanguageAPI.Add("SIMU_SKIN_NEM_ENFORCER", "Reverted"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_ENFORCER_NAME", "Nemesis Enforcer: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_ENFORCER_DESCRIPTION", "As Nemesis Enforcer" + Unlocks.unlockCondition); unlockableDef = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDef.nameToken = "ACHIEVEMENT_SIMU_SKIN_NEM_ENFORCER_NAME"; unlockableDef.cachedName = "Skins.NemesisEnforcer.Wolfo"; unlockableDef.achievementIcon = WRect.MakeIcon(Resources.skinIconNemEnforcer); unlockableDef.hidden = true; ContentAddition.AddUnlockableDef(unlockableDef); if (WConfig.cfgUnlockAll.Value) { unlockableDef = null; } } internal static void ModdedSkin(GameObject BodyObject) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Nemesis Enforcer Skins"); unlockableDef.hidden = false; BodyIndex bodyIndex = BodyObject.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = BodyObject.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[0]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Texture2D val3 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val3, Resources.texNemforcer, true); ((Texture)val3).filterMode = (FilterMode)1; ((Texture)val3).wrapMode = (TextureWrapMode)0; val2.mainTexture = (Texture)(object)val3; array[0].defaultMaterial = val2; array[4].defaultMaterial = val2; Texture2D val4 = new Texture2D(128, 128, (TextureFormat)12, false); ImageConversion.LoadImage(val4, Resources.skinIconNemEnforcer, true); ((Texture)val4).filterMode = (FilterMode)1; Sprite icon = Sprite.Create(val4, WRect.rec128, WRect.half); SkinDefInfo val5 = default(SkinDefInfo); val5.Name = "skinNemesisEnforcerWolfo"; val5.NameToken = "SIMU_SKIN_NEM_ENFORCER"; val5.Icon = icon; val5.BaseSkins = val.baseSkins; val5.RootObject = val.rootObject; val5.UnlockableDef = unlockableDef; val5.RendererInfos = array; val5.MeshReplacements = val.meshReplacements; val5.GameObjectActivations = val.gameObjectActivations; SkinDefInfo val6 = val5; SkinDef val7 = Skins.CreateNewSkinDef(val6); componentInChildren.skins = componentInChildren.skins.Add(val7); BodyCatalog.skins[bodyIndex] = BodyCatalog.skins[bodyIndex].Add(val7); } } public class SkinsNemMercenary { [RegisterAchievement("SIMU_SKIN_NEM_MERCENARY", "Skins.NemesisMercenary.Wolfo", null, null)] public class ClearSimulacrumNemesisMercenary : AchievementSimuVoidTwisted { 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("NemMercBody"); } } private static UnlockableDef unlockableDef; internal static void CallDuringAwake() { LanguageAPI.Add("SIMU_SKIN_NEM_MERCENARY", "Red"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_MERCENARY_NAME", "Nemesis Mercenary: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_NEM_MERCENARY_DESCRIPTION", "As Nemesis Mercenary" + Unlocks.unlockCondition); unlockableDef = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDef.nameToken = "ACHIEVEMENT_SIMU_SKIN_NEM_MERCENARY_NAME"; unlockableDef.cachedName = "Skins.NemesisMercenary.Wolfo"; unlockableDef.achievementIcon = WRect.MakeIcon(Resources.placeHolder); unlockableDef.hidden = true; ContentAddition.AddUnlockableDef(unlockableDef); if (WConfig.cfgUnlockAll.Value) { unlockableDef = null; } } internal static void ModdedSkin(GameObject BodyObject) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Nemesis Mercenary Skins"); BodyIndex bodyIndex = BodyObject.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = BodyObject.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[0]; } } public class SkinsArsonist { [RegisterAchievement("SIMU_SKIN_ARSONIST", "Skins.Arsonist.Wolfo", null, null)] public class ClearSimulacrumArsonistClassic : AchievementSimuVoidTwisted { 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("ArsonistBody"); } } private static UnlockableDef unlockableDef; private static SkinDef skinBlue; private static SkinDef skinBlueGM; internal static void CallDuringAwake() { LanguageAPI.Add("SIMU_SKIN_ARSONIST_ORANGE", "Ember"); LanguageAPI.Add("SIMU_SKIN_ARSONIST_BLUE", "Azure"); LanguageAPI.Add("SIMU_SKIN_ARSONIST_GM_BLUE", "Lightningbug"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_ARSONIST_NAME", "Arsonist: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_ARSONIST_DESCRIPTION", "As Arsonist" + Unlocks.unlockCondition); unlockableDef = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDef.nameToken = "ACHIEVEMENT_SIMU_SKIN_ARSONIST_NAME"; unlockableDef.cachedName = "Skins.Arsonist.Wolfo"; unlockableDef.achievementIcon = WRect.MakeIcon256(Resources.skinArsonistIcon); unlockableDef.hidden = true; ContentAddition.AddUnlockableDef(unlockableDef); if (WConfig.cfgUnlockAll.Value) { unlockableDef = null; } } internal static void AddProjectiles() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) int num = ProjectileCatalog.FindProjectileIndex("strongFlare"); Debug.Log((object)num); GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(num); GameObject val = PrefabAPI.InstantiateClone(projectilePrefab.GetComponent<ProjectileController>().ghostPrefab, "ChirrDartGhostPink", false); Material val2 = Object.Instantiate<Material>(((Renderer)((Component)val.transform.GetChild(1)).GetComponent<MeshRenderer>()).material); val2.color = new Color(0f, 0.9f, 0.6f); ((Renderer)((Component)val.transform.GetChild(1)).GetComponent<MeshRenderer>()).material = val2; ((Component)val.transform.GetChild(2).GetChild(1)).GetComponent<ParticleSystem>().startColor = new Color(0.2f, 0.7f, 0.5f, 0.8f); skinBlue.projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val } }; skinBlueGM.projectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[1] { new ProjectileGhostReplacement { projectilePrefab = projectilePrefab, projectileGhostReplacementPrefab = val } }; } internal static void ModdedSkin(GameObject ArsonistBody) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Arsonist Skins"); unlockableDef.hidden = false; BodyIndex bodyIndex = ArsonistBody.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = ArsonistBody.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[0]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val3 = Object.Instantiate<Material>(val.rendererInfos[1].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[8].defaultMaterial); Texture2D val5 = new Texture2D(512, 512, (TextureFormat)3, false); ImageConversion.LoadImage(val5, Resources.Arsonist_diffuse, true); ((Texture)val5).filterMode = (FilterMode)1; ((Texture)val5).wrapMode = (TextureWrapMode)0; Texture2D val6 = new Texture2D(1024, 1024, (TextureFormat)3, false); ImageConversion.LoadImage(val6, Resources.ArsonistMetal_diffuse, true); ((Texture)val6).filterMode = (FilterMode)1; ((Texture)val6).wrapMode = (TextureWrapMode)0; Texture2D val7 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val7, Resources.ArsonistMetal_emission, true); ((Texture)val7).filterMode = (FilterMode)1; ((Texture)val7).wrapMode = (TextureWrapMode)0; Texture2D val8 = new Texture2D(1024, 1024, (TextureFormat)4, false); ImageConversion.LoadImage(val8, Resources.ArsonistCloth_diffuse, true); ((Texture)val8).filterMode = (FilterMode)1; ((Texture)val8).wrapMode = (TextureWrapMode)0; val2.mainTexture = (Texture)(object)val5; val3.mainTexture = (Texture)(object)val6; val3.SetTexture("_EmTex", (Texture)(object)val7); val3.SetTexture("_EmissionMap", (Texture)(object)val7); val4.mainTexture = (Texture)(object)val8; array[0].defaultMaterial = val2; array[1].defaultMaterial = val3; array[2].defaultMaterial = val3; array[3].defaultMaterial = val3; array[4].defaultMaterial = val3; array[5].defaultMaterial = val3; array[6].defaultMaterial = val3; array[8].defaultMaterial = val4; Texture2D val9 = new Texture2D(256, 256, (TextureFormat)12, false); ImageConversion.LoadImage(val9, Resources.skinArsonistIcon, true); ((Texture)val9).filterMode = (FilterMode)1; Sprite icon = Sprite.Create(val9, WRect.rec256, WRect.half); SkinDefInfo val10 = default(SkinDefInfo); val10.Name = "skinArsonistWolfo_ORANGE"; val10.NameToken = "SIMU_SKIN_ARSONIST_ORANGE"; val10.Icon = icon; val10.BaseSkins = (SkinDef[])(object)new SkinDef[1] { val }; val10.RootObject = val.rootObject; val10.UnlockableDef = unlockableDef; val10.RendererInfos = array; val10.MeshReplacements = val.meshReplacements; val10.GameObjectActivations = val.gameObjectActivations; val10.ProjectileGhostReplacements = val.projectileGhostReplacements; SkinDefInfo val11 = val10; SkinDef val12 = Skins.CreateNewSkinDef(val11); componentInChildren.skins = componentInChildren.skins.Add(val12); BodyCatalog.skins[bodyIndex] = BodyCatalog.skins[bodyIndex].Add(val12); ModdedSkinBlue(ArsonistBody); ModdedSkinBlueGM(ArsonistBody); } internal static void ModdedSkinBlue(GameObject ArsonistBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Expected O, but got Unknown //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) BodyIndex bodyIndex = ArsonistBody.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = ArsonistBody.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[0]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val3 = Object.Instantiate<Material>(val.rendererInfos[1].defaultMaterial); Material val4 = Object.Instantiate<Material>(val.rendererInfos[8].defaultMaterial); Texture2D val5 = new Texture2D(512, 512, (TextureFormat)3, false); ImageConversion.LoadImage(val5, Resources.Arsonist_diffuseBLUE, true); ((Texture)val5).filterMode = (FilterMode)1; ((Texture)val5).wrapMode = (TextureWrapMode)0; Texture2D val6 = new Texture2D(1024, 1024, (TextureFormat)3, false); ImageConversion.LoadImage(val6, Resources.ArsonistMetal_diffuseBLUE, true); ((Texture)val6).filterMode = (FilterMode)1; ((Texture)val6).wrapMode = (TextureWrapMode)0; Texture2D val7 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val7, Resources.ArsonistMetal_emissionBLUE, true); ((Texture)val7).filterMode = (FilterMode)1; ((Texture)val7).wrapMode = (TextureWrapMode)0; Texture2D val8 = new Texture2D(1024, 1024, (TextureFormat)4, false); ImageConversion.LoadImage(val8, Resources.ArsonistCloth_diffuseBLUE, true); ((Texture)val8).filterMode = (FilterMode)1; ((Texture)val8).wrapMode = (TextureWrapMode)0; val2.mainTexture = (Texture)(object)val5; val3.mainTexture = (Texture)(object)val6; val3.SetTexture("_EmTex", (Texture)(object)val7); val3.SetTexture("_EmissionMap", (Texture)(object)val7); val4.mainTexture = (Texture)(object)val8; array[0].defaultMaterial = val2; array[1].defaultMaterial = val3; array[2].defaultMaterial = val3; array[3].defaultMaterial = val3; array[4].defaultMaterial = val3; array[5].defaultMaterial = val3; array[6].defaultMaterial = val3; array[8].defaultMaterial = val4; Texture2D val9 = new Texture2D(256, 256, (TextureFormat)12, false); ImageConversion.LoadImage(val9, Resources.skinArsonistIconBlue, true); ((Texture)val9).filterMode = (FilterMode)1; Sprite icon = Sprite.Create(val9, WRect.rec256, WRect.half); SkinDefInfo val10 = default(SkinDefInfo); val10.Name = "skinArsonistWolfo_BLUE"; val10.NameToken = "SIMU_SKIN_ARSONIST_BLUE"; val10.Icon = icon; val10.BaseSkins = (SkinDef[])(object)new SkinDef[1] { val }; val10.RootObject = val.rootObject; val10.UnlockableDef = unlockableDef; val10.RendererInfos = array; val10.MeshReplacements = val.meshReplacements; val10.GameObjectActivations = val.gameObjectActivations; val10.ProjectileGhostReplacements = val.projectileGhostReplacements; SkinDefInfo val11 = val10; SkinDef val12 = Skins.CreateNewSkinDef(val11); componentInChildren.skins = componentInChildren.skins.Add(val12); BodyCatalog.skins[bodyIndex] = BodyCatalog.skins[bodyIndex].Add(val12); } internal static void ModdedSkinBlueGM(GameObject ArsonistBody) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Expected O, but got Unknown //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) BodyIndex bodyIndex = ArsonistBody.GetComponent<CharacterBody>().bodyIndex; ModelSkinController componentInChildren = ArsonistBody.GetComponentInChildren<ModelSkinController>(); SkinDef val = componentInChildren.skins[2]; RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[val.rendererInfos.Length]; Array.Copy(val.rendererInfos, array, val.rendererInfos.Length); Material val2 = Object.Instantiate<Material>(val.rendererInfos[0].defaultMaterial); Material val3 = Object.Instantiate<Material>(val.rendererInfos[8].defaultMaterial); Texture2D val4 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val4, Resources.NeoArsonistMetal_diffuse, true); ((Texture)val4).filterMode = (FilterMode)1; ((Texture)val4).wrapMode = (TextureWrapMode)0; Texture2D val5 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val5, Resources.NeoArsonistMetal_emission, true); ((Texture)val5).filterMode = (FilterMode)1; ((Texture)val5).wrapMode = (TextureWrapMode)0; Texture2D val6 = new Texture2D(1024, 1024, (TextureFormat)10, false); ImageConversion.LoadImage(val6, Resources.NeoArsonistCloth_diffuse, true); ((Texture)val6).filterMode = (FilterMode)1; ((Texture)val6).wrapMode = (TextureWrapMode)0; val2.mainTexture = (Texture)(object)val4; val2.SetTexture("_EmTex", (Texture)(object)val5); val2.SetTexture("_EmissionMap", (Texture)(object)val5); val3.mainTexture = (Texture)(object)val6; array[0].defaultMaterial = val2; array[1].defaultMaterial = val2; array[2].defaultMaterial = val2; array[3].defaultMaterial = val2; array[4].defaultMaterial = val2; array[5].defaultMaterial = val2; array[6].defaultMaterial = val2; array[8].defaultMaterial = val3; Texture2D val7 = new Texture2D(256, 256, (TextureFormat)12, false); ImageConversion.LoadImage(val7, Resources.skinArsonistIconGMBLue, true); ((Texture)val7).filterMode = (FilterMode)1; Sprite icon = Sprite.Create(val7, WRect.rec256, WRect.half); SkinDefInfo val8 = default(SkinDefInfo); val8.Name = "skinArsonistWolfo_GM_BLUE"; val8.NameToken = "SIMU_SKIN_ARSONIST_GM_BLUE"; val8.Icon = icon; val8.BaseSkins = (SkinDef[])(object)new SkinDef[1] { val }; val8.RootObject = val.rootObject; val8.UnlockableDef = unlockableDef; val8.RendererInfos = array; val8.MeshReplacements = val.meshReplacements; val8.GameObjectActivations = val.gameObjectActivations; val8.ProjectileGhostReplacements = val.projectileGhostReplacements; SkinDefInfo val9 = val8; SkinDef val10 = Skins.CreateNewSkinDef(val9); componentInChildren.skins = componentInChildren.skins.Add(val10); BodyCatalog.skins[bodyIndex] = BodyCatalog.skins[bodyIndex].Add(val10); } } public class SkinsFutureModSupport { internal static void CallDuringAwake() { } } public class TeslaDesolatorColors { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void AddToTeslaTrooper(GameObject TeslaTrooperBody) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: 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_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: 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_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Expected O, but got Unknown //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Expected O, but got Unknown //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Expected O, but got Unknown //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: 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_0640: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Expected O, but got Unknown //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b7: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: 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_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)CopyToDisplay); CharacterSelectSurvivorPreviewDisplayController.OnLoadoutChangedGlobal += new hook_OnLoadoutChangedGlobal(FixColorsNotChanging); Debug.Log((object)"Tesla Trooper Colors"); TeslaDesolatorUnlocks.unlockableDefTesla.hidden = false; GenericSkill[] components = TeslaTrooperBody.GetComponents<GenericSkill>(); SkillFamily skillFamily = components[^1].skillFamily; SkillDef skillDef = skillFamily.variants[0].skillDef; SkillDef skillDef2 = components[0].skillFamily.variants[0].skillDef; SkillDef val = Object.Instantiate<SkillDef>(skillFamily.variants[0].skillDef); val.skillName = "NeonRed"; val.skillNameToken = "Neon Red"; val.icon = WRect.MakeIcon32(Resources.teslaColorRed); SkillDef val2 = Object.Instantiate<SkillDef>(skillFamily.variants[1].skillDef); val2.skillName = "NeonBlue"; val2.skillNameToken = "Neon Blue"; val2.icon = WRect.MakeIcon32(Resources.teslaColorBlue); SkillDef val3 = Object.Instantiate<SkillDef>(skillFamily.variants[2].skillDef); val3.skillName = "strongblue"; val3.skillNameToken = "Strong Blue"; val3.icon = WRect.MakeIcon32(Resources.teslaSimpleBlue); SkillDef val4 = Object.Instantiate<SkillDef>(skillFamily.variants[1].skillDef); val4.skillName = "NeonCyan"; val4.skillNameToken = "Neon Cyan"; val4.icon = WRect.MakeIcon32(Resources.teslaColorCyan); SkillDef val5 = Object.Instantiate<SkillDef>(skillFamily.variants[6].skillDef); val5.skillName = "NeonPurple"; val5.skillNameToken = "Hot Pink"; val5.icon = WRect.MakeIcon32(Resources.teslaColorPurple); SkillDef val6 = Object.Instantiate<SkillDef>(skillFamily.variants[6].skillDef); val6.skillName = "white"; val6.skillNameToken = "White"; val6.icon = WRect.MakeIcon32(Resources.teslaSimpleWhite); Variant val7 = default(Variant); val7.skillDef = val6; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val8 = val7; val7 = default(Variant); val7.skillDef = val; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val9 = val7; val7 = default(Variant); val7.skillDef = val3; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val10 = val7; val7 = default(Variant); val7.skillDef = val2; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val11 = val7; val7 = default(Variant); val7.skillDef = val4; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val12 = val7; val7 = default(Variant); val7.skillDef = val5; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefTesla; Variant val13 = val7; skillFamily.variants = skillFamily.variants.Add(val8, val10, val11, val12, val13, val9); SkinRecolorController componentInChildren = TeslaTrooperBody.GetComponentInChildren<SkinRecolorController>(); Recolor[] recolors = componentInChildren.Recolors; float num = 2.5f; float num2 = 1.25f; Color val14 = default(Color); ((Color)(ref val14))..ctor(4f, 2f, 2f, 2f); Color val15 = default(Color); ((Color)(ref val15))..ctor(2f, 2f, 2.5f, 2f); Color val16 = default(Color); ((Color)(ref val16))..ctor(2f, 2f, 2f, 1f); Recolor val17 = new Recolor(); val17.recolorName = "white"; val17.colors = (Color[])(object)new Color[4] { Color.white, Color.white, new Color(0.75f, 0.75f, 0.75f, 1f), new Color(0.5f, 1f, 1f) }; Recolor val18 = val17; val17 = new Recolor(); val17.recolorName = "strongblue"; val17.colors = (Color[])(object)new Color[4] { componentInChildren.Recolors[1].colors[0] * 1.6f, componentInChildren.Recolors[1].colors[1] * 1.5f, componentInChildren.Recolors[1].colors[2], componentInChildren.Recolors[1].colors[3] * 1.1f }; Recolor val19 = val17; val17 = new Recolor(); val17.recolorName = "neonred"; val17.colors = (Color[])(object)new Color[4] { new Color(2.5f, 0.55f, 0.55f, 1f), new Color(1.5f, 0.6f, 0.6f, 1f), val16, componentInChildren.Recolors[0].colors[3] * num2 }; Recolor val20 = val17; val17 = new Recolor(); val17.recolorName = "neonblue"; val17.colors = (Color[])(object)new Color[4] { new Color(1.25f, 1.25f, 2.5f, 1f), new Color(0.75f, 0.75f, 1f, 1f), val16, componentInChildren.Recolors[1].colors[3] * num2 }; Recolor val21 = val17; val17 = new Recolor(); val17.recolorName = "neoncyan"; val17.colors = (Color[])(object)new Color[4] { new Color(0.6f, 1.8f, 1.8f, 1f), new Color(0.6f, 1f, 1f, 1f), val16, componentInChildren.Recolors[5].colors[3] * num2 }; Recolor val22 = val17; val17 = new Recolor(); val17.recolorName = "neonpurple"; val17.colors = (Color[])(object)new Color[4] { new Color(1.6f, 1f, 1.8f, 1f), new Color(0.9f, 0.5f, 0.9f, 1f), val16, componentInChildren.Recolors[6].colors[3] * num2 }; Recolor val23 = val17; recolors = recolors.Add(val18, val19, val21, val22, val23, val20); Reflection.SetFieldValue<Recolor[]>((object)componentInChildren, "recolors", recolors); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void AddToDesolator(GameObject DesolatorBody) { //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_027c: 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_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Expected O, but got Unknown //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_031c: 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_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Expected O, but got Unknown //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Expected O, but got Unknown //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Expected O, but got Unknown //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: 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_04fe: Expected O, but got Unknown //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058e: Expected O, but got Unknown //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Desolator Colors"); TeslaDesolatorUnlocks.unlockableDefDesolator.hidden = false; SkillFamily skillFamily = DesolatorBody.GetComponents<GenericSkill>()[^1].skillFamily; SkillDef val = Object.Instantiate<SkillDef>(skillFamily.variants[3].skillDef); val.skillName = "greenstrong"; val.skillNameToken = "Strong Green"; val.icon = WRect.MakeIcon32(Resources.teslaSimpleGreen); SkillDef val2 = Object.Instantiate<SkillDef>(skillFamily.variants[2].skillDef); val2.skillName = "NeonGreen"; val2.skillNameToken = "Neon Green"; val2.icon = WRect.MakeIcon32(Resources.teslaColorGreen); SkillDef val3 = Object.Instantiate<SkillDef>(skillFamily.variants[3].skillDef); val3.skillName = "NeonYellow"; val3.skillNameToken = "Neon Yellow"; val3.icon = WRect.MakeIcon32(Resources.teslaColorYellow); SkillDef val4 = Object.Instantiate<SkillDef>(skillFamily.variants[4].skillDef); val4.skillName = "NeonOrange"; val4.skillNameToken = "Neon Orange"; val4.icon = WRect.MakeIcon32(Resources.teslaColorOrange); SkillDef val5 = Object.Instantiate<SkillDef>(skillFamily.variants[4].skillDef); val5.skillName = "SafetyYellow"; val5.skillNameToken = "Safety Yellow"; val5.icon = WRect.MakeIcon32(Resources.teslaColorYellowGreen); SkillDef val6 = Object.Instantiate<SkillDef>(skillFamily.variants[4].skillDef); val6.skillName = "white"; val6.skillNameToken = "Gray"; val6.icon = WRect.MakeIcon32(Resources.teslaSimpleGray); Variant val7 = default(Variant); val7.skillDef = val6; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val8 = val7; val7 = default(Variant); val7.skillDef = val; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val9 = val7; val7 = default(Variant); val7.skillDef = val2; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val10 = val7; val7 = default(Variant); val7.skillDef = val3; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val11 = val7; val7 = default(Variant); val7.skillDef = val4; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val12 = val7; val7 = default(Variant); val7.skillDef = val5; val7.unlockableDef = TeslaDesolatorUnlocks.unlockableDefDesolator; Variant val13 = val7; skillFamily.variants = skillFamily.variants.Add(val8, val9, val10, val13, val11, val12); SkinRecolorController componentInChildren = DesolatorBody.GetComponentInChildren<SkinRecolorController>(); Recolor[] recolors = componentInChildren.Recolors; int num = 5; float num2 = 1.5f; Recolor val14 = new Recolor(); val14.recolorName = "white"; val14.colors = (Color[])(object)new Color[4] { new Color(0.7f, 0.7f, 0.7f), new Color(0.4f, 0.5f, 0f), Color.white, Color.white }; Recolor val15 = val14; val14 = new Recolor(); val14.recolorName = "greenstrong"; val14.colors = (Color[])(object)new Color[4] { new Color(0.7f, 1f, 0.2f), new Color(0.1f, 0.3f, 0.1f), new Color(0.4f, 1f, 0.2f), new Color(0.4f, 1f, 0.2f) }; Recolor val16 = val14; val14 = new Recolor(); val14.recolorName = "neongreen"; val14.colors = (Color[])(object)new Color[4] { new Color(0f, 2.25f, 0f), new Color(0f, 0.5f, 0f), new Color(0f, 2f, 0f), new Color(0f, 2f, 0f) }; Recolor val17 = val14; val14 = new Recolor(); val14.recolorName = "safetyyellow"; val14.colors = (Color[])(object)new Color[4] { new Color(1.5f, 2.2f, 0f), new Color(0.35f, 0.5f, 0f), new Color(1.5f, 3f, 0f), new Color(1.5f, 3f, 0f) }; Recolor val18 = val14; val14 = new Recolor(); val14.recolorName = "neonyellow"; val14.colors = (Color[])(object)new Color[4] { new Color(2.2f, 2.05f, 0f), new Color(0.4f, 0.375f, 0f), new Color(2f, 1.8f, 0f), new Color(2f, 1.8f, 0f) }; Recolor val19 = val14; val14 = new Recolor(); val14.recolorName = "neonorange"; val14.colors = (Color[])(object)new Color[4] { new Color(2.5f, 1.25f, 0f), new Color(0.5f, 0.25f, 0f), new Color(3f, 1.5f, 0f), new Color(3f, 1.5f, 0f) }; Recolor val20 = val14; recolors = recolors.Add(val15, val16, val17, val18, val19, val20); Reflection.SetFieldValue<Recolor[]>((object)componentInChildren, "recolors", recolors); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void AddToTeslaTower(GameObject TeslaTowerBody) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_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_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Tesla Tower Colors"); SkinRecolorController componentInChildren = TeslaTowerBody.GetComponentInChildren<SkinRecolorController>(); Recolor[] recolors = componentInChildren.Recolors; float num = 1.5f; Color val = default(Color); ((Color)(ref val))..ctor(1.75f, 1.25f, 1.25f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1.5f, 1f, 1.75f); Recolor val3 = new Recolor(); val3.recolorName = "white"; val3.colors = (Color[])(object)new Color[2] { Color.white, Color.white }; Recolor val4 = val3; val3 = new Recolor(); val3.recolorName = "strongblue"; val3.colors = (Color[])(object)new Color[2] { componentInChildren.Recolors[1].colors[0] * 1.1f, componentInChildren.Recolors[1].colors[1] * 1.1f }; Recolor val5 = val3; val3 = new Recolor(); val3.recolorName = "neonred"; val3.colors = (Color[])(object)new Color[2] { componentInChildren.Recolors[0].colors[0] * val, componentInChildren.Recolors[0].colors[1] * val }; Recolor val6 = val3; val3 = new Recolor(); val3.recolorName = "neonblue"; val3.colors = (Color[])(object)new Color[2] { componentInChildren.Recolors[1].colors[0] * num, componentInChildren.Recolors[1].colors[1] * num }; Recolor val7 = val3; val3 = new Recolor(); val3.recolorName = "neoncyan"; val3.colors = (Color[])(object)new Color[2] { componentInChildren.Recolors[5].colors[0] * num, componentInChildren.Recolors[5].colors[1] * num }; Recolor val8 = val3; val3 = new Recolor(); val3.recolorName = "neonpurple"; val3.colors = (Color[])(object)new Color[2] { componentInChildren.Recolors[6].colors[0] * val2, componentInChildren.Recolors[6].colors[1] * val2 }; Recolor val9 = val3; recolors = recolors.Add(val4, val5, val7, val8, val9, val6); Reflection.SetFieldValue<Recolor[]>((object)componentInChildren, "recolors", recolors); GameObject val10 = BodyCatalog.FindBodyPrefab("TeslaTowerScepterBody"); SkinRecolorController componentInChildren2 = val10.GetComponentInChildren<SkinRecolorController>(); Reflection.SetFieldValue<Recolor[]>((object)componentInChildren2, "recolors", componentInChildren.Recolors); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] internal static void CopyToDisplay() { SurvivorDef val = SurvivorCatalog.FindSurvivorDef("TeslaTrooper"); SurvivorDef val2 = SurvivorCatalog.FindSurvivorDef("Desolator"); GameObject val3 = BodyCatalog.FindBodyPrefab("TeslaTrooperBody"); GameObject val4 = BodyCatalog.FindBodyPrefab("DesolatorBody"); SkinRecolorController component = val.displayPrefab.GetComponent<SkinRecolorController>(); Recolor[] recolors = val3.GetComponentInChildren<SkinRecolorController>().Recolors; Reflection.SetFieldValue<Recolor[]>((object)component, "recolors", recolors); component = val2.displayPrefab.GetComponent<SkinRecolorController>(); recolors = val4.GetComponentInChildren<SkinRecolorController>().Recolors; Reflection.SetFieldValue<Recolor[]>((object)component, "recolors", recolors); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private static void FixColorsNotChanging(orig_OnLoadoutChangedGlobal orig, CharacterSelectSurvivorPreviewDisplayController self, NetworkUser changedNetworkUser) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_0058: Invalid comparison between Unknown and I4 //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, changedNetworkUser); SkinRecolorController component = ((Component)self).GetComponent<SkinRecolorController>(); if (!Object.op_Implicit((Object)(object)component) || (Object)(object)changedNetworkUser != (Object)(object)self.networkUser) { return; } Loadout val = Loadout.RequestInstance(); changedNetworkUser.networkLoadout.CopyLoadout(val); BodyIndex val2 = BodyCatalog.FindBodyIndex(self.bodyPrefab); if ((int)val2 != -1) { uint skillVariant = self.currentLoadout.bodyLoadoutManager.GetSkillVariant(val2, 4); SkillFamily skillFamily = self.currentLoadout.bodyLoadoutManager.GetReadOnlyBodyLoadout(val2).GetSkillFamily(4); SkillDef skillDef = skillFamily.variants[skillVariant].skillDef; if (Object.op_Implicit((Object)(object)skillDef)) { component.SetRecolor(skillDef.skillName.ToLowerInvariant()); } } } } public class TeslaDesolatorUnlocks { [RegisterAchievement("SIMU_SKIN_TESLATROOPER", "Skins.TeslaTrooper.Wolfo", null, null)] public class ClearSimulacrumTeslaTrooperClassic : AchievementSimuVoidTwisted { 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("TeslaTrooperBody"); } } [RegisterAchievement("SIMU_SKIN_DESOLATOR", "Skins.Desolator.Wolfo", null, null)] public class ClearSimulacrumDesolatorClassic : AchievementSimuVoidTwisted { 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("DesolatorBody"); } } public static UnlockableDef unlockableDefTesla; public static UnlockableDef unlockableDefDesolator; internal static void CallDuringAwake() { LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_TESLATROOPER_NAME", "Tesla Trooper: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_TESLATROOPER_DESCRIPTION", "As Tesla Trooper" + Unlocks.unlockCondition); unlockableDefTesla = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDefTesla.nameToken = "ACHIEVEMENT_SIMU_SKIN_TESLATROOPER_NAME"; unlockableDefTesla.cachedName = "Skins.TeslaTrooper.Wolfo"; unlockableDefTesla.achievementIcon = WRect.MakeIcon(Resources.skinIconTesla); unlockableDefTesla.hidden = true; ContentAddition.AddUnlockableDef(unlockableDefTesla); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_DESOLATOR_NAME", "Desolator: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_DESOLATOR_DESCRIPTION", "As Desolator" + Unlocks.unlockCondition); unlockableDefDesolator = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDefDesolator.nameToken = "ACHIEVEMENT_SIMU_SKIN_DESOLATOR_NAME"; unlockableDefDesolator.cachedName = "Skins.Desolator.Wolfo"; unlockableDefDesolator.achievementIcon = WRect.MakeIcon(Resources.skinIconDesolator); unlockableDefDesolator.hidden = true; ContentAddition.AddUnlockableDef(unlockableDefDesolator); if (WConfig.cfgUnlockAll.Value) { unlockableDefTesla = null; unlockableDefDesolator = null; } } } public class SkinsCHEF { public class FixChefDisplay : MonoBehaviour { public void Fix(SkinDef skinDef) { ((Component)((Component)this).transform.GetChild(5)).gameObject.SetActive(false); ((Renderer)((Component)((Component)this).transform.GetChild(3)).GetComponent<SkinnedMeshRenderer>()).material = skinDef.rendererInfos[1].defaultMaterial; ((Renderer)((Component)((Component)this).transform.GetChild(3)).GetComponent<SkinnedMeshRenderer>()).materials = (Material[])(object)new Material[2] { skinDef.rendererInfos[1].defaultMaterial, skinDef.rendererInfos[1].defaultMaterial }; } } public class FixChefArmTrail : MonoBehaviour { public Material[] arms; public void Start() { GameObject owner = ((Component)this).GetComponent<ProjectileController>().owner; if (Object.op_Implicit((Object)(object)owner)) { ((Renderer)((Component)this).GetComponent<LineRenderer>()).material = arms[owner.GetComponent<CharacterBody>().skinIndex]; } } } [RegisterAchievement("SIMU_SKIN_CHEF", "Skins.Chef.Wolfo", null, null)] public class ClearSimulacrumCHEF : AchievementSimuVoidTwisted { 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("CHEF"); } } public static UnlockableDef unlockableDef; internal static void CallDuringAwake() { LanguageAPI.Add("SIMU_SKIN_CHEF_BLACK", "Rotisseur"); LanguageAPI.Add("SIMU_SKIN_CHEF_RED", "Boucher"); LanguageAPI.Add("SIMU_SKIN_CHEF_GREEN", "Entremetier"); LanguageAPI.Add("SIMU_SKIN_CHEF_BLUE", "Poissonier"); LanguageAPI.Add("SIMU_SKIN_CHEF_CYAN", "Saucier"); LanguageAPI.Add("SIMU_SKIN_CHEF_PROVI", "Sous Chef"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_CHEF_NAME", "CHEF: Alternated"); LanguageAPI.Add("ACHIEVEMENT_SIMU_SKIN_CHEF_DESCRIPTION", "As CHEF" + Unlocks.unlockCondition); unlockableDef = ScriptableObject.CreateInstance<UnlockableDef>(); unlockableDef.nameToken = "ACHIEVEMENT_SIMU_SKIN_CHEF_NAME"; unlockableDef.cachedName = "Skins.Chef.Wolfo"; unlockableDef.hidden = true; unlockableDef.achievementIcon = WRect.MakeIcon(Resources.skinChefIconRed); ContentAddition.AddUnlockableDef(unlockableDef); if (WConfig.cfgUnlockAll.Value) { unlockableDef = null; } ((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)ChefDisplayFix); } public static void ChefDisplayFix() { SurvivorDef val = SurvivorCatalog.FindSurvivorDef("CHEF"); if (!Object.op_Implicit((Object)(object)val)) { Debug.LogWarning((object)"No chef"); return; } Debug.Log((object)"CHEF fix"); val.displayPrefab.AddComponent<FixChefDisplay>(); } public static void KnifeProjectiles() { //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) GameObject val = BodyCatalog.FindBodyPrefab("CHEF"); ModelSkinController componentInChildren = val.GetComponentInChildren<ModelSkinController>(); int num = ProjectileCatalog.FindProjectileIndex("CHEFCleaver"); int num2 = ProjectileCatalog.FindProjectileIndex("CHEFKnife"); int num3 = ProjectileCatalog.FindProjectileIndex("ChefKnifeBoosted"); Debug.Log((object)num); Debug.Log((object)num2); GameObject projectilePrefab = ProjectileCatalog.GetProjectilePrefab(num); GameObject projectilePrefab2 = ProjectileCatalog.GetProjectilePrefab(num2); GameObject projectilePrefab3 = ProjectileCatalog.GetProjectilePrefab(num3); Material material = ((Renderer)projectilePrefab2.GetComponent<LineRenderer>()).material; Material val2 = Object.Instantiate<Material>(material); Material val3 = Object.Instantiate<Material>(material); Material val4 = Object.Instantiate<Material>(material); Material val5 = Object.Instantiate<Material>(material); Material val6 = Object.Instantiate<Material>(material); Material val7 = Object.Instantiate<Material>(material); val2.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmRED); val3.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmGREEN); val4.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmBLUE); val5.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmBLACK); val6.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmCYAN); val7.mainTexture = WRect.MakeTexture(128, 64, (TextureFormat)10, (FilterMode)1, (TextureWrapMode)0, Resources.texArmPROVI); Material[] arms = (Material[])(object)new Material[7] { material, val2, val3, val4, val5, val6, val7 }; projectilePrefab2.AddComponent<FixChefArmTrail>().arms = arms; projectilePrefab3.AddComponent<FixChefArmTrail>().arms = arms; for (int i = 1; i < componentInChildren.skins.Length; i++) { GameObject val8 = PrefabAPI.InstantiateClone(projectilePrefab.GetComponent<ProjectileController>().ghostPrefab, "CleaverGhost" + i, false); GameObject val9 = PrefabAPI.InstantiateClone(projectilePrefab2.GetComponent<ProjectileController>().ghostPrefab, "KnifeGhost" + i, false); ((Renderer)((Component)val8.transform.GetChild(0).GetChild(0)).GetComponent<MeshRenderer>()).materials = (Material[])(object)new Material[2] { componentInChildren.skins[i].rendererInfos[1].defaul