Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of IXTweaks v1.0.3
IXtimes.IXTweaks.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CSync.Lib; using CSync.Util; using GameNetcodeStuff; using IL; using IXTweaks.MonoBehaviors; using LethalLib.Modules; using LobbyCompatibility.Attributes; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using MoreShipUpgrades.API; using MoreShipUpgrades.Managers; using MoreShipUpgrades.Misc.Upgrades; using MoreShipUpgrades.UpgradeComponents.TierUpgrades.Enemies; using On; using Unity.Netcode; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("MMHOOK_Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("MoreShipUpgrades")] [assembly: IgnoresAccessChecksTo("UnityEngine")] [assembly: AssemblyCompany("IXtimes.IXTweaks")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+6a6150fcf8a82796d1090dd26197f86860ed3098")] [assembly: AssemblyProduct("IXTweaks")] [assembly: AssemblyTitle("IXtimes.IXTweaks")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace IXTweaks { internal class IXTweaksConfig : SyncedConfig<IXTweaksConfig> { [DataMember] public SyncedEntry<int> slimeHunterLevel; [DataMember] public SyncedEntry<int> slimeSampleMinVal; [DataMember] public SyncedEntry<int> slimeSampleMaxVal; [DataMember] public SyncedEntry<int> nutcrackerHunterLevel; [DataMember] public SyncedEntry<int> nutcrackerSampleMinVal; [DataMember] public SyncedEntry<int> nutcrackerSampleMaxVal; [DataMember] public SyncedEntry<int> springHitPoints; [DataMember] public SyncedEntry<int> springHunterLevel; [DataMember] public SyncedEntry<int> springSampleMinVal; [DataMember] public SyncedEntry<int> springSampleMaxVal; [DataMember] public SyncedEntry<int> jesterHitPoints; [DataMember] public SyncedEntry<int> jesterHunterLevel; [DataMember] public SyncedEntry<int> jesterSampleMinVal; [DataMember] public SyncedEntry<int> jesterSampleMaxVal; [DataMember] public SyncedEntry<int> butlerHunterLevel; [DataMember] public SyncedEntry<int> butlerSampleMinVal; [DataMember] public SyncedEntry<int> butlerSampleMaxVal; [DataMember] public SyncedEntry<int> maskedHunterLevel; [DataMember] public SyncedEntry<int> maskedSampleMinVal; [DataMember] public SyncedEntry<int> maskedSampleMaxVal; [DataMember] public SyncedEntry<int> pufferHitPoints; [DataMember] public SyncedEntry<int> commonItemDropWeight; [DataMember] public SyncedEntry<int> commonItemMinVal; [DataMember] public SyncedEntry<int> commonItemMaxVal; [DataMember] public SyncedEntry<int> rareItemDropWeight; [DataMember] public SyncedEntry<int> rareItemMinVal; [DataMember] public SyncedEntry<int> rareItemMaxVal; [DataMember] public SyncedEntry<int> legendaryItemDropWeight; [DataMember] public SyncedEntry<int> legendaryItemMinVal; [DataMember] public SyncedEntry<int> legendaryItemMaxVal; public IXTweaksConfig(ConfigFile cfg) : base("IXtimes.IXTweaks") { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_003b: Expected O, but got Unknown //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0068: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown //IL_0098: Expected O, but got Unknown //IL_00a9: 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) //IL_00c4: Expected O, but got Unknown //IL_00c4: Expected O, but got Unknown //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00f1: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_0121: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_014d: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_0179: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01a6: Expected O, but got Unknown //IL_01b7: 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_01d6: Expected O, but got Unknown //IL_01d6: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Expected O, but got Unknown //IL_0202: Expected O, but got Unknown //IL_0213: 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_022e: Expected O, but got Unknown //IL_022e: Expected O, but got Unknown //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_025b: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Expected O, but got Unknown //IL_028b: Expected O, but got Unknown //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Expected O, but got Unknown //IL_02b7: Expected O, but got Unknown //IL_02c8: 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_02e4: Expected O, but got Unknown //IL_02e4: Expected O, but got Unknown //IL_02f5: 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_0311: Expected O, but got Unknown //IL_0311: Expected O, but got Unknown //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Expected O, but got Unknown //IL_033d: Expected O, but got Unknown //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Expected O, but got Unknown //IL_036a: Expected O, but got Unknown //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Expected O, but got Unknown //IL_039a: Expected O, but got Unknown //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Expected O, but got Unknown //IL_03c6: Expected O, but got Unknown //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Expected O, but got Unknown //IL_03f3: Expected O, but got Unknown //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Expected O, but got Unknown //IL_0420: Expected O, but got Unknown //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Expected O, but got Unknown //IL_044d: Expected O, but got Unknown //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Expected O, but got Unknown //IL_047a: Expected O, but got Unknown //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Expected O, but got Unknown //IL_04a7: Expected O, but got Unknown //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Expected O, but got Unknown //IL_04d4: Expected O, but got Unknown //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Expected O, but got Unknown //IL_0500: Expected O, but got Unknown //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Expected O, but got Unknown //IL_052d: Expected O, but got Unknown //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Expected O, but got Unknown //IL_055d: Expected O, but got Unknown ConfigManager.Register<IXTweaksConfig>(this); slimeHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Slime", "SlimeHunterLevel"), 3, new ConfigDescription("The minimum hunter level needed in LGU to have the slime (Hygrodere) drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); slimeSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Slime", "MinSlimeSampleValue"), 125, new ConfigDescription("The minimum value that the sample dropped from the slime (Hygrodere) is worth", (AcceptableValueBase)null, Array.Empty<object>())); slimeSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Slime", "MaxSlimeSampleValue"), 220, new ConfigDescription("The maximum value that the sample dropped from the slime (Hygrodere) is worth", (AcceptableValueBase)null, Array.Empty<object>())); nutcrackerHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Nutcracker", "NutcrackerHunterLevel"), 3, new ConfigDescription("The minimum hunter level needed in LGU to have the nutcracker drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); nutcrackerSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Nutcracker", "MinNutcrackerSampleValue"), 100, new ConfigDescription("The minimum value that the sample dropped from the nutcracker is worth", (AcceptableValueBase)null, Array.Empty<object>())); nutcrackerSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Nutcracker", "MaxNutcrackerSampleValue"), 150, new ConfigDescription("The maximum value that the sample dropped from the nutcracker is worth", (AcceptableValueBase)null, Array.Empty<object>())); springHitPoints = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Springhead", "SpringHitPoints"), 3, new ConfigDescription("The amount of hits needed to kill a springhead (total # of hits irrespective of damage)", (AcceptableValueBase)null, Array.Empty<object>())); springHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Springhead", "SpringHunterLevel"), 4, new ConfigDescription("The minimum hunter level needed in LGU to have the springhead drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); springSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Springhead", "MinSpringSampleValue"), 100, new ConfigDescription("The minimum value that the sample dropped from the springhead is worth", (AcceptableValueBase)null, Array.Empty<object>())); springSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Springhead", "MaxSpringSampleValue"), 150, new ConfigDescription("The maximum value that the sample dropped from the springhead is worth", (AcceptableValueBase)null, Array.Empty<object>())); jesterHitPoints = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Jester", "JesterHitPoints"), 5, new ConfigDescription("The amount of hits needed to kill a jester (total # of hits irrespective of damage)", (AcceptableValueBase)null, Array.Empty<object>())); jesterHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Jester", "JesterHunterLevel"), 4, new ConfigDescription("The minimum hunter level needed in LGU to have the jester drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); jesterSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Jester", "MinJesterSampleValue"), 125, new ConfigDescription("The minimum value that the sample dropped from the jester is worth", (AcceptableValueBase)null, Array.Empty<object>())); jesterSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Jester", "MaxJesterSampleValue"), 300, new ConfigDescription("The maximum value that the sample dropped from the jester is worth", (AcceptableValueBase)null, Array.Empty<object>())); maskedHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Masked", "MaskedHunterLevel"), 2, new ConfigDescription("The minimum hunter level needed in LGU to have the masked drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); maskedSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Masked", "MinMaskedSampleValue"), 60, new ConfigDescription("The minimum value that the sample dropped from the masked is worth", (AcceptableValueBase)null, Array.Empty<object>())); maskedSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Masked", "MaxMaskedSampleValue"), 100, new ConfigDescription("The maximum value that the sample dropped from the masked is worth", (AcceptableValueBase)null, Array.Empty<object>())); butlerHunterLevel = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Butler", "ButlerHunterLevel"), 3, new ConfigDescription("The minimum hunter level needed in LGU to have the butler drop its sample", (AcceptableValueBase)null, Array.Empty<object>())); butlerSampleMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Butler", "MinButlerSampleValue"), 100, new ConfigDescription("The minimum value that the sample dropped from the butler is worth", (AcceptableValueBase)null, Array.Empty<object>())); butlerSampleMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Butler", "MaxButlerSampleValue"), 150, new ConfigDescription("The maximum value that the sample dropped from the butler is worth", (AcceptableValueBase)null, Array.Empty<object>())); pufferHitPoints = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("Hunter: Spore Lizard", "PufferHitPoints"), 4, new ConfigDescription("The amount of damage needed to kill a spore lizard", (AcceptableValueBase)null, Array.Empty<object>())); commonItemDropWeight = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "CommonDropWeight"), 30, new ConfigDescription("The drop weight assigned to custom common items to be placed in the facility", (AcceptableValueBase)null, Array.Empty<object>())); commonItemMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MinCommonValue"), 30, new ConfigDescription("The minimum value that is assigned to common items", (AcceptableValueBase)null, Array.Empty<object>())); commonItemMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MaxCommonValue"), 60, new ConfigDescription("The maximum value that is assigned to common items", (AcceptableValueBase)null, Array.Empty<object>())); rareItemDropWeight = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "RareDropWeight"), 10, new ConfigDescription("The drop weight assigned to custom rare items to be placed in the facility", (AcceptableValueBase)null, Array.Empty<object>())); rareItemMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MinRareValue"), 60, new ConfigDescription("The minimum value that is assigned to rare items", (AcceptableValueBase)null, Array.Empty<object>())); rareItemMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MaxRareValue"), 120, new ConfigDescription("The maximum value that is assigned to rare items", (AcceptableValueBase)null, Array.Empty<object>())); legendaryItemDropWeight = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "LegendaryDropWeight"), 5, new ConfigDescription("The drop weight assigned to custom legendary items to be placed in the facility", (AcceptableValueBase)null, Array.Empty<object>())); legendaryItemMinVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MinLegendaryValue"), 120, new ConfigDescription("The minimum value that is assigned to legendary items", (AcceptableValueBase)null, Array.Empty<object>())); legendaryItemMaxVal = Extensions.BindSyncedEntry<int>(cfg, new ConfigDefinition("TBS Drops", "MaxLegendaryValue"), 240, new ConfigDescription("The maximum value that is assigned to legendary items", (AcceptableValueBase)null, Array.Empty<object>())); } } [BepInPlugin("IXtimes.IXTweaks", "IXTweaks", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [LobbyCompatibility(/*Could not decode attribute arguments.*/)] public class IXTweaks : BaseUnityPlugin { [CompilerGenerated] private static class <>O { public static hook_HitEnemy <0>__DropSampleOnHappy; public static Manipulator <1>__PissedPatch; public static hook_OnCollideWithPlayer <2>__PissedOffInstaKill; public static hook_Update <3>__SlimeGas; public static hook_Start <4>__BrackenAudioPatch; public static hook_Start <5>__HorderBugAudioPatch; public static hook_HitEnemy <6>__DamageWrapperIfApplicable; public static hook_Start <7>__ApplyWrapperOnAwake; } internal static IXTweaksConfig? Config; public static AssetBundle IXTweaksAssets; public static IXTweaks Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; Config = new IXTweaksConfig(((BaseUnityPlugin)this).Config); string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); IXTweaksAssets = AssetBundle.LoadFromFile(Path.Combine(directoryName, "ixtweaks")); if ((Object)(object)IXTweaksAssets == (Object)null) { Logger.LogError((object)"Failed to load custom assets."); return; } RegisterRPCs(); RegisterItem("Celsius.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); RegisterItem("RoastedNutCoffee.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); RegisterItem("MagicMushrooms.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); RegisterItem("Loaf.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); RegisterItem("NyQuil.asset", SyncedEntry<int>.op_Implicit(Config.rareItemDropWeight), SyncedEntry<int>.op_Implicit(Config.rareItemMinVal), SyncedEntry<int>.op_Implicit(Config.rareItemMaxVal)); RegisterItem("VampireTeeth.asset", SyncedEntry<int>.op_Implicit(Config.rareItemDropWeight), SyncedEntry<int>.op_Implicit(Config.rareItemMinVal), SyncedEntry<int>.op_Implicit(Config.rareItemMaxVal)); RegisterItem("AirForceOnes.asset", SyncedEntry<int>.op_Implicit(Config.rareItemDropWeight), SyncedEntry<int>.op_Implicit(Config.rareItemMinVal), SyncedEntry<int>.op_Implicit(Config.rareItemMaxVal)); RegisterItem("7LeafClover.asset", SyncedEntry<int>.op_Implicit(Config.legendaryItemDropWeight), SyncedEntry<int>.op_Implicit(Config.legendaryItemMinVal), SyncedEntry<int>.op_Implicit(Config.legendaryItemMaxVal)); RegisterHunterDrop("HygrodereChunk.asset", "Blob", SyncedEntry<int>.op_Implicit(Config.slimeSampleMinVal), SyncedEntry<int>.op_Implicit(Config.slimeSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.slimeHunterLevel)); RegisterHunterDrop("NutcrackerHead.asset", "Nutcracker", SyncedEntry<int>.op_Implicit(Config.nutcrackerSampleMinVal), SyncedEntry<int>.op_Implicit(Config.nutcrackerSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.nutcrackerHunterLevel)); RegisterHunterDrop("CoilHead.asset", "Spring", SyncedEntry<int>.op_Implicit(Config.springSampleMinVal), SyncedEntry<int>.op_Implicit(Config.springSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.springHunterLevel)); RegisterHunterDrop("JesterBox.asset", "Jester", SyncedEntry<int>.op_Implicit(Config.jesterSampleMinVal), SyncedEntry<int>.op_Implicit(Config.jesterSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.jesterHunterLevel)); RegisterHunterDrop("EuropeanBlood.asset", "Butler", SyncedEntry<int>.op_Implicit(Config.butlerSampleMinVal), SyncedEntry<int>.op_Implicit(Config.butlerSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.butlerHunterLevel)); RegisterHunterDrop("BrokenMask.asset", "Masked", SyncedEntry<int>.op_Implicit(Config.maskedSampleMinVal), SyncedEntry<int>.op_Implicit(Config.maskedSampleMaxVal), SyncedEntry<int>.op_Implicit(Config.maskedHunterLevel)); RegisterSpecialItems(); Patch(); Logger.LogInfo((object)"IXtimes.IXTweaks v1.0.0 has loaded!"); } internal static void Patch() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_00a5: 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_00b0: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //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) //IL_0133: Expected O, but got Unknown Logger.LogDebug((object)"Patching..."); object obj = <>O.<0>__DropSampleOnHappy; if (obj == null) { hook_HitEnemy val = DropSampleOnHappy; <>O.<0>__DropSampleOnHappy = val; obj = (object)val; } BlobAI.HitEnemy += (hook_HitEnemy)obj; object obj2 = <>O.<1>__PissedPatch; if (obj2 == null) { Manipulator val2 = PissedPatch; <>O.<1>__PissedPatch = val2; obj2 = (object)val2; } BlobAI.HitEnemy += (Manipulator)obj2; object obj3 = <>O.<2>__PissedOffInstaKill; if (obj3 == null) { hook_OnCollideWithPlayer val3 = PissedOffInstaKill; <>O.<2>__PissedOffInstaKill = val3; obj3 = (object)val3; } BlobAI.OnCollideWithPlayer += (hook_OnCollideWithPlayer)obj3; object obj4 = <>O.<3>__SlimeGas; if (obj4 == null) { hook_Update val4 = SlimeGas; <>O.<3>__SlimeGas = val4; obj4 = (object)val4; } BlobAI.Update += (hook_Update)obj4; object obj5 = <>O.<4>__BrackenAudioPatch; if (obj5 == null) { hook_Start val5 = BrackenAudioPatch; <>O.<4>__BrackenAudioPatch = val5; obj5 = (object)val5; } FlowermanAI.Start += (hook_Start)obj5; object obj6 = <>O.<5>__HorderBugAudioPatch; if (obj6 == null) { hook_Start val6 = HorderBugAudioPatch; <>O.<5>__HorderBugAudioPatch = val6; obj6 = (object)val6; } HoarderBugAI.Start += (hook_Start)obj6; Logger.LogDebug((object)"Attempting Damage Wrapper"); object obj7 = <>O.<6>__DamageWrapperIfApplicable; if (obj7 == null) { hook_HitEnemy val7 = DamageWrapperIfApplicable; <>O.<6>__DamageWrapperIfApplicable = val7; obj7 = (object)val7; } EnemyAI.HitEnemy += (hook_HitEnemy)obj7; Logger.LogDebug((object)"Attempting Awake Wrapper"); object obj8 = <>O.<7>__ApplyWrapperOnAwake; if (obj8 == null) { hook_Start val8 = ApplyWrapperOnAwake; <>O.<7>__ApplyWrapperOnAwake = val8; obj8 = (object)val8; } EnemyAI.Start += (hook_Start)obj8; Logger.LogDebug((object)"Finished patching!"); } private static void HorderBugAudioPatch(orig_Start orig, HoarderBugAI self) { orig.Invoke(self); string text = "Assets/IXtweaks/Assets/SFXs/"; AudioClip[] array = (AudioClip[])(object)new AudioClip[18]; for (int i = 0; i < 18; i++) { array[i] = IXTweaksAssets.LoadAsset<AudioClip>(text + (i + 1) + ".wav"); Debug.Log((object)(text + (i + 1) + ".wav")); } self.chitterSFX = array; } private static void BrackenAudioPatch(orig_Start orig, FlowermanAI self) { orig.Invoke(self); string text = "Assets/IXtweaks/Assets/SFXs/"; AudioClip clip = IXTweaksAssets.LoadAsset<AudioClip>(text + "12Brack.wav"); AudioClip val = IXTweaksAssets.LoadAsset<AudioClip>(text + "CrackNeck.wav"); self.creatureAngerVoice.clip = clip; self.crackNeckSFX = val; self.crackNeckAudio.clip = val; } private static void ApplyWrapperOnAwake(orig_Start orig, EnemyAI self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<SpringManAI>())) { ((Component)self).gameObject.AddComponent<InvinsibleEnemyWrapper>().internalHealth = SyncedEntry<int>.op_Implicit(Config.springHitPoints); } if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<JesterAI>())) { ((Component)self).gameObject.AddComponent<InvinsibleEnemyWrapper>().internalHealth = SyncedEntry<int>.op_Implicit(Config.jesterHitPoints); } if (Object.op_Implicit((Object)(object)((Component)self).GetComponent<PufferAI>())) { ((Component)self).gameObject.AddComponent<InvinsibleEnemyWrapper>().internalHealth = SyncedEntry<int>.op_Implicit(Config.pufferHitPoints); } } private static void DamageWrapperIfApplicable(orig_HitEnemy orig, EnemyAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID) { orig.Invoke(self, force, playerWhoHit, playHitSFX, hitID); if ((Object)(object)((Component)self).GetComponent<InvinsibleEnemyWrapper>() != (Object)null) { if ((Object)(object)((Component)self).GetComponent<SpringManAI>() != (Object)null || (Object)(object)((Component)self).GetComponent<JesterAI>() != (Object)null) { ((Component)self).GetComponent<InvinsibleEnemyWrapper>().DamageWrapper(force, strong: true, playerWhoHit); } else { ((Component)self).GetComponent<InvinsibleEnemyWrapper>().DamageWrapper(force, strong: false, playerWhoHit); } } } private static void PissedPatch(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)2, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 18f), (Instruction x) => ILPatternMatchingExt.MatchStfld<BlobAI>(x, "angeredTimer") }); val.Index -= 2; for (int i = 0; i < 3; i++) { val.Remove(); } val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Action<BlobAI>>((Action<BlobAI>)delegate(BlobAI self) { if (self.angeredTimer < 1000f) { self.angeredTimer = 18f; } }); } private static void SlimeGas(orig_Update orig, BlobAI self) { orig.Invoke(self); if (self.angeredTimer > 1000f) { ((EnemyAI)self).agent.speed = 3f; } } private static void PissedOffInstaKill(orig_OnCollideWithPlayer orig, BlobAI self, Collider other) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = ((EnemyAI)self).MeetsStandardPlayerCollisionConditions(other, false, false); if (self.angeredTimer > 1000f && (Object)(object)val != (Object)null) { val.DamagePlayer(1000, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (val.isPlayerDead) { self.SlimeKillPlayerEffectServerRpc((int)val.playerClientId); } } orig.Invoke(self, other); } private static void DropSampleOnHappy(orig_HitEnemy orig, BlobAI self, int force, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID) { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, force, playerWhoHit, playHitSFX, hitID); Logger.LogDebug((object)"Hit Slime"); Logger.LogDebug((object)(self.angeredTimer - 19f)); if (self.tamedTimer > 0f && self.angeredTimer - 19f <= 0f) { Logger.LogInfo((object)"Slime was habby, make him angy >:("); self.angeredTimer = float.PositiveInfinity; self.tamedTimer = 0f; self.thisSlimeMaterial.SetColor(Shader.PropertyToID("_Gradient_Color"), Color.red); self.thisSlimeMaterial.SetFloat("_Frequency", 8f); self.thisSlimeMaterial.SetFloat("_Ripple_Density", self.slimeJiggleDensity * 3f); self.thisSlimeMaterial.SetFloat("_Amplitude", self.slimeJiggleAmplitude * 3f); GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); AudioSource component = ((Component)self).GetComponent<AudioSource>(); AudioClip val = IXTweaksAssets.LoadAsset<AudioClip>("Assets/IXTweaks/Assets/SFXs/AngrySlimeGurgle.wav"); component.PlayOneShot(val); WalkieTalkie.TransmitOneShotAudio(component, val, 100f); RoundManager.Instance.PlayAudibleNoise(((Component)self).transform.position, 10f, 100f, 0, StartOfRound.Instance.hangarDoorsClosed, 0); if (BaseUpgrade.GetActiveUpgrade("Hunter") && Hunter.CanHarvest("blob")) { Logger.LogInfo((object)"Slime drop loot for hunter"); ItemManager.Instance.SpawnSample("blob", ((Component)self).transform.position); } } } private void RegisterSpecialItems() { Item val = RegisterItem("Windex.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); Utilities.FixMixerGroups(val.spawnPrefab); FakeSprayItem fakeSprayItem = val.spawnPrefab.AddComponent<FakeSprayItem>(); ((GrabbableObject)fakeSprayItem).grabbable = true; ((GrabbableObject)fakeSprayItem).grabbableToEnemies = true; ((GrabbableObject)fakeSprayItem).itemProperties = val; fakeSprayItem.fullSprayEffect = ((Component)fakeSprayItem).transform.GetChild(2); fakeSprayItem.emptySprayEffect = ((Component)((Component)fakeSprayItem).transform.GetChild(2).GetChild(1)).GetComponent<ParticleSystem>(); fakeSprayItem.spraySFXr = ((Component)fakeSprayItem).GetComponent<AudioSource>(); Logger.LogDebug((object)string.Join(", ", IXTweaksAssets.GetAllAssetNames())); fakeSprayItem.spraySFX = IXTweaksAssets.LoadAsset<AudioClip>("Assets/IXTweaks/Assets/SFXs/WeedKillerSpray.mp3"); fakeSprayItem.emptySFX = IXTweaksAssets.LoadAsset<AudioClip>("Assets/IXTweaks/Assets/SFXs/WeedKillerEmpty.mp3"); Item val2 = RegisterItem("JeremiahTheSlug.asset", SyncedEntry<int>.op_Implicit(Config.commonItemDropWeight), SyncedEntry<int>.op_Implicit(Config.commonItemMinVal), SyncedEntry<int>.op_Implicit(Config.commonItemMaxVal)); Utilities.FixMixerGroups(val2.spawnPrefab); Healer healer = val2.spawnPrefab.AddComponent<Healer>(); ((GrabbableObject)healer).grabbable = true; ((GrabbableObject)healer).grabbableToEnemies = true; ((GrabbableObject)healer).itemProperties = val2; Item val3 = RegisterItem("PaperAirplane.asset", SyncedEntry<int>.op_Implicit(Config.rareItemDropWeight), SyncedEntry<int>.op_Implicit(Config.rareItemMinVal), SyncedEntry<int>.op_Implicit(Config.rareItemMaxVal)); ThrowableItem throwableItem = val3.spawnPrefab.AddComponent<ThrowableItem>(); ((GrabbableObject)throwableItem).grabbable = true; ((GrabbableObject)throwableItem).grabbableToEnemies = true; ((GrabbableObject)throwableItem).itemProperties = val3; } private Item RegisterHunterDrop(string itemName, string monsterName, int min, int max, int level, string pathToItem = "Assets/IXTweaks/Samples/") { Item val = IXTweaksAssets.LoadAsset<Item>(pathToItem + itemName); val.minValue = min; val.maxValue = max; if ((Object)(object)val == (Object)null) { Logger.LogError((object)("Failed to load " + itemName + " from IXTweaksAssets")); return null; } HunterSamples.RegisterSample(val, monsterName, level, true, true, 100.0); Utilities.FixMixerGroups(val.spawnPrefab); return val; } private Item RegisterItem(string itemName, int weight, int min, int max, string pathToItem = "Assets/IXTweaks/Scraps/") { Item val = IXTweaksAssets.LoadAsset<Item>(pathToItem + itemName); val.minValue = min; val.maxValue = max; if ((Object)(object)val == (Object)null) { Logger.LogError((object)("Failed to load " + itemName + " from IXTweaksAssets")); return null; } Items.RegisterScrap(val, weight, (LevelTypes)(-1)); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Utilities.FixMixerGroups(val.spawnPrefab); return val; } private void RegisterRPCs() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "IXtimes.IXTweaks"; public const string PLUGIN_NAME = "IXTweaks"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace IXTweaks.MonoBehaviors { public class FakeSprayItem : GrabbableObject { private float remainingSpray = 100f; private float internalTimer = 0f; public Transform fullSprayEffect; public ParticleSystem emptySprayEffect; public AudioSource spraySFXr; public AudioClip spraySFX; public AudioClip emptySFX; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && ((NetworkBehaviour)this).IsOwner && internalTimer <= 0f) { if (remainingSpray > 0f) { PlayEffectServerRpc(notEmpty: true); remainingSpray -= 5f; } else { PlayEffectServerRpc(notEmpty: false); } internalTimer += 1f; } } [ServerRpc] public void PlayEffectServerRpc(bool notEmpty) { PlayEffectClientRpc(notEmpty); } [ClientRpc] public void PlayEffectClientRpc(bool notEmpty) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) if (notEmpty) { foreach (Transform item in fullSprayEffect) { Transform val = item; ((Component)val).GetComponent<ParticleSystem>().Play(); } spraySFXr.PlayOneShot(spraySFX); WalkieTalkie.TransmitOneShotAudio(spraySFXr, spraySFX, 100f); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 10f, 100f, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); } else { emptySprayEffect.Play(); spraySFXr.PlayOneShot(emptySFX); } } [ServerRpc] public void StopEffectServerRpc() { StopEffectClientRpc(); } [ClientRpc] public void StopEffectClientRpc() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown foreach (Transform item in fullSprayEffect) { Transform val = item; ((Component)val).GetComponent<ParticleSystem>().Stop(); } spraySFXr.Stop(); } public override void Update() { ((GrabbableObject)this).Update(); if (internalTimer > 0f) { internalTimer -= Time.deltaTime; } } } public class Healer : GrabbableObject { private float healingRate = 5f; private int healingAmount = 1; private float internalTimer = 0f; public override void Update() { ((GrabbableObject)this).Update(); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (internalTimer > 0f) { internalTimer -= Time.deltaTime; } if (!((Object)(object)localPlayerController == (Object)null) && internalTimer <= 0f && base.isHeld) { if (((NetworkBehaviour)localPlayerController).IsServer) { localPlayerController.HealClientRpc(); } else { localPlayerController.HealServerRpc(); } internalTimer += healingRate; } } } public class InvinsibleEnemyWrapper : MonoBehaviour { public int internalHealth; public void DamageWrapper(int damage, bool strong, PlayerControllerB source = null) { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) internalHealth -= (strong ? 1 : damage); Debug.Log((object)(((Object)((Component)this).gameObject).name + " HP: " + internalHealth)); if (internalHealth <= 0) { ClaySurgeonAI component = ((Component)this).GetComponent<ClaySurgeonAI>(); ((Component)this).GetComponent<EnemyAI>().KillEnemy(true); return; } if ((Object)(object)((Component)this).GetComponent<SpringManAI>() != (Object)null) { SpringManAI component2 = ((Component)this).GetComponent<SpringManAI>(); if (component2.setOnCooldown) { component2.SetCoilheadOnCooldownServerRpc(false); } else { source.DamagePlayer(1000, true, true, (CauseOfDeath)6, 2, false, default(Vector3)); } } if ((Object)(object)((Component)this).GetComponent<JesterAI>() != (Object)null) { JesterAI component3 = ((Component)this).GetComponent<JesterAI>(); if (((EnemyAI)component3).currentBehaviourStateIndex == 0 || ((EnemyAI)component3).currentBehaviourStateIndex == 1) { ((EnemyAI)component3).creatureAnimator.SetBool("turningCrank", true); ((EnemyAI)component3).currentBehaviourStateIndex = 1; component3.popUpTimer = Time.deltaTime * 3f; } } if (!((Object)(object)((Component)this).GetComponent<ClaySurgeonAI>() != (Object)null)) { } } } public class Scissors : GrabbableObject { private float internalTimer = 0f; public AudioSource sfx; public Animator anim; public AudioClip snipSFX; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); Debug.Log((object)"Successful reg item action"); Debug.Log((object)sfx); Debug.Log((object)anim); if (((NetworkBehaviour)this).IsOwner && internalTimer <= 0f) { Debug.Log((object)"Pre snip"); Snip(); Debug.Log((object)"Post snip"); if (((NetworkBehaviour)this).IsHost) { PlayClientEffectRpc(); } else { PlayServerEffectRpc(); } Debug.Log((object)"Post effect"); internalTimer += 3f; } } public void Snip() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.playerHeldBy == (Object)null) { return; } RaycastHit[] source = Physics.SphereCastAll(((Component)base.playerHeldBy.gameplayCamera).transform.position + ((Component)base.playerHeldBy.gameplayCamera).transform.right * -0.25f, 0.6f, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, 1.5f, 1084754248); RaycastHit[] source2 = Physics.SphereCastAll(((Component)base.playerHeldBy.gameplayCamera).transform.position + ((Component)base.playerHeldBy.gameplayCamera).transform.right * -0.25f, 0.6f, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, 1.5f, 1084754248); List<RaycastHit> list = source.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList(); List<EnemyAI> list2 = new List<EnemyAI>(); Debug.Log((object)string.Join(", ", list.Select((RaycastHit hit) => ((Object)((Component)((RaycastHit)(ref hit)).transform).gameObject).name).ToList())); Debug.Log((object)string.Join(", ", source2.Select((RaycastHit hit) => ((Object)((Component)((RaycastHit)(ref hit)).transform).gameObject).name).ToList())); IHittable val2 = default(IHittable); for (int i = 0; i < list.Count; i++) { RaycastHit val = list[i]; ((Component)((RaycastHit)(ref val)).transform).TryGetComponent<IHittable>(ref val2); EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<EnemyAICollisionDetect>(); if ((Object)(object)component != (Object)null) { val2.Hit(10, ((RaycastHit)(ref val)).transform.forward, base.playerHeldBy, true, 1); } PlayerControllerB component2 = ((Component)((RaycastHit)(ref val)).transform).GetComponent<PlayerControllerB>(); Debug.Log((object)(((Object)((Component)component2).gameObject).name + " =? " + ((Object)((Component)base.playerHeldBy).gameObject).name)); if ((Object)(object)component2 != (Object)null && (Object)(object)component2 != (Object)(object)base.playerHeldBy) { Debug.Log((object)"Kill other player"); component2.DamagePlayer(1000, true, true, (CauseOfDeath)17, 7, false, Vector3.up * 14f); } } } [ServerRpc] public void PlayServerEffectRpc() { PlayClientEffectRpc(); } [ClientRpc] public void PlayClientEffectRpc() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) anim.Play("Base Layer.Snip"); anim.SetTrigger("Snip"); sfx.PlayOneShot(snipSFX); WalkieTalkie.TransmitOneShotAudio(sfx, snipSFX, 100f); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 10f, 100f, 0, base.isInElevator && StartOfRound.Instance.hangarDoorsClosed, 0); } public override void Update() { ((GrabbableObject)this).Update(); if (internalTimer > 0f) { internalTimer -= Time.deltaTime; } } } public class ThrowableItem : GrabbableObject { public AnimationCurve itemFallCurve; public AnimationCurve itemVerticalFallCurve; public AnimationCurve itemVerticalFallCurveNoBounce; public RaycastHit itemHit; public Ray itemThrowRay; public override void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown ((GrabbableObject)this).Start(); itemFallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f), new Keyframe(0.9f, 0.95f), new Keyframe(1f, 1f) }); itemVerticalFallCurve = itemFallCurve; itemVerticalFallCurveNoBounce = itemFallCurve; } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner) { base.playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetItemThrowDestination(), true); } } public override void EquipItem() { ((GrabbableObject)this).EnableItemMeshes(true); base.playerHeldBy.equippedUsableItemQE = true; base.isPocketed = false; } public override void FallWithCurve() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = base.startFallingPosition - base.targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(base.startFallingPosition, base.targetFloorPosition, itemFallCurve.Evaluate(base.fallTime)); if (magnitude > 5f) { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, base.startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, base.targetFloorPosition.y, ((Component)this).transform.localPosition.z), itemVerticalFallCurveNoBounce.Evaluate(base.fallTime)); } else { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, base.startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, base.targetFloorPosition.y, ((Component)this).transform.localPosition.z), itemVerticalFallCurve.Evaluate(base.fallTime)); } base.fallTime += Mathf.Abs(Time.deltaTime * 12f / magnitude); } public override void Update() { ((GrabbableObject)this).Update(); } public Vector3 GetItemThrowDestination() { //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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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) Vector3 position = ((Component)this).transform.position; Debug.DrawRay(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, Color.yellow, 15f); itemThrowRay = new Ray(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward); position = ((!Physics.Raycast(itemThrowRay, ref itemHit, 12f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref itemThrowRay)).GetPoint(10f) : ((Ray)(ref itemThrowRay)).GetPoint(((RaycastHit)(ref itemHit)).distance - 0.05f)); Debug.DrawRay(position, Vector3.down, Color.blue, 15f); itemThrowRay = new Ray(position, Vector3.down); if (Physics.Raycast(itemThrowRay, ref itemHit, 30f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref itemHit)).point + Vector3.up * 0.05f; } return ((Ray)(ref itemThrowRay)).GetPoint(30f); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }