Decompiled source of Celestial War Tank v1.3.1
TanksMod.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.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando.CommandoWeapon; using EntityStates.SurvivorPod; using EntityStates.Toolbot; using EntityStates.Treebot.Weapon; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using MaterialHud; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.HudOverlay; using RoR2.Items; using RoR2.Networking; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.SurvivorMannequins; using RoR2.UI; using TMPro; using TanksMod.Content; using TanksMod.Content.Achievements; using TanksMod.Content.ItemTiers; using TanksMod.Content.Items.Body; using TanksMod.Content.Items.Turret; using TanksMod.Modules; using TanksMod.Modules.Characters; using TanksMod.Modules.Components; using TanksMod.Modules.Components.BasicTank; using TanksMod.Modules.Components.FX; using TanksMod.Modules.Components.FX.Particles; using TanksMod.Modules.Components.Projectile; using TanksMod.Modules.Components.UI; using TanksMod.Modules.ItemTiers; using TanksMod.Modules.Items; using TanksMod.Modules.Networking; using TanksMod.Modules.Networking.Skills; using TanksMod.Modules.Pods.ShippingContainerPod; using TanksMod.Modules.Survivors; using TanksMod.SkillStates; using TanksMod.SkillStates.BasicTank.DashRam; using TanksMod.SkillStates.BasicTank.Utility; using TanksMod.SkillStates.BasicTank._BASE.Cannon; using TanksMod.SkillStates.BasicTank._PRIMARY; using TanksMod.SkillStates.BasicTank._PRIMARY.Shotgun; using TanksMod.SkillStates.BasicTank._SECONDARY; using TanksMod.SkillStates.BasicTank._SECONDARY.ArtilleryCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.CelestialCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.HowitzerCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.Minigun; using TanksMod.SkillStates.BasicTank._SECONDARY.ObliteratorCannon; using TanksMod.SkillStates.BasicTank._SECONDARY.PiercingCannon; using TanksMod.SkillStates.BasicTank._SPECIAL; using TanksMod.SkillStates.BasicTank._SPECIAL.MissleLauncher; using TanksMod.SkillStates.BasicTank._UTILITY.RipDozer; using TanksMod.SkillStates.Landmine; using TanksMod.SkillStates.MiniLandmine; using TanksMod.SkillStates.Projectile; using TanksMod.SkillStates.Projectile.AAProjectile; using TanksMod.SkillStates.Projectile.FlamethrowerPelletProjectile; using TanksMod.States; using TanksMod.States.Tank; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.HowitzerCannon; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Minigun; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.ObliteratorCannon; using TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile; using Unity.Collections; using Unity.Jobs; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.Serialization; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CheeseWithHoles")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TanksMod")] [assembly: AssemblyTitle("TanksMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] namespace TanksMod { internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.cheesewithholes.TanksMod", "TanksMod", "1.2.3")] [R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "UnlockableAPI", "NetworkingAPI" })] public class TanksPlugin : BaseUnityPlugin { public const string MODUID = "com.cheesewithholes.TanksMod"; public const string MODNAME = "TanksMod"; public const string MODVERSION = "1.2.3"; public const string DEVELOPER_PREFIX = "CHEESEWITHHOLES"; public static TanksPlugin instance; public static bool is_RiskOfOptions_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool is_RiskUI_Mod_Installed => Chainloader.PluginInfos.ContainsKey("bubbet.riskui"); public static bool is_BetterHudLite_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.TheTimeSweeper.BetterHudLite"); public static bool is_CleanerHud_Mod_Installed => Chainloader.PluginInfos.ContainsKey("AAAHIFU.CleanerHud"); public static bool is_StandaloneAncientScepter_Mod_Installed => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static event Action PlayerPrefab; private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); TanksMod.Modules.Assets.Initialize(); Config.myConfig = ((BaseUnityPlugin)this).Config; Config.ReadConfig(); TanksMod.Modules.States.RegisterStates(); Buffs.RegisterBuffs(); TanksMod.Modules.Projectiles.RegisterProjectiles(); TanksMod.Modules.Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); Unlockables.RegisterUnlockables(); Characteristics.Init(); Colors.Init(); RegisterItemTiers(); RegisterItems(); ItemCatalog.Init(); RegisterMessages(); new BasicTank().Initialize(); new ContentPacks().Initialize(); PlayerPrefab += AddComponentToPlayerPrefab; RegisterDependencies(); } private void RegisterDependencies() { if (is_StandaloneAncientScepter_Mod_Installed) { Log.Warning("StandaloneAncientScepter is installed. Adding content."); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Assets.PopulateAssets(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.RegisterProjectiles(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Skills.RegisterSkills(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Tokens.AddTokens(); TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.States.RegisterStates(); } } private void RegisterMessages() { NetworkingAPI.RegisterMessageType<SendInputToBankRequest>(); NetworkingAPI.RegisterMessageType<Fuel>(); NetworkingAPI.RegisterMessageType<Velocity>(); NetworkingAPI.RegisterMessageType<SendStuntStateNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformCrashEffectsNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformRotateRootNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformRotateGroundRotationNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformSetGroundRotationNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformSoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<PerformThrusterLoopSoundNetworkRequest>(); NetworkingAPI.RegisterMessageType<SendThrusterEffectsNetworkRequest>(); NetworkingAPI.RegisterMessageType<Minigun>(); NetworkingAPI.RegisterMessageType<Shotgun>(); NetworkingAPI.RegisterMessageType<PerformRamForceNetworkRequest>(); } [SystemInitializer(new Type[] { typeof(ItemTierCatalog), typeof(ItemTierBase) })] private void RegisterItemTiers() { IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemTierBase)) select type; foreach (Type item in enumerable) { ItemTierBase itemTierBase = (ItemTierBase)Activator.CreateInstance(item); itemTierBase.Init(); Log.Info("Item Tier: " + itemTierBase.tierName + " is added."); } } private void RegisterItems() { IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type; foreach (Type item in enumerable) { ItemBase itemBase = (ItemBase)Activator.CreateInstance(item); itemBase.Init(); Log.Info("Item: " + itemBase.itemName + " is added."); } } private void Update() { TanksPlugin.PlayerPrefab?.Invoke(); } private void AddComponentToPlayerPrefab() { NetworkManagerConfiguration val = Object.FindObjectOfType<NetworkManagerConfiguration>(); if (Object.op_Implicit((Object)(object)val)) { GameObject playerPrefab = val.PlayerPrefab; Log.Warning("Found Player. Adding CheesePlayerHandler component."); playerPrefab.AddComponent<CheesePlayerHandler>(); PlayerPrefab -= AddComponentToPlayerPrefab; } else { Log.Warning("Finding Network Manager Configuration."); } } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates { internal class Upgraded_AACannon : AACannon { public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.gaCannonProjectilePrefab; damageCoefficient = 4.5f; minSpread = 0f; maxSpread = 0.2f; baseDuration = 0.2f; base.OnEnter(); } } internal class Upgraded_ArtillaryCannon : ShootArtilleryCannon { private int bulletCount = 10; public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.rainCannonProjectilePrefab; damageCoefficient = 55f; numberOfBullets = bulletCount; minSpread = 0.5f; maxSpread = 9f; bloom = 5f; base.OnEnter(); } } internal class Upgraded_BasicCannon : BasicCannon { public override void OnEnter() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.fracturedCannonProjectilePrefab; damageCoefficient = 50f; damageType = (DamageType)17536; recoilAmplitude = 3f; targetMuzzle = "MausGunMuzzle"; sound = "Play_BasicCannon"; characterKnockbackForce = 9f; bodyKnockbackForce = 1000f; base.OnEnter(); } } internal class Upgraded_CritCannon : CritCannon { public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.doctorsCannonProjectilePrefab; damageCoefficient = 19.8f; spreadBloom = 0.5f; minSpread = 0f; maxSpread = 1f; knockbackForce = 10f; bodyKnockbackForce = 2000f; base.OnEnter(); } } internal class Upgraded_FrenchGun : FrenchGun { public override void OnEnter() { numberOfBullets = 5; minSpread = 0.5f; maxSpread = 10f; base.OnEnter(); } } internal class Upgraded_KnockerCannon : KnockerCannon { public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.boxersCannonProjectilePrefab; damageCoefficient = 28.875f; spreadBloom = 0.5f; minSpread = 0f; maxSpread = 1f; bodyKnockbackForce = 700f; force = 8000f; base.OnEnter(); } } internal class Upgraded_PiercingCannon : ShootPiercingCannon { public GameObject laserPrefab = TanksMod.Modules.Assets.laserEffect; public LineRenderer laserLine; public override void OnEnter() { base.OnEnter(); } public override void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= delayBeforeFiringProjectile && !firedProjectile) { firedProjectile = true; FireLaser(); } if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)laserLine)) { Object.Destroy((Object)(object)((Component)laserLine).gameObject, 2f); } } private void FireLaser() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_0074: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0123: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016c: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0184: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: 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_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: 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_01f3: 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_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_0247: 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_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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) Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * recoilAmplitude, -2f * recoilAmplitude, -0.5f * recoilAmplitude, 0.5f * recoilAmplitude); Util.PlaySound("Play_Scepter_PiercingCannon", ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(TanksMod.Modules.Assets.tSixtyTwoCannonFireEffect, ((EntityState)this).gameObject, targetMuzzle, true); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = 40f * ((EntityState)this).characterBody.damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)144), falloffModel = (FalloffModel)1, maxDistance = 1000f, force = force, hitMask = CommonMasks.bullet, minSpread = minSpread, maxSpread = maxSpread, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = targetMuzzle, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 1.5f, radius = 0.75f, sniper = true, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 0.25f, spreadYawScale = 0.25f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = TanksMod.Modules.Assets.cannonImpactExplosion }.Fire(); Color val = (Color.yellow + Color.red) / 2f; laserLine = Object.Instantiate<GameObject>(laserPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation).GetComponent<LineRenderer>(); laserLine.startColor = val; laserLine.endColor = val; LineRenderer_ShrinkOverTime lineRenderer_ShrinkOverTime = ((Component)laserLine).gameObject.AddComponent<LineRenderer_ShrinkOverTime>(); lineRenderer_ShrinkOverTime.rate = 2f; lineRenderer_ShrinkOverTime.SetScale(0.5f); Vector3 position = ((Component)((BaseState)this).FindModelChild(targetMuzzle)).transform.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(1000f); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(position, ((Ray)(ref aimRay)).direction, ref val2) && (Object)(object)((RaycastHit)(ref val2)).transform != (Object)(object)((EntityState)this).transform) { point = ((RaycastHit)(ref val2)).point; } laserLine.SetPosition(0, position); laserLine.SetPosition(1, point); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref aimRay)).direction * 3f; Rigidbody component = ((Component)((BaseState)this).FindModelChild("Anchor")).GetComponent<Rigidbody>(); Rigidbody connectedBody = ((Joint)((Component)component).GetComponent<FixedJoint>()).connectedBody; GameObject gameObject = ((Component)((BaseState)this).FindModelChild(targetMuzzle)).gameObject; connectedBody.AddForceAtPosition(-gameObject.transform.forward * 700f, gameObject.transform.position, (ForceMode)5); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile { internal class DetonateNearTarget : BaseState { private ProjectileSphereTargetFinder targetFinder; private ProjectileTargetComponent projectileTargetComponent; public override void OnEnter() { ((BaseState)this).OnEnter(); projectileTargetComponent = ((EntityState)this).GetComponent<ProjectileTargetComponent>(); targetFinder = ((EntityState)this).GetComponent<ProjectileSphereTargetFinder>(); if (NetworkServer.active) { ((Behaviour)targetFinder).enabled = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && Object.op_Implicit((Object)(object)targetFinder) && Object.op_Implicit((Object)(object)projectileTargetComponent.target)) { Explode(); } } private void Explode() { //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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown ProjectileDamage component = ((EntityState)this).GetComponent<ProjectileDamage>(); new BlastAttack { procChainMask = ((EntityState)this).projectileController.procChainMask, procCoefficient = ((EntityState)this).projectileController.procCoefficient, attacker = ((EntityState)this).projectileController.owner, inflictor = ((EntityState)this).gameObject, teamIndex = ((EntityState)this).projectileController.teamFilter.teamIndex, baseDamage = component.damage * 2.5f, baseForce = component.force, falloffModel = (FalloffModel)0, crit = component.crit, radius = 5.5f, position = ((EntityState)this).transform.position, damageColorIndex = component.damageColorIndex }.Fire(); EffectManager.SpawnEffect(TanksMod.Modules.Assets.aaCannonNearTargetExplodeEffect, new EffectData { origin = ((EntityState)this).transform.position, rotation = ((EntityState)this).transform.rotation, scale = 5.5f }, true); Util.PlaySound("Play_AACannonNearTargetExplodeSound", ((EntityState)this).gameObject); EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)targetFinder)) { ((Behaviour)targetFinder).enabled = false; } } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.ObliteratorCannon { internal class Upgraded_ChargeObliteratorCannon : ChargeObliteratorCannon { public override void OnEnter() { shootCannonState = (EntityState)(object)new Upgraded_ShootObliteratorCannon(); base.OnEnter(); } } internal class Upgraded_ShootObliteratorCannon : ShootObliteratorCannon { public override void OnEnter() { damageCoefficient = 1000f; projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.oueCannonProjectilePrefab; sound = "Play_Scepter_ObliteratorCannonShot"; base.OnEnter(); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Minigun { internal class Upgraded_Minigun_Fire : Minigun_Fire { public new uint loop; public GameObject laserPrefab = TanksMod.Modules.Assets.laserEffect; public LineRenderer laserLine; public LineRenderer_ShrinkOverTime shrink; public override void OnEnter() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) fireDamageCoeficient = 0.55f; minSpread = 0f; maxSpread = 5f; spreadBloom = 0.5f; playNormalMinigunSound = false; loop = AkSoundEngine.PostEvent("Play_Scepter_Minigun", ((EntityState)this).gameObject); fireFireByForce = true; base.OnEnter(); laserLine = Object.Instantiate<GameObject>(laserPrefab, ((EntityState)this).transform.position, ((EntityState)this).transform.rotation).GetComponent<LineRenderer>(); ((Component)laserLine).transform.parent = ((Component)((BaseState)this).FindModelChild("Gun")).transform; laserLine.startWidth = 0f; laserLine.endWidth = 0f; shrink = ((Component)laserLine).gameObject.AddComponent<LineRenderer_ShrinkOverTime>(); shrink.destroyTime = -1f; shrink.rate = 5f; } public override void FixedUpdate() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) tank.minigun_barrelSpinSpeed = 20f; if (!tank.minigun_Overheated && playNormalMinigunSound) { AkSoundEngine.SetRTPCValueByPlayingID("MinigunLoopPitch", 10f * Minigun_Fire.GetItemFireRate(((EntityState)this).characterBody), loop); } if (!tank.minigun_Overheated) { float num = 1f + Minigun_Fire.GetItemFireRate(((EntityState)this).characterBody); fireTime -= Time.deltaTime * num; if (fireTime <= 0f) { tank.minigun_BeginCooldown = false; tank.minigunHeatLevel += Time.deltaTime * 0.35f / (1f + (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.SecondarySkillMagazine) * 0.33f); if (tank.minigunHeatLevel < 0.75f) { Fire(fireDamageCoeficient); } if (tank.minigunHeatLevel >= 0.75f) { FireDouble(fireDamageCoeficient); } shrink.SetScale(0.1f); fireTime = 0.03f; } if (!((EntityState)this).inputBank.skill2.down && ((EntityState)this).isAuthority) { Minigun_WhineDown nextState = new Minigun_WhineDown(); tank.minigun_barrelSpinSpeed = 20f; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } else { Minigun_WhineDown nextState2 = new Minigun_WhineDown(); tank.minigun_barrelSpinSpeed = 20f; ((EntityState)this).outer.SetNextState((EntityState)(object)nextState2); } Color val = default(Color); ((Color)(ref val))..ctor(1f, 0f, 0.4f); laserLine.startColor = val; laserLine.endColor = val; UpdateLaser(); } private void UpdateLaser() { //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) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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) //IL_003b: 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_0080: 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_0069: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)laserLine)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 position = ((Component)((BaseState)this).FindModelChild("MinigunMuzzle")).transform.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(1000f); RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val) && (Object)(object)((RaycastHit)(ref val)).transform != (Object)(object)((EntityState)this).transform) { point = ((RaycastHit)(ref val)).point; } laserLine.SetPosition(0, position); laserLine.SetPosition(1, point); } } public void Fire(float damageCoefficient) { //IL_002c: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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) //IL_0087: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00b8: 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_00c9: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * Minigun_Fire.recoil, -2f * Minigun_Fire.recoil, -0.5f * Minigun_Fire.recoil, 0.5f * Minigun_Fire.recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * ((EntityState)this).characterBody.damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)128), falloffModel = (FalloffModel)1, maxDistance = Minigun_Fire.range, force = Minigun_Fire.force, hitMask = CommonMasks.bullet, minSpread = minSpread, maxSpread = maxSpread, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = Minigun_Fire.procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 0.25f, spreadYawScale = 0.25f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = MinigunFire.bulletHitEffectPrefab }.Fire(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref aimRay)).direction * 0.5f; } public void FireDouble(float damageCoefficient) { //IL_002c: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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) //IL_0087: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_0128: 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) //IL_0134: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0175: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.AddSpreadBloom(spreadBloom); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-1f * Minigun_Fire.recoil, -2f * Minigun_Fire.recoil, -0.5f * Minigun_Fire.recoil, 0.5f * Minigun_Fire.recoil); new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = damageCoefficient * 2f * ((EntityState)this).characterBody.damage, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)128), falloffModel = (FalloffModel)1, maxDistance = Minigun_Fire.range, force = Minigun_Fire.force, hitMask = CommonMasks.bullet, minSpread = minSpread, maxSpread = maxSpread, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = Minigun_Fire.procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = null, spreadPitchScale = 0.25f, spreadYawScale = 0.25f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = MinigunFire.bulletHitEffectPrefab }.Fire(); CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity -= ((Ray)(ref aimRay)).direction * 0.5f; } public override void OnExit() { base.OnExit(); AkSoundEngine.StopPlayingID(loop); if (Object.op_Implicit((Object)(object)laserLine)) { EntityState.Destroy((Object)(object)((Component)laserLine).gameObject); } } } internal class Upgraded_Minigun_WhineDown : Minigun_WhineDown { } internal class Upgraded_Minigun_WhineUp : Minigun_WhineUp { public override void OnEnter() { whineDown = (EntityState)(object)new Upgraded_Minigun_WhineDown(); fire = (EntityState)(object)new Upgraded_Minigun_Fire(); base.OnEnter(); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.HowitzerCannon { internal class Upgraded_ChargeHowitzerCannon : ChargeHowitzerCannon { public override void OnEnter() { maxChargeTime = 1f; shootCannonState = (EntityState)(object)new Upgraded_ShootHowitzerCannon(); failedChargePenaltyDeduction = 12f; base.OnEnter(); } } internal class Upgraded_ShootHowitzerCannon : ShootHowitzerCannon { public override void OnEnter() { projectilePrefab = TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules.Projectiles.fatmansCannonProjectilePrefab; damageCoefficient = 140f; groundKnockbackForce = 30f; airKnockbackForce = 50f; bodyKnockbackForce = 4000f; base.OnEnter(); } } } namespace TanksMod._DEPENDENCIES.StandaloneAncientScepter.Modules { internal static class Assets { internal static GameObject scepter_Small_ImpactExplosionEffect; internal static GameObject scepter_Medium_ImpactExplosionEffect; internal static GameObject scepter_Big_ImpactExplosionEffect; internal static GameObject scepter_Huge_ImpactExplosionEffect; internal static void PopulateAssets() { if ((Object)(object)TanksMod.Modules.Assets.mainAssetBundle == (Object)null) { Log.Error("Unable to load AssetBundle for StandaloneAncientScepter."); return; } scepter_Small_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Small_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Medium_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Medium_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Big_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Big_ExplosionEffect", "Play_CannonImpactExplosion"); scepter_Huge_ImpactExplosionEffect = TanksMod.Modules.Assets.LoadEffect("Scepter_Huge_ExplosionEffect", "Play_CannonImpactExplosion"); } } internal static class Projectiles { internal static GameObject doctorsCannonProjectilePrefab; internal static GameObject fatmansCannonProjectilePrefab; internal static GameObject boxersCannonProjectilePrefab; internal static GameObject fracturedCannonProjectilePrefab; internal static GameObject gaCannonProjectilePrefab; internal static GameObject rainCannonProjectilePrefab; internal static GameObject oueCannonProjectilePrefab; internal static void RegisterProjectiles() { CreateDoctorsCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(doctorsCannonProjectilePrefab); CreateFatmansCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(fatmansCannonProjectilePrefab); CreateBoxersCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(boxersCannonProjectilePrefab); CreateFracturedCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(fracturedCannonProjectilePrefab); CreateGACannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(gaCannonProjectilePrefab); CreateRainCannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(rainCannonProjectilePrefab); CreaetOUECannonProjectile(); TanksMod.Modules.Projectiles.AddProjectile(oueCannonProjectilePrefab); } private static void CreateDoctorsCannonProjectile() { //IL_0059: 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) doctorsCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterCannonProjectile"); ProjectileImpactExplosion component = doctorsCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 12f; GameObject scepter_Medium_ImpactExplosionEffect = Assets.scepter_Medium_ImpactExplosionEffect; component.impactEffect = scepter_Medium_ImpactExplosionEffect; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((Component)component).GetComponent<ProjectileDamage>().crit = true; ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 150f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.5f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_CannonBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateFatmansCannonProjectile() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) fatmansCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterHowitzerCannonProjectile"); ProjectileImpactExplosion component = fatmansCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 20f; GameObject scepter_Huge_ImpactExplosionEffect = Assets.scepter_Huge_ImpactExplosionEffect; component.impactEffect = scepter_Huge_ImpactExplosionEffect; ((Component)component).GetComponent<ProjectileController>().procCoefficient = 3f; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)40); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 90f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.75f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_HowitzerBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateBoxersCannonProjectile() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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_0086: Unknown result type (might be due to invalid IL or missing references) boxersCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankScepterCromwellCannonProjectile"); ProjectileImpactExplosion component = boxersCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 7f; component.impactEffect = Assets.scepter_Small_ImpactExplosionEffect; ((Component)component).GetComponent<ProjectileController>().procCoefficient = 0.001f; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((ProjectileExplosion)component).bonusBlastForce = new Vector3(0f, 1000f, 0f); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 175f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.3f; ((Component)component).gameObject.AddComponent<TravelDamageDwindle>(); ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_CromwellBullet", convertMaterials: false); CannonProjectileController cannonProjectileController = ((Component)component).gameObject.AddComponent<CannonProjectileController>(); cannonProjectileController.downforceMultiplier = 0.25f; } private static void CreateFracturedCannonProjectile() { fracturedCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(6f, Assets.scepter_Medium_ImpactExplosionEffect, "FracturedCannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_MausBullet", convertMaterials: false), 210f, 0.6f, 0.25f); } private static void CreaetOUECannonProjectile() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) oueCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(35f, TanksMod.Modules.Assets.selfDestructEffect, "OUECannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_ObliteratorCannonBullet", convertMaterials: false), 250f, 0.6f, 0.25f); ForceTeamProjectile forceTeamProjectile = oueCannonProjectilePrefab.AddComponent<ForceTeamProjectile>(); forceTeamProjectile.newTeam = (TeamIndex)(-1); oueCannonProjectilePrefab.GetComponent<TeamFilter>().teamIndex = (TeamIndex)(-1); } private static void CreateGACannonProjectile() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0069: Unknown result type (might be due to invalid IL or missing references) gaCannonProjectilePrefab = TanksMod.Modules.Projectiles.CreateBaseProjectile(3f, Assets.scepter_Small_ImpactExplosionEffect, "GACannon", TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_AACannonBullet", convertMaterials: false), 210f, 0.3f, 0.01f); EntityStateMachine val = gaCannonProjectilePrefab.gameObject.AddComponent<EntityStateMachine>(); val.initialStateType = new SerializableEntityStateType(typeof(TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile.DetonateNearTarget)); val.mainStateType = new SerializableEntityStateType(typeof(TanksMod._DEPENDENCIES.StandaloneAncientScepter.SkillStates.Projectile.GAProjectile.DetonateNearTarget)); ProjectileSphereTargetFinder val2 = gaCannonProjectilePrefab.gameObject.AddComponent<ProjectileSphereTargetFinder>(); val2.lookRange = 5.5f; val2.targetSearchInterval = 0f; val2.flierAltitudeTolerance = 5.5f; } private static void CreateRainCannonProjectile() { //IL_0068: 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) rainCannonProjectilePrefab = TanksMod.Modules.Projectiles.CloneProjectilePrefab("ToolbotGrenadeLauncherProjectile", "BasicTankRainCannonProjectile"); ProjectileImpactExplosion component = rainCannonProjectilePrefab.GetComponent<ProjectileImpactExplosion>(); ((ProjectileExplosion)component).blastRadius = 13f; component.impactEffect = Assets.scepter_Big_ImpactExplosionEffect; ((Component)component).GetComponent<Rigidbody>().useGravity = true; ((Component)component).GetComponent<Rigidbody>().interpolation = (RigidbodyInterpolation)2; ((Component)component).GetComponent<Rigidbody>().collisionDetectionMode = (CollisionDetectionMode)2; ((Component)component).GetComponent<ProjectileDamage>().damageType = DamageTypeCombo.op_Implicit((DamageType)131072); ((Component)component).GetComponent<ProjectileSimple>().desiredForwardSpeed = 80f; ((Component)component).GetComponent<ProjectileSimple>().lifetime = 9999999f; ((Component)component).GetComponent<SphereCollider>().radius = 0.4f; TravelDamageIncrease travelDamageIncrease = ((Component)component).gameObject.AddComponent<TravelDamageIncrease>(); travelDamageIncrease.maximumDamageFlightTime = 1f; travelDamageIncrease.startFlightDamagePercent = 40f; ProjectileController component2 = ((Component)component).GetComponent<ProjectileController>(); component2.ghostPrefab = TanksMod.Modules.Projectiles.CreateGhostPrefab("CWH_Scepter_Tank02Bullet", convertMaterials: false); } } internal class Skills { private static string prefix = "CHEESEWITHHOLES"; public static void RegisterSkills() { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_032f: 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_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_06fe: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_083f: Unknown result type (might be due to invalid IL or missing references) //IL_08e6: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) SkillDefInfo skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Doctor's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("CritCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_CritCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 7f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Fatman's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_HOWITZER_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_HOWITZER_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("HowitzerCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ChargeHowitzerCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 16f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val2 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Laser Minigun"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MINIGUN_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MINIGUN_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("MinigunScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_Minigun_WhineUp)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.beginSkillCooldownOnSkillEnd = false; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val3 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Boxer's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CROMWELL_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CROMWELL_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("KnockerCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_KnockerCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 2f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val4 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "French Fries"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_FRENCHGUN_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_FRENCHGUN_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("FrenchGunScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_FrenchGun)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 1f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val5 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Billy's Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_T62_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_T62_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("PiercingCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_PiercingCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 4f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val6 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Fractured Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MAUS_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_MAUS_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("BasicCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_BasicCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 6f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val7 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "G/A Cannon"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_AA_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_AA_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("AACannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_AACannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 0f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = true; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = false; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val8 = (SkillDef)(object)TanksMod.Modules.Skills.CreateSkillDef<SteppedSkillDef>(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Cannon MK II"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_MKII_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_CANNON_MKII_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("ArtillaryCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ArtillaryCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 15f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)2; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val9 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); skillDefInfo = new SkillDefInfo(); skillDefInfo.skillName = "Oppenheimer’s Unreleased Experimental"; skillDefInfo.skillNameToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_OBLITERATOR_CANNON_NAME"; skillDefInfo.skillDescriptionToken = prefix + "_BASICTANK_BODY_SECONDARY_SCEPTER_OBLITERATOR_CANNON_DESCRIPTION"; skillDefInfo.skillIcon = TanksMod.Modules.Assets.mainAssetBundle.LoadAsset<Sprite>("ObliteratorCannonScepter"); skillDefInfo.activationState = new SerializableEntityStateType(typeof(Upgraded_ChargeObliteratorCannon)); skillDefInfo.activationStateMachineName = "Weapon2"; skillDefInfo.baseMaxStock = 1; skillDefInfo.baseRechargeInterval = 21f; skillDefInfo.beginSkillCooldownOnSkillEnd = true; skillDefInfo.canceledFromSprinting = false; skillDefInfo.forceSprintDuringState = false; skillDefInfo.fullRestockOnAssign = true; skillDefInfo.interruptPriority = (InterruptPriority)0; skillDefInfo.resetCooldownTimerOnUse = false; skillDefInfo.isCombatSkill = true; skillDefInfo.mustKeyPress = true; skillDefInfo.cancelSprintingOnActivation = false; skillDefInfo.rechargeStock = 1; skillDefInfo.requiredStock = 1; skillDefInfo.stockToConsume = 1; SkillDef val10 = TanksMod.Modules.Skills.CreateSkillDef(skillDefInfo); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val, "BasicTankBody", (SkillSlot)1, 0); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val2, "BasicTankBody", (SkillSlot)1, 1); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val4, "BasicTankBody", (SkillSlot)1, 2); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val6, "BasicTankBody", (SkillSlot)1, 3); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val5, "BasicTankBody", (SkillSlot)1, 4); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val3, "BasicTankBody", (SkillSlot)1, 5); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val7, "BasicTankBody", (SkillSlot)1, 6); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val8, "BasicTankBody", (SkillSlot)1, 7); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val9, "BasicTankBody", (SkillSlot)1, 8); ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(val10, "BasicTankBody", (SkillSlot)1, 10); } } public static class States { internal static void RegisterStates() { TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ChargeHowitzerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ShootHowitzerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_Fire)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_WhineDown)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_Minigun_WhineUp)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_CritCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_FrenchGun)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_KnockerCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_PiercingCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_BasicCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_AACannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ArtillaryCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ChargeObliteratorCannon)); TanksMod.Modules.Content.AddEntityState(typeof(Upgraded_ShootObliteratorCannon)); } } internal static class StaticValues { internal const float scepterCritCannon_Damage_Multiplier = 2f; internal const float scepterHowitzerCannon_Damage_Multiplier = 2f; internal const float scepterMinigun_Damage_Multiplier = 1f; internal const float scepterKnockCannon_Damage_Multiplier = 1.75f; internal const float scepterPiercingCannon_Damage_Multiplier = 2f; internal const float scepterBasicCannon_Damage_Multiplier = 2f; internal const float scepterAACannon_Damage_Multiplier = 1.5f; } internal static class Tokens { internal static void AddTokens() { string text = "CHEESEWITHHOLES_BASICTANK_BODY_"; LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_NAME", "Doctor's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_DESCRIPTION", "Fire the main gun for <style=cIsDamage>" + 2980f.ToString("0") + "% damage</style> with <style=cIsDamage>unfaltering critical chance</style>. Critical chance increases damage of the cannon.\n\n" + TanksMod.Modules.Tokens.SkillStats(7f, 12f, TanksMod.Modules.Tokens.AccuracyType.Great, TanksMod.Modules.Tokens.GoodKeyword("Faster Projectile") + "\n" + TanksMod.Modules.Tokens.BadKeyword("Knockback to self increased."))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_HOWITZER_CANNON_NAME", "Fatman's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_HOWITZER_CANNON_DESCRIPTION", string.Format("Charge, and fire the Howitzer for <style=cIsDamage>{0}% damage</style>. <style=cIsUtility>Stuns and slows enemies</style>. Has an {1}, and is risky to fire in-air.\n\n{2}.\n{3}", 14000f, TanksMod.Modules.Tokens.ReallyBadKeyword("extra excessive knockback"), TanksMod.Modules.Tokens.BadKeyword("Failure to charge results in a 4s penalty"), TanksMod.Modules.Tokens.SkillStats(16f, 20f, TanksMod.Modules.Tokens.AccuracyType.None, TanksMod.Modules.Tokens.BadKeyword("Slow Projectile")))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CROMWELL_CANNON_NAME", "Boxer's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CROMWELL_CANNON_DESCRIPTION", string.Format("Fire the gun for <style=cIsDamage>{0}% damage</style>. <style=cIsDamage>Damage decreases as it travels</style>; <style=cIsDamage>Proc items instead increase damage</style>.\n\n{1}", 2887.5f, TanksMod.Modules.Tokens.SkillStats(2f, 7f, TanksMod.Modules.Tokens.AccuracyType.Great, "<style=cIsUtility>Greatly knocks back enemies</style>\n" + TanksMod.Modules.Tokens.GoodKeyword("Faster Projectile")))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_FRENCHGUN_NAME", "French Fries"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_FRENCHGUN_DESCRIPTION", $"Now shoots <style=cIsDamage>5x{550f} damage</style>, with proc of 10."); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MINIGUN_NAME", "Laser Minigun"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MINIGUN_DESCRIPTION", string.Format("Fire the minigun for <style=cIsDamage>{0}% damage</style>. Near overheat deals <style=cIsDamage>x2 base damage</style>. Complete overheat {1}. <style=cIsUtility>Attack speed only affects cooldown</style>; {2} increases time to overheat.\n{3}", 50f, TanksMod.Modules.Tokens.BadKeyword("penalizes cooldown"), TanksMod.Modules.Tokens.GoodKeyword("Backup Magazines"), TanksMod.Modules.Tokens.SkillStats(0f, 0f, TanksMod.Modules.Tokens.AccuracyType.Great, ""))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_T62_CANNON_NAME", "Billy's Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_T62_CANNON_DESCRIPTION", string.Format("Fire the laser gun for <style=cIsDamage>{0}% damage</style>. Hitting weak points deals <style=cIsDamage>extra damage</style>.\n{1}", 4000f, TanksMod.Modules.Tokens.SkillStats(4f, 0f, TanksMod.Modules.Tokens.AccuracyType.Great, ""))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MAUS_NAME", "Fractured Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_MAUS_DESCRIPTION", string.Format("Fire the gun for <style=cIsDamage>{0}% damage</style>. Hitting a enemy deals {1}, {2}, and {3}. Possesses the <style=cIsUtility>fastest projectile</style>, allowing for ease of use.\n{4}", 5000f, TanksMod.Modules.Tokens.isFire("fire"), TanksMod.Modules.Tokens.isBleed("bleed"), TanksMod.Modules.Tokens.isWeakness("weakness"), TanksMod.Modules.Tokens.SkillStats(6f, 6f, TanksMod.Modules.Tokens.AccuracyType.Great, ""))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_AA_NAME", "G/A Cannon"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_AA_DESCRIPTION", string.Format("Fire the gun for <style=cIsDamage>{0}% damage</style>. Projectile detonates <style=cIsDamage>{1}m</style> near <style=cIsUtility>any</style> targets for an extra <style=cIsDamage>{2}x</style> base damage. While firing, {3}.\n{4}", 450f, 5.5f, 2.5f, TanksMod.Modules.Tokens.BadKeyword("speed is penalized"), TanksMod.Modules.Tokens.SkillStats(0f, 0f, TanksMod.Modules.Tokens.AccuracyType.Great, "<style=cIsUtility>Affected by attack speed</style>"))); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_MKII_NAME", "RAIN"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_CANNON_MKII_DESCRIPTION", $"Fire the gun for <style=cIsDamage>10x{2199.9998f}% damage</style> in a <style=cIsUtility>great arc</style>. Damage increases the further it travels, up to <style=cIsDamage>12x{5500f}% damage</style>.\n\nCooldown: 30s\nBlast Radius: 13m/bullet"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_OBLITERATOR_CANNON_NAME", "Oppenheimer’s Unreleased Experimental"); LanguageAPI.Add(text + "SECONDARY_SCEPTER_OBLITERATOR_CANNON_DESCRIPTION", string.Format("Annihilate {0} in a {1}m for <style=cIsDamage>{2}% damage</style>.", TanksMod.Modules.Tokens.ReallyBadKeyword("ALL"), 35f, 100000f)); } } } namespace TanksMod.States { internal class DeathState : GenericCharacterDeath { public override void OnEnter() { //IL_0047: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); ((Component)((BaseState)this).FindModelChild("DeathEffects")).gameObject.SetActive(true); ((Component)((BaseState)this).FindModelChild("CrashDust")).gameObject.SetActive(false); Util.PlaySound("Play_DeathSound", ((EntityState)this).gameObject); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; } if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { return; } RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (Object.op_Implicit((Object)(object)component)) { component.BeginRagdoll(val); Transform[] bones = component.bones; foreach (Transform val2 in bones) { Object.Destroy((Object)(object)((Component)val2).gameObject, 10f); } Object.Destroy((Object)(object)((Component)component).gameObject, 10f); } } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { ((Behaviour)((EntityState)this).characterMotor).enabled = false; EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: 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) return (InterruptPriority)7; } } internal class GenericTankMain : BaseCharacterMain { private CheesePlayerHandler cheese; private TankController tank; public bool updateCharacter = true; private AimAnimator aimAnimator; protected bool jumpInputReceived; protected bool sprintInputReceived; private Vector3 moveVector = Vector3.zero; private Vector3 aimDirection = Vector3.forward; private bool hasAimAnimator; public override void OnEnter() { ((BaseCharacterMain)this).OnEnter(); tank = ((EntityState)this).GetComponent<TankController>(); cheese = tank.cheese; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { aimAnimator = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } } hasAimAnimator = Object.op_Implicit((Object)(object)aimAnimator); updateCharacter = true; if (Object.op_Implicit((Object)(object)tank)) { tank.newFuelAmount = tank.baseFuelAmount; tank.maxFuelAmount = tank.newFuelAmount; tank.currentFuelAmount = tank.newFuelAmount; tank.previousFuelAmount = tank.newFuelAmount; tank.expectedFuelAmount = tank.newFuelAmount; tank.newJumpFuelConsumption = tank.baseJumpFuelConsumption; tank.newFuelRechargeRate = tank.baseFuelRechargeRate; tank.newDelayRechargeTime = tank.baseDelayRechargeTime; tank.currentDelayRechargeTime = tank.newDelayRechargeTime; tank.newJumpThrustMultiplier = tank.baseJumpThrustMultiplier; tank.newJumpHoverMultiplier = tank.baseJumpHoverMultiplier; } } public override void Update() { ((BaseCharacterMain)this).Update(); } public override void FixedUpdate() { if (Object.op_Implicit((Object)(object)((EntityState)this).GetComponent<TankController>()) && (Object)(object)tank == (Object)null) { tank = ((EntityState)this).GetComponent<TankController>(); } ((BaseCharacterMain)this).FixedUpdate(); if (tank.IsNotCrashed()) { GatherInputs(); HandleMovements(); PerformInputs(); } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(0f); UpdateFuelStats(); if ((Object)(object)cheese != (Object)null) { ApplyFuelBaseAmount(); } } } private void UpdateCharacteristics() { StaticModels.BodyType[] array = Enum.GetValues(typeof(StaticModels.BodyType)).Cast<StaticModels.BodyType>().ToArray(); StaticModels.TurretType[] array2 = Enum.GetValues(typeof(StaticModels.TurretType)).Cast<StaticModels.TurretType>().ToArray(); float num = TanksMod.Modules.StaticValues.GetHealthValueFromBody(array[cheese.currentBodyId]) + TanksMod.Modules.StaticValues.GetHealthValueFromTurret(array2[cheese.currentTurretId]); float num2 = TanksMod.Modules.StaticValues.GetArmorValueFromBody(array[cheese.currentBodyId]) + TanksMod.Modules.StaticValues.GetArmorValueFromTurret(array2[cheese.currentTurretId]); tank.weightRatio = 1f - (num + num2) / (BasicTank.baseHealth + BasicTank.baseArmor); } private void ApplyFuelBaseAmount() { if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility)) { if (((EntityState)this).skillLocator.utility.baseSkill.skillName == "Dash Spikes") { tank.baseFuelAmount = 150f; } if (((EntityState)this).skillLocator.utility.baseSkill.skillName == "Bull Dozer") { tank.baseFuelAmount = 150f; } if (((EntityState)this).skillLocator.utility.baseSkill.skillName == "Rip Dozer") { tank.baseFuelAmount = 125f; } } } private void ApplyBonusesIfAvailable() { float num = 0f; float num2 = 0f; float num3 = 0f; float num4 = 0f; float num5 = 0f; float num6 = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.primary) && ((EntityState)this).skillLocator.primary.skillNameToken.Contains("EMPTY")) { num += 0.5f; num4 += 0.5f; } if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility) && ((EntityState)this).skillLocator.utility.skillNameToken.Contains("EMPTY")) { num += 1f; num2 += 0.5f; num5 += 0.1f; num6 += 0.01f; } if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && ((EntityState)this).skillLocator.special.skillNameToken.Contains("EMPTY")) { num3 += 25f; } num5 += tank.weightRatio / 2f; num6 += tank.weightRatio / 2f; } tank.speedBonus = num; tank.jumpPowerBonus = num2; tank.attackSpeedBonus = num4; tank.armorBonus = num3; tank.thrustPowerBonus = num5; tank.hoverPowerBonus = num6; } private void UpdateFuelStats() { if (!((Object)(object)cheese != (Object)null)) { return; } tank.newFuelAmount = SetMaxFuelAmount(); tank.newFuelRechargeRate = SetNewRechargeRate(); tank.newJumpThrustMultiplier = SetNewJumpThrustMultiplier() + tank.thrustPowerBonus; tank.newJumpHoverMultiplier = tank.baseJumpHoverMultiplier + tank.hoverPowerBonus; tank.newDelayRechargeTime = SetNewDelayRecharge(); tank.maxFuelAmount = tank.newFuelAmount; tank.newFuelAmount = Mathf.Clamp(tank.newFuelAmount, 0f, float.PositiveInfinity); tank.currentFuelAmount = Mathf.Clamp(tank.currentFuelAmount, 0f, tank.newFuelAmount); tank.previousFuelAmount = Mathf.Clamp(tank.previousFuelAmount, 0f, tank.newFuelAmount); tank.expectedFuelAmount = Mathf.Clamp(tank.expectedFuelAmount, 0f, tank.newFuelAmount); tank.newFuelRechargeRate = Mathf.Clamp(tank.newFuelRechargeRate, 0f, float.PositiveInfinity); tank.newDelayRechargeTime = Mathf.Clamp(tank.newDelayRechargeTime, 0.1f, float.PositiveInfinity); if (tank.currentFuelAmount < tank.previousFuelAmount) { tank.currentDelayRechargeTime = tank.newDelayRechargeTime; tank.previousFuelAmount = tank.currentFuelAmount; tank.expectedFuelAmount = tank.currentFuelAmount; } else { tank.previousFuelAmount = tank.currentFuelAmount; } if (tank.expectedFuelAmount > tank.currentFuelAmount || !tank.IsNotInFlight()) { tank.currentDelayRechargeTime = tank.newDelayRechargeTime; } if (tank.currentDelayRechargeTime > 0f && !((EntityState)this).inputBank.skill3.down && !((EntityState)this).inputBank.jump.down) { tank.currentDelayRechargeTime -= Time.deltaTime; } if (tank.currentDelayRechargeTime <= 0f) { if (tank.currentFuelAmount < tank.newFuelAmount) { tank.currentFuelAmount += Time.deltaTime * tank.newFuelRechargeRate; } if (tank.expectedFuelAmount < tank.newFuelAmount) { tank.expectedFuelAmount += Time.deltaTime * tank.newFuelRechargeRate; } tank.currentDelayRechargeTime = 0f; } } private float SetMaxFuelAmount() { //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) float num = tank.baseFuelAmount + 5f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.WarCryOnMultiKill) + 5f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.AttackSpeedOnCrit) + 5f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.IgniteOnKill) + 35f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.Feather) + 10f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.StrengthenBurn) + 25f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost) + 100f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.UtilitySkillMagazine) + 15f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.ShinyPearl) + 50f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.FallBoots) + -10f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_Staghound_Item>.instance.itemDef) + 20f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_APC_Item>.instance.itemDef) + -5f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_Tetrarch_Item>.instance.itemDef) + 15f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_Prototype_Item>.instance.itemDef); if (((EntityState)this).characterBody.inventory.GetEquipmentIndex() == Equipment.QuestVolatileBattery.equipmentIndex) { num += 200f; } return num; } private float SetNewRechargeRate() { return tank.baseFuelRechargeRate * ((EntityState)this).characterBody.attackSpeed; } private float SetNewJumpThrustMultiplier() { return tank.baseJumpThrustMultiplier + 0.08f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.UtilitySkillMagazine) + 0.05f * (float)((EntityState)this).characterBody.inventory.GetItemCount(Items.ShinyPearl) + -0.14f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_APC_Item>.instance.itemDef) + -0.1f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Turret_FV4005_Item>.instance.itemDef) + -0.15f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_Bob_Item>.instance.itemDef) + -0.07f * (float)((EntityState)this).characterBody.inventory.GetItemCount(ItemBase<Body_Prototype_Item>.instance.itemDef); } private float SetNewDelayRecharge() { return tank.baseDelayRechargeTime - (((EntityState)this).characterBody.attackSpeed - 1f); } public virtual void HandleMovements() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: 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_00db: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Invalid comparison between Unknown and I4 //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0283: 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) TankController tankController = tank; Vector3 val = Vector3.Slerp(tank.lastMoveDirection, moveVector, tank.grip * Time.deltaTime); tankController.lastMoveDirection = ((Vector3)(ref val)).normalized; tank.acceleration = Mathf.Lerp(tank.acceleration, ((Vector3)(ref moveVector)).magnitude, tank.controlledAcceleration * Time.deltaTime); float num = Vector3.Angle(tank.lastMoveDirection, moveVector); float num2 = Vector3.Dot(tank.lastMoveDirection, moveVector) * Mathf.SmoothStep(0f, 1f, num / tank.tractionLossAngle); Vector3 velocity = moveVector * tank.acceleration; Vector3 val2 = Vector3.Lerp(tank.lastMoveDirection * tank.acceleration, Vector3.zero, Time.deltaTime); if (((Vector3)(ref moveVector)).magnitude > 0f) { tank.velocity = velocity; } else { tank.acceleration = Mathf.Lerp(tank.acceleration, ((Vector3)(ref moveVector)).magnitude, 10f * Time.deltaTime); tank.velocity = Vector3.Lerp(tank.velocity, Vector3.zero, 10f * Time.deltaTime); } if (base.hasCharacterMotor) { ((EntityState)this).characterMotor.moveDirection = tank.velocity; } if (base.hasRailMotor) { ((EntityState)this).railMotor.inputMoveVector = tank.velocity; } if (!base.hasRailMotor && base.hasCharacterDirection && base.hasCharacterBody) { if (hasAimAnimator && (int)aimAnimator.aimType == 1) { Vector3 val3 = ((moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : moveVector); float num3 = Vector3.Angle(aimDirection, val3); float num4 = Mathf.Max(aimAnimator.pitchRangeMax + aimAnimator.pitchGiveupRange, aimAnimator.yawRangeMax + aimAnimator.yawGiveupRange); ((EntityState)this).characterDirection.moveVector = val3; } else { ((EntityState)this).characterDirection.moveVector = moveVector; } } if (((EntityState)this).isAuthority && base.hasCharacterBody) { bool isSprinting = sprintInputReceived; if (((Vector3)(ref moveVector)).magnitude <= 0.5f) { isSprinting = false; } ((EntityState)this).characterBody.isSprinting = isSprinting; } } protected virtual bool CanExecuteSkill(GenericSkill skillSlot) { return true; } protected void PerformInputs() { if (!((EntityState)this).isAuthority) { return; } if (base.hasSkillLocator) { if (((EntityState)this).skillLocator.primary.skillDef.skillName != "Empty" && ((EntityState)this).skillLocator.primary.skillDef.skillName != "DISABLED") { HandleSkill(((EntityState)this).skillLocator.primary, ref ((EntityState)this).inputBank.skill1); } if (((EntityState)this).skillLocator.secondary.skillDef.skillName != "Empty" && ((EntityState)this).skillLocator.secondary.skillDef.skillName != "DISABLED") { HandleSkill(((EntityState)this).skillLocator.secondary, ref ((EntityState)this).inputBank.skill2); } if (((EntityState)this).skillLocator.utility.skillDef.skillName != "Empty" && ((EntityState)this).skillLocator.utility.skillDef.skillName != "DISABLED") { HandleSkill(((EntityState)this).skillLocator.utility, ref ((EntityState)this).inputBank.skill3); } if (((EntityState)this).skillLocator.special.skillDef.skillName != "Empty" && ((EntityState)this).skillLocator.special.skillDef.skillName != "DISABLED") { HandleSkill(((EntityState)this).skillLocator.special, ref ((EntityState)this).inputBank.skill4); } } jumpInputReceived = false; sprintInputReceived = false; } protected void GatherInputs() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (base.hasInputBank) { moveVector = ((EntityState)this).inputBank.moveVector; aimDirection = ((EntityState)this).inputBank.aimDirection; jumpInputReceived = ((ButtonState)(ref ((EntityState)this).inputBank.jump)).justPressed; sprintInputReceived |= ((EntityState)this).inputBank.sprint.down; } } [CompilerGenerated] private void HandleSkill(GenericSkill skillSlot, ref ButtonState buttonState) { if (buttonState.down && Object.op_Implicit((Object)(object)skillSlot) && (!skillSlot.mustKeyPress || !buttonState.hasPressBeenClaimed) && CanExecuteSkill(skillSlot) && skillSlot.ExecuteIfReady()) { buttonState.hasPressBeenClaimed = true; } } public override void OnExit() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) NetMessageExtensions.Send((INetMessage)(object)new PerformThrusterLoopSoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, play: false), (NetworkDestination)1); Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { AimAnimator component = ((Component)modelTransform).GetComponent<AimAnimator>(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.moveDirection = Vector3.zero; } if (Object.op_Implicit((Object)(object)((EntityState)this).railMotor)) { ((EntityState)this).railMotor.inputMoveVector = Vector3.zero; } } ((BaseCharacterMain)this).OnExit(); } } } namespace TanksMod.States.Tank { internal class ControlLoss : BaseState {