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.InteropServices; 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.DroneTech; using EntityStates.Huntress; using EntityStates.SnowtimeToybox_FireHaloWeapon; using EntityStates.SnowtimeToybox_FriendlyTurret; using Grumpy; using HG; using HG.Reflection; using Microsoft.CodeAnalysis; using On; using On.EntityStates.DroneTech; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Items; using On.RoR2.Projectile; using R2API; using R2API.Utils; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Navigation; using RoR2.Networking; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths.Version_1_39_0; using Ror2AggroTools; using ShaderSwapper; using SnowtimeToybox; using SnowtimeToybox.Buffs; using SnowtimeToybox.Components; using SnowtimeToybox.FriendlyTurretChecks; using SnowtimeToybox.FriendlyTurrets; using SnowtimeToybox.Items; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyCompany("SnowtimeToybox")] [assembly: AssemblyProduct("SnowtimeToybox")] [assembly: AssemblyTitle("SnowtimeToybox")] [assembly: AssemblyInformationalVersion("1.0.0+56ade4abe879630dd8f69d700a322c167547aed9")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace EntityStates.SnowtimeToybox_FireHaloWeapon { public class FirePlasmaRifle : GenericBulletBaseState { public string muzzleName = "NanoPistolOrigin"; public GameObject muzzleFlashPrefab = Content.HaloMuzzleFlashObject; public GameObject tracerEffectPrefab = Content.HaloTracerObject; public GameObject hitEffectPrefab = Content.HaloHitObject; public string fireSoundString = "Play_Plasma_Rifle_Fire"; public float procCoefficient = 0.7f; public float damageCoefficient = 0.6f; public float bulletRadius = 1.25f; public float maxDistance = 128f; public float baseDuration = 0.04f; public float bounceDamageCoefficient = 0.4f; public float RecoilY = 0.8f; public float RecoilX = 0.2f; public float orbSpeed = 100f; public bool shouldBounce = true; public bool useSmartCollision = true; public Transform muzzleTransform; public float additionalStocks = 26f; private DroneTechController controller; private GameObject currentDrone; public override void OnEnter() { controller = ((EntityState)this).GetComponent(); ((GenericBulletBaseState)this).OnEnter(); base.duration = baseDuration / (((BaseState)this).attackSpeedStat / 4f); if (((EntityState)this).isAuthority) { additionalStocks = 23f + ((BaseState)this).attackSpeedStat * 3.5f; ((EntityState)this).skillLocator.primary.maxStock = (int)additionalStocks; } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void PlayFireAnimation() { Animator modelAnimator = ((EntityState)this).GetModelAnimator(); string text = ((Object.op_Implicit((Object)(object)modelAnimator) && (modelAnimator.GetBool("isCarried") || modelAnimator.GetBool("inLeap"))) ? "FullBody, Override" : "Gesture, Override"); ((EntityState)this).PlayAnimation(text, "FireNanoPistol"); } public override void DoFireEffects() { Util.PlaySound(fireSoundString, ((EntityState)this).gameObject); EffectManager.SimpleMuzzleFlash(muzzleFlashPrefab, ((EntityState)this).gameObject, muzzleName, false); } public override void FireBullet(Ray aimRay) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, maxDistance, ((EntityState)this).gameObject, 1f); if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.CurrentDrone?.characterBody)) { currentDrone = ((Component)controller.CurrentDrone.characterBody).gameObject; } base.recoilAmplitudeY = RecoilY; base.recoilAmplitudeX = RecoilX; ((GenericBulletBaseState)this).FireBullet(aimRay); } public override void ModifyBullet(BulletAttack bulletAttack) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //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_0037: 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_008f: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) ((GenericBulletBaseState)this).ModifyBullet(bulletAttack); bulletAttack.damage = damageCoefficient * ((EntityState)this).characterBody.damage; bulletAttack.damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)128), (DamageTypeExtended)0, (DamageSource)1); DamageAPI.AddModdedDamageType(bulletAttack, SnowtimeToyboxMod.HaloRicochetOnHit); bulletAttack.muzzleName = muzzleName; bulletAttack.tracerEffectPrefab = tracerEffectPrefab; bulletAttack.hitEffectPrefab = hitEffectPrefab; bulletAttack.weapon = ((EntityState)this).gameObject; bulletAttack.maxDistance = maxDistance; bulletAttack.filterCallback = new FilterCallback(IgnoreAlliesAndCurrentDrone); bulletAttack.falloffModel = (FalloffModel)1; } private bool IgnoreAlliesAndCurrentDrone(BulletAttack bullet, ref BulletHit hit) { //IL_009d: Unknown result type (might be due to invalid IL or missing references) HurtBox component = ((Component)hit.collider).GetComponent(); if ((Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent) && ((Object)(object)((Component)component.healthComponent).gameObject == (Object)(object)bullet.weapon || (Object)(object)((Component)component.healthComponent).gameObject == (Object)(object)currentDrone)) || (Object)(object)hit.entityObject == (Object)(object)((EntityState)this).gameObject || (Object)(object)hit.entityObject == (Object)(object)bullet.weapon) { return false; } if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent)) { return FriendlyFireManager.ShouldDirectHitProceed(component.healthComponent, ((EntityState)this).teamComponent.teamIndex); } return true; } } } namespace EntityStates.SnowtimeToybox_FriendlyTurret { public class FireAcanthiBeam : BaseState { private struct LerpHelper { private float startTime; private float endTime; private float invTimeSpan; private float timeSpan; private bool hasStartTime; private bool hasEndTime; public void Push(float currentTime) { startTime = endTime; endTime = currentTime; hasStartTime = hasEndTime; hasEndTime = true; float num = endTime - startTime; if (hasStartTime && num != timeSpan) { timeSpan = num; invTimeSpan = 0.5f / timeSpan; } } public readonly float CalcLerpValue(float currentTime) { if (hasStartTime) { return (currentTime - startTime) * invTimeSpan; } return 0.5f; } } public GameObject laserPrefab = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Acanthi/Skills/laseracanthi.prefab"); public string muzzleString = "Muzzle"; public string attackSoundPlayString = "Play_HWLocust_Fire"; public string attackSoundStopString = "Stop_HWLocust_Fire"; public float damageCoefficient = 1f; public float procCoefficient = 0.4f; public float force; public float minSpread; public float maxSpread; public int bulletCount = 1; public float fireFrequency = 5f; public float maxDistance = 80f; private float fireStopwatch; private Ray laserRay; private Transform modelTransform; private GameObject laserVfxInstance; private Transform laserVfxInstanceEndTransform; private Vector3? newestRaycastHitPoint; private Vector3? previousRaycastHitPoint; private float raycastLerpValue; private LerpHelper vfxLerpHelper; private BulletAttack bulletAttack; private EffectManagerHelper _emh_laserEffect; private HitCallback hitCallback; private Vector3? bulletEndPos; private static int FireLaserStateHash = Animator.StringToHash("acanthi_firing7s"); private static int FireLaser1StateHash = Animator.StringToHash("acanthi_firingloop"); private static int FireLaser2StateHash = Animator.StringToHash("acanthi_firingend"); private float firingTime; public override void Reset() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).Reset(); fireStopwatch = 0f; firingTime = 0f; newestRaycastHitPoint = null; previousRaycastHitPoint = null; modelTransform = null; laserVfxInstance = null; laserVfxInstanceEndTransform = null; laserRay = default(Ray); vfxLerpHelper = default(LerpHelper); if (bulletAttack != null) { bulletAttack.Reset(); } _emh_laserEffect = null; } public override void OnEnter() { //IL_00c9: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(attackSoundPlayString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture", FireLaserStateHash); fireStopwatch = 0f; firingTime = 0f; modelTransform = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (!Object.op_Implicit((Object)(object)component)) { return; } Transform val = component.FindChild(muzzleString); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)laserPrefab)) { if (!EffectManager.ShouldUsePooledEffect(laserPrefab)) { laserVfxInstance = Object.Instantiate(laserPrefab, val.position, val.rotation); } else { _emh_laserEffect = EffectManager.GetAndActivatePooledEffect(laserPrefab, val.position, val.rotation); laserVfxInstance = ((Component)_emh_laserEffect).gameObject; } if (Object.op_Implicit((Object)(object)laserVfxInstance)) { ChildLocator component2 = laserVfxInstance.GetComponent(); laserVfxInstanceEndTransform = component2.FindChild("LaserEnd"); } laserVfxInstance.transform.parent = val; } } public override void OnExit() { if (Object.op_Implicit((Object)(object)laserVfxInstance)) { if ((Object)(object)_emh_laserEffect != (Object)null && _emh_laserEffect.OwningPool != null) { ((GenericPool)(object)_emh_laserEffect.OwningPool).ReturnObject(_emh_laserEffect); } else { EntityState.Destroy((Object)(object)laserVfxInstance); } } laserVfxInstance = null; laserVfxInstanceEndTransform = null; _emh_laserEffect = null; Util.PlaySound(attackSoundStopString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture", FireLaser2StateHash); ((EntityState)this).OnExit(); } private void UpdateBeamVFX(float time) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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) GameObject obj = UnityObjectExtensions.AsValidOrNull(laserVfxInstance); if (obj != null) { obj.SetActive(newestRaycastHitPoint.HasValue); } if (Object.op_Implicit((Object)(object)laserVfxInstanceEndTransform) && newestRaycastHitPoint.HasValue) { Ray val = GetLaserRay(); float num = vfxLerpHelper.CalcLerpValue(time); Vector3 val2 = Vector3.Lerp((previousRaycastHitPoint ?? newestRaycastHitPoint).Value, newestRaycastHitPoint.Value, num) - ((Ray)(ref val)).origin; float magnitude = ((Vector3)(ref val2)).magnitude; laserVfxInstanceEndTransform.position = ((Ray)(ref val)).GetPoint(magnitude); } } public override void Update() { ((EntityState)this).Update(); UpdateBeamVFX(Time.time); } public override void FixedUpdate() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Time.fixedDeltaTime > 0f) { laserRay = GetLaserRay(); fireStopwatch += Time.fixedDeltaTime; firingTime += Time.fixedDeltaTime; if (firingTime > 7f) { firingTime = 7f; } float num = Math.Clamp(0.7f / (1f + firingTime / 7f), 0.35f, 0.6f); procCoefficient = Math.Clamp(firingTime / 14f, 0.05f, 0.5f); float num2 = fireFrequency; float num3 = num / num2; if (fireStopwatch > num3) { fireStopwatch = 0f; FireBullet(laserRay, muzzleString, Time.fixedTime); } if (((EntityState)this).isAuthority && !ShouldFireLaser()) { ((EntityState)this).outer.SetNextState(GetNextState()); } } } protected Vector3 GetBeamEndPoint() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_002b: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0059: Unknown result type (might be due to invalid IL or missing references) Vector3 point = ((Ray)(ref laserRay)).GetPoint(maxDistance); RaycastHit val = default(RaycastHit); if (Util.CharacterRaycast(((EntityState)this).gameObject, laserRay, ref val, maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { point = ((RaycastHit)(ref val)).point; } return point; } protected virtual EntityState GetNextState() { return EntityStateCatalog.InstantiateState(ref ((EntityState)this).outer.mainStateType); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public virtual bool ShouldFireLaser() { if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { return ((EntityState)this).inputBank.skill1.down; } return false; } public virtual Ray GetLaserRay() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return ((BaseState)this).GetAimRay(); } private void FireBullet(Ray laserRay, string targetMuzzle, float time) { //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) previousRaycastHitPoint = newestRaycastHitPoint; RaycastHit val = default(RaycastHit); if (((EntityState)this).isAuthority) { if (bulletAttack == null) { bulletAttack = new BulletAttack(); } bulletAttack.owner = ((EntityState)this).gameObject; bulletAttack.weapon = ((EntityState)this).gameObject; bulletAttack.origin = ((Ray)(ref laserRay)).origin; bulletAttack.aimVector = ((Ray)(ref laserRay)).direction; bulletAttack.minSpread = minSpread; bulletAttack.maxSpread = maxSpread; bulletAttack.bulletCount = 1u; bulletAttack.damage = damageCoefficient * base.damageStat + base.attackSpeedStat; bulletAttack.procCoefficient = procCoefficient; bulletAttack.force = force; bulletAttack.muzzleName = targetMuzzle; bulletAttack.hitEffectPrefab = null; bulletAttack.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); bulletAttack.HitEffectNormal = false; bulletAttack.radius = 0f; bulletAttack.maxDistance = maxDistance; bulletAttack.hitCallback = hitCallback; bulletAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)0); bulletAttack.damageType.damageSource = (DamageSource)1; DamageAPI.AddModdedDamageType(bulletAttack, AcanthiBleeding.Acanthi_ButHeresTheBleeder); bulletAttack.Fire(); newestRaycastHitPoint = bulletEndPos; bulletEndPos = null; } else if (Object.op_Implicit((Object)(object)laserVfxInstanceEndTransform) && Util.CharacterRaycast(((EntityState)this).gameObject, laserRay, ref val, maxDistance, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { newestRaycastHitPoint = ((RaycastHit)(ref val)).point; } if (!newestRaycastHitPoint.HasValue) { newestRaycastHitPoint = ((Ray)(ref laserRay)).GetPoint(maxDistance); } vfxLerpHelper.Push(time + Time.fixedDeltaTime); } public FireAcanthiBeam() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown hitCallback = new HitCallback(OnBulletHitAuthority); } private bool OnBulletHitAuthority(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) bool result = BulletAttack.defaultHitCallback.Invoke(bulletAttack, ref hitInfo); bulletEndPos = (Vector3)(((??)bulletEndPos) ?? hitInfo.point); return result; } } public class ChargeBorboLaser : BaseState { public static float baseDuration = 2.5f; public static float laserMaxWidth = 0.2f; public static GameObject effectPrefabObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/Skills/ChargeBorbo.prefab"); public static GameObject laserPrefabObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/Skills/LaserBorbo.prefab"); public static GameObject effectPrefab = effectPrefabObject; public static GameObject laserPrefab = laserPrefabObject; public static string attackSoundString = "Play_Borbo_Laser_Charge"; private float duration; private uint chargePlayID; private GameObject chargeEffect; private GameObject laserEffect; private LineRenderer laserLineComponent; private Vector3 laserDirection; private Vector3 visualEndPosition; private float flashTimer; private bool laserOn; protected EffectManagerHelper _efh_Charge; private static int ChargeLaserStateHash = Animator.StringToHash("ChargeLaser"); private static int ChargeLaserParamHash = Animator.StringToHash("ChargeLaser.playbackRate"); public override void Reset() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: 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) ((BaseState)this).Reset(); duration = 0f; chargePlayID = 0u; chargeEffect = null; laserLineComponent = null; laserDirection = Vector3.zero; visualEndPosition = Vector3.zero; flashTimer = 0f; laserOn = false; _efh_Charge = null; } public override void OnEnter() { //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); ((EntityState)this).SetAIUpdateFrequency(true); duration = baseDuration; Transform modelTransform = ((EntityState)this).GetModelTransform(); chargePlayID = Util.PlayAttackSpeedSound(attackSoundString, ((EntityState)this).gameObject, base.attackSpeedStat); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("Muzzle"); if (Object.op_Implicit((Object)(object)val)) { if (Object.op_Implicit((Object)(object)effectPrefab)) { if (!EffectManager.ShouldUsePooledEffect(effectPrefab)) { chargeEffect = Object.Instantiate(effectPrefab, val.position, val.rotation); } else { _efh_Charge = EffectManager.GetAndActivatePooledEffect(effectPrefab, val.position, val.rotation); chargeEffect = ((Component)_efh_Charge).gameObject; } chargeEffect.transform.parent = val; ScaleParticleSystemDuration component2 = chargeEffect.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = duration; } } if (Object.op_Implicit((Object)(object)laserPrefab) && (Object)(object)laserEffect == (Object)null) { laserEffect = Object.Instantiate(laserPrefab, val.position, val.rotation); } if ((Object)(object)laserEffect != (Object)null) { if (!laserEffect.activeInHierarchy) { laserEffect.SetActive(true); } if ((Object)(object)laserEffect.transform.parent != (Object)(object)val) { laserEffect.transform.parent = val; } laserLineComponent = laserEffect.GetComponent(); } } } } ((EntityState)this).PlayAnimation("Gesture", ChargeLaserStateHash, ChargeLaserParamHash, duration); flashTimer = 0f; laserOn = true; } public override void OnExit() { AkSoundEngine.StopPlayingID(chargePlayID); ((EntityState)this).OnExit(); ((EntityState)this).SetAIUpdateFrequency(false); if (Object.op_Implicit((Object)(object)chargeEffect)) { if (!EffectManager.UsePools) { EntityState.Destroy((Object)(object)chargeEffect); } else if ((Object)(object)_efh_Charge != (Object)null && _efh_Charge.OwningPool != null) { if (!((PrefabComponentPool)(object)_efh_Charge.OwningPool).IsObjectInPool(_efh_Charge)) { ((GenericPool)(object)_efh_Charge.OwningPool).ReturnObject(_efh_Charge); } } else { _ = (Object)(object)_efh_Charge != (Object)null; EntityState.Destroy((Object)(object)chargeEffect); } } if (Object.op_Implicit((Object)(object)laserEffect) && laserEffect.activeInHierarchy) { laserEffect.SetActive(false); } } public override void Update() { //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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); if (!Object.op_Implicit((Object)(object)laserEffect) || !Object.op_Implicit((Object)(object)laserLineComponent)) { return; } float num = 1000f; Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 position = laserEffect.transform.parent.position; Vector3 point = ((Ray)(ref aimRay)).GetPoint(num); laserDirection = point - position; RaycastHit val = default(RaycastHit); if (Physics.Raycast(aimRay, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask))) { point = ((RaycastHit)(ref val)).point; } laserLineComponent.SetPosition(0, position); laserLineComponent.SetPosition(1, point); float num2; if (duration - ((EntityState)this).age > 0.5f) { num2 = ((EntityState)this).age / duration; } else { flashTimer -= Time.deltaTime; if (flashTimer <= 0f) { laserOn = !laserOn; flashTimer = 1f / 30f; } num2 = (laserOn ? 1f : 0f); } num2 *= laserMaxWidth; laserLineComponent.startWidth = num2; laserLineComponent.endWidth = num2; } public override void FixedUpdate() { //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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireBorboLaser fireBorboLaser = new FireBorboLaser(); fireBorboLaser.laserDirection = laserDirection; ((EntityState)this).outer.SetNextState((EntityState)(object)fireBorboLaser); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireBorboLaser : BaseState { public GameObject effectPrefab = Content.effectPrefabObject; public GameObject hitEffectPrefab = Content.hitEffectPrefabObject; public GameObject tracerEffectPrefab = Content.tracerEffectPrefabObject; public static Component TracerWaow; public static float damageCoefficient = 15f; public static float blastRadius = 8f; public static float force = 5000f; public static float minSpread = 0f; public static float maxSpread = 0f; public static int bulletCount = 1; public static float baseDuration = 5f; public static string attackSoundString = "Play_Borbo_Laser_Fire"; public static string attackFoleySoundString = "Play_Borbo_Laser_Overheat"; public Vector3 laserDirection; public float selfKnockbackForce = 10f; private float duration; private Ray modifiedAimRay; private static int FireLaserStateHash = Animator.StringToHash("FireLaser"); private static int FireLaserParamHash = Animator.StringToHash("FireLaser.playbackRate"); public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_023b: 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_0241: 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_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Expected O, but got Unknown ((BaseState)this).OnEnter(); if (!Object.op_Implicit((Object)(object)tracerEffectPrefab.GetComponent())) { tracerEffectPrefab.AddComponent(); } duration = baseDuration; modifiedAimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref modifiedAimRay)).direction = laserDirection; ((EntityState)this).GetModelAnimator(); ((EntityState)this).characterBody.characterMotor.ApplyForce((0f - selfKnockbackForce) * laserDirection, false, false); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Util.PlaySound(attackFoleySoundString, ((EntityState)this).gameObject); string text = "Muzzle"; ((EntityState)this).PlayAnimation("Gesture", FireLaserStateHash, FireLaserParamHash, duration); if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (!((EntityState)this).isAuthority) { return; } float num = 1000f; Vector3 val = ((Ray)(ref modifiedAimRay)).origin + ((Ray)(ref modifiedAimRay)).direction * num; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(modifiedAimRay, ref val2, num, LayerMask.op_Implicit(CommonMasks.laser))) { val = ((RaycastHit)(ref val2)).point; } BlastAttack val3 = new BlastAttack { attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject), baseDamage = base.damageStat * damageCoefficient * Math.Clamp(base.attackSpeedStat / 2f, 1f, 69420f), baseForce = force * 0.2f, position = val, radius = blastRadius, falloffModel = (FalloffModel)2, bonusForce = force * ((Ray)(ref modifiedAimRay)).direction, damageType = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)0), (DamageTypeExtended)0, (DamageSource)1) }; DamageAPI.AddModdedDamageType(val3, SnowtimeToyboxMod.BorboSuperDebuffOnHit); val3.Fire(); _ = ((Ray)(ref modifiedAimRay)).origin; if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { int num2 = component.FindChildIndex(text); if (Object.op_Implicit((Object)(object)tracerEffectPrefab)) { EffectData val4 = new EffectData { origin = val, start = ((Ray)(ref modifiedAimRay)).origin }; val4.SetChildLocatorTransformReference(((EntityState)this).gameObject, num2); EffectManager.SpawnEffect(tracerEffectPrefab, val4, true); EffectManager.SpawnEffect(hitEffectPrefab, val4, true); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class FireBreadBeam : BaseState { private struct LerpHelper { private float startTime; private float endTime; private float invTimeSpan; private float timeSpan; private bool hasStartTime; private bool hasEndTime; public void Push(float currentTime) { startTime = endTime; endTime = currentTime; hasStartTime = hasEndTime; hasEndTime = true; float num = endTime - startTime; if (hasStartTime && num != timeSpan) { timeSpan = num; invTimeSpan = 0.5f / timeSpan; } } public readonly float CalcLerpValue(float currentTime) { if (hasStartTime) { return (currentTime - startTime) * invTimeSpan; } return 0.5f; } } public static float baseDuration = 0.5f; public static GameObject healBeamPrefab = BreadFriendlyTurret.FriendlyTurretBreadBeamL; public static GameObject healBeamPrefabR = BreadFriendlyTurret.FriendlyTurretBreadBeamR; public HurtBox target; private float duration; private Transform modelTransform; private EffectManagerHelper _emh_laserEffect; private EffectManagerHelper _emh_laserEffect2; private GameObject laserVfxInstance; private GameObject laserVfxInstance2; private Transform laserVfxInstanceStartTransform; private Transform laserVfxInstanceStartTransform2; private Transform laserVfxInstanceEndTransform; private Transform laserVfxInstanceEndTransform2; private LerpHelper vfxLerpHelper; private Ray laserRay; private Vector3? newestRaycastHitPoint; private Vector3? previousRaycastHitPoint; private Transform muzzleL; private Transform muzzleR; private ChildLocator childLocator; protected ref ButtonState skillButtonState => ref ((EntityState)this).inputBank.skill1; public override void Reset() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) Log.Debug("redsrt"); ((BaseState)this).Reset(); modelTransform = null; laserVfxInstance = null; laserVfxInstance2 = null; laserVfxInstanceEndTransform = null; laserVfxInstanceEndTransform2 = null; laserRay = default(Ray); vfxLerpHelper = default(LerpHelper); _emh_laserEffect = null; _emh_laserEffect2 = null; } public override void OnEnter() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_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_0208: 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_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; modelTransform = ((EntityState)this).GetModelTransform(); if (!Object.op_Implicit((Object)(object)modelTransform)) { return; } childLocator = ((Component)modelTransform).GetComponent(); if (!Object.op_Implicit((Object)(object)childLocator)) { return; } muzzleL = childLocator.FindChild("Muzzle_L"); muzzleR = childLocator.FindChild("Muzzle_R"); Ray aimRay = ((BaseState)this).GetAimRay(); BullseyeSearch val = new BullseyeSearch(); val.teamMaskFilter = TeamMask.none; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref val.teamMaskFilter)).AddTeam(((EntityState)this).teamComponent.teamIndex); } val.filterByLoS = false; val.maxDistanceFilter = 50f; val.maxAngleFilter = 180f; val.searchOrigin = ((Ray)(ref aimRay)).origin; val.searchDirection = ((Ray)(ref aimRay)).direction; val.sortMode = (SortMode)2; val.RefreshCandidates(); val.FilterOutGameObject(((EntityState)this).gameObject); target = val.GetResults().FirstOrDefault(); if (!((Object)(object)_emh_laserEffect != (Object)null) && !((Object)(object)_emh_laserEffect2 != (Object)null) && Object.op_Implicit((Object)(object)((EntityState)this).transform) && Object.op_Implicit((Object)(object)healBeamPrefab) && Object.op_Implicit((Object)(object)healBeamPrefabR)) { if (!EffectManager.ShouldUsePooledEffect(healBeamPrefab)) { laserVfxInstance = Object.Instantiate(healBeamPrefab, muzzleL.position, muzzleL.rotation); } else { _emh_laserEffect = EffectManager.GetAndActivatePooledEffect(healBeamPrefab, muzzleL.position, muzzleL.rotation); laserVfxInstance = ((Component)_emh_laserEffect).gameObject; } if (!EffectManager.ShouldUsePooledEffect(healBeamPrefabR)) { laserVfxInstance2 = Object.Instantiate(healBeamPrefabR, muzzleR.position, muzzleR.rotation); } else { _emh_laserEffect2 = EffectManager.GetAndActivatePooledEffect(healBeamPrefabR, muzzleR.position, muzzleR.rotation); laserVfxInstance2 = ((Component)_emh_laserEffect2).gameObject; } if (Object.op_Implicit((Object)(object)laserVfxInstance)) { ChildLocator component = laserVfxInstance.GetComponent(); laserVfxInstanceEndTransform = component.FindChild("LaserEnd"); laserVfxInstanceStartTransform = laserVfxInstance.transform.Find("HealBeamStartPoint"); } if (Object.op_Implicit((Object)(object)laserVfxInstance2)) { ChildLocator component2 = laserVfxInstance2.GetComponent(); laserVfxInstanceEndTransform2 = component2.FindChild("LaserEnd"); laserVfxInstanceStartTransform2 = laserVfxInstance2.transform.Find("HealBeamStartPoint"); } laserVfxInstance.transform.parent = ((EntityState)this).transform; laserVfxInstance2.transform.parent = ((EntityState)this).transform; } } private void UpdateBeamVFX(float time) { //IL_007a: 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) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) GameObject obj = UnityObjectExtensions.AsValidOrNull(laserVfxInstance); if (obj != null) { obj.SetActive(newestRaycastHitPoint.HasValue); } GameObject obj2 = UnityObjectExtensions.AsValidOrNull(laserVfxInstance2); if (obj2 != null) { obj2.SetActive(newestRaycastHitPoint.HasValue); } if (Object.op_Implicit((Object)(object)laserVfxInstanceEndTransform) && Object.op_Implicit((Object)(object)laserVfxInstanceEndTransform2) && newestRaycastHitPoint.HasValue) { laserVfxInstanceEndTransform.position = ((Component)target).transform.position; laserVfxInstanceEndTransform2.position = ((Component)target).transform.position; laserVfxInstanceStartTransform.position = muzzleL.position; laserVfxInstanceStartTransform2.position = muzzleR.position; } } private void UpdateEndPoint(Ray laserRay) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) previousRaycastHitPoint = newestRaycastHitPoint; if (Object.op_Implicit((Object)(object)target)) { newestRaycastHitPoint = ((Component)target).transform.position; } vfxLerpHelper.Push(0.01f + Time.fixedDeltaTime); } public override void FixedUpdate() { //IL_0101: 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) ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration || !Object.op_Implicit((Object)(object)target)) { _ = ((EntityState)this).isAuthority; } if (((EntityState)this).isAuthority && !skillButtonState.down) { ((EntityState)this).outer.SetNextStateToMain(); } if (!Object.op_Implicit((Object)(object)((EntityState)this).transform) || !Object.op_Implicit((Object)(object)target) || !Object.op_Implicit((Object)(object)target) || !Object.op_Implicit((Object)(object)target?.healthComponent) || !Object.op_Implicit((Object)(object)target?.healthComponent?.body)) { return; } CharacterBody body = target.healthComponent.body; if (body.HasBuff(BreadFriendlyTurret.BreadTurretBuffFortune) && NetworkServer.active) { foreach (TimedBuff timedBuff in target.healthComponent.body.timedBuffs) { if (timedBuff.buffIndex == BreadFriendlyTurret.BreadTurretBuffFortune.buffIndex) { timedBuff.timer = 0.5f; } } return; } if (NetworkServer.active) { body.AddTimedBuff(BreadFriendlyTurret.BreadTurretBuffFortune, 0.5f); } } public override void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); UpdateEndPoint(laserRay); UpdateBeamVFX(Time.time); } public override void OnExit() { if (Object.op_Implicit((Object)(object)laserVfxInstance)) { if ((Object)(object)_emh_laserEffect != (Object)null && _emh_laserEffect.OwningPool != null) { ((GenericPool)(object)_emh_laserEffect.OwningPool).ReturnObject(_emh_laserEffect); ((GenericPool)(object)_emh_laserEffect2.OwningPool).ReturnObject(_emh_laserEffect2); } else { EntityState.Destroy((Object)(object)laserVfxInstance); EntityState.Destroy((Object)(object)laserVfxInstance2); } } laserVfxInstance = null; laserVfxInstance2 = null; laserVfxInstanceEndTransform = null; laserVfxInstanceEndTransform2 = null; _emh_laserEffect = null; _emh_laserEffect2 = null; ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void OnSerialize(NetworkWriter writer) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnSerialize(writer); HurtBoxReference val = HurtBoxReference.FromHurtBox(target); ((HurtBoxReference)(ref val)).Write(writer); } public override void OnDeserialize(NetworkReader reader) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnDeserialize(reader); HurtBoxReference val = default(HurtBoxReference); ((HurtBoxReference)(ref val)).Read(reader); GameObject obj = ((HurtBoxReference)(ref val)).ResolveGameObject(); target = ((obj != null) ? obj.GetComponent() : null); } } public class Shenanigans : BaseSkillState { public static float hopPower = 7f; public static string playtimeSoundString = "Play_Item_FriendUnit_VO_Whistle"; public static string stopSoundString = "Play_Item_FriendUnit_VO_Happy"; public static float baseDuration = 2f; public static float timeBetweenHops = 0.2f; private float hopTimer; private uint soundID; public override void OnEnter() { ((BaseState)this).OnEnter(); hopTimer = 0f; soundID = Util.PlaySound(playtimeSoundString, ((Component)((EntityState)this).outer).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (hopTimer > 0f) { hopTimer -= Time.deltaTime; } if (((EntityState)this).characterMotor.isGrounded && hopTimer <= 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopPower); hopTimer += timeBetweenHops; } if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority()) { AkSoundEngine.StopPlayingID(soundID); Util.PlaySound(stopSoundString, ((Component)((EntityState)this).outer).gameObject); ((EntityState)this).outer.SetNextStateToMain(); } } } public class ShortcakeTaunt : BaseState { public static GameObject effectPrefab; public static GameObject hitEffectPrefab; public static GameObject tracerEffectPrefab; public static float damageCoefficient = 0.7f; public static float radius = 45f; public static float baseDuration = 2f; private float duration; private int max = 999; public override void OnEnter() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); if (!SnowtimeToyboxMod.FriendlyTurretShortcakeAggroType.Value) { ((EntityState)this).characterBody.AddTimedBuff(AggroToolsPlugin.priorityAggro, 0.5f); } duration = baseDuration / base.attackSpeedStat; TeamIndex teamIndex = ((EntityState)this).gameObject.GetComponent().teamIndex; HurtBox[] hurtBoxes = new SphereSearch { origin = ((EntityState)this).characterBody.corePosition, radius = radius, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); if (((EntityState)this).isAuthority) { for (int i = 0; i < Mathf.Min(max, hurtBoxes.Length); i++) { SnowtimeOrbs snowtimeOrbs = new SnowtimeOrbs(); snowtimeOrbs.attacker = ((EntityState)this).gameObject; snowtimeOrbs.speed = 300f; snowtimeOrbs.damageColorIndex = (DamageColorIndex)0; snowtimeOrbs.damageValue = ((EntityState)this).characterBody.damage * damageCoefficient; snowtimeOrbs.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.ShortcakeTaunt; ((Orb)snowtimeOrbs).origin = ((EntityState)this).characterBody.corePosition; snowtimeOrbs.procCoefficient = 0f; snowtimeOrbs.range = 0f; snowtimeOrbs.teamIndex = teamIndex; ((Orb)snowtimeOrbs).target = hurtBoxes[i]; OrbManager.instance.AddOrb((Orb)(object)snowtimeOrbs); } } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class SnowtimeCryoGaussFire : BaseState { public static GameObject muzzleflashEffectPrefab = Content.muzzleflashEffectObject; public static GameObject projectilePrefab = Content.projectileObject; public static Component TracerWaow; public static float damageCoefficient = 4f; public static float blastRadius = 4f; public static float force = 400f; public static float minSpread = 0f; public static float maxSpread = 0f; public static int bulletCount = 1; public static float baseDuration = 0.9f; public static string attackSoundString = "Play_Snowtime_Gauss"; public Vector3 laserDirection; public float selfKnockbackForce = 1f; private float duration; private Ray modifiedAimRay; private static int FireLaserStateHash = Animator.StringToHash("FireWeapon"); public override void OnEnter() { //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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0183: 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_018a: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref modifiedAimRay)).direction = laserDirection; ((EntityState)this).GetModelAnimator(); ((EntityState)this).characterBody.characterMotor.ApplyForce((0f - selfKnockbackForce) * laserDirection, false, false); ((EntityState)this).GetModelTransform(); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); string text = "Muzzle"; Content.projectileObject.GetComponent().ghostPrefab = Content.projectileGhostObject; ((EntityState)this).PlayAnimation("Gesture", FireLaserStateHash); if (Object.op_Implicit((Object)(object)muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(muzzleflashEffectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { TrajectoryAimAssist.ApplyTrajectoryAimAssist(ref aimRay, projectilePrefab, ((EntityState)this).gameObject, 1f); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)this).gameObject; val.damage = damageCoefficient * (base.damageStat + (base.attackSpeedStat - 1f)); val.force = force; val.crit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val.damageTypeOverride = new DamageTypeCombo(DamageTypeCombo.op_Implicit((DamageType)8), (DamageTypeExtended)131072, (DamageSource)1); FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class TurretlingBlaster : BaseState { public GameObject muzzlefx = Addressables.LoadAssetAsync((object)RoR2_Base_Common_VFX.Muzzleflash1_prefab).WaitForCompletion(); public GameObject effectPrefab; public GameObject hitfx = Addressables.LoadAssetAsync((object)RoR2_Base_Common_VFX.Hitspark1_prefab).WaitForCompletion(); public GameObject hitEffectPrefab; public GameObject tracerfx = Addressables.LoadAssetAsync((object)RoR2_Base_Common_VFX.TracerNoSmoke_prefab).WaitForCompletion(); public GameObject tracerEffectPrefab; public static string attackSoundString = "Play_Turretling_Fire"; public static float damageCoefficient = 1f; public static float procCoefficient = 0.5f; public static float force = 50f; public static float minSpread = 0f; public static float maxSpread = 2f; public static int bulletCount = 1; public static float baseDuration = 2f; public int bulletCountCurrent = 1; private float duration = 1f; private int firecount; private static int FireHash = Animator.StringToHash("turretling_fire"); private static int FireParamHash = Animator.StringToHash("turretling_fire.playbackRate"); private float firingTime; private float refireTime; public override void OnEnter() { ((BaseState)this).OnEnter(); firecount = 0; firingTime = 0f; ((EntityState)this).characterBody.SetAimTimer(0f); duration = baseDuration / base.attackSpeedStat; refireTime = duration / 8f; AttackWaow(); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); firingTime += Time.fixedDeltaTime; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } if (((Object)((EntityState)this).gameObject).name.Contains("Survivor") && firingTime > refireTime && firecount < 3) { AttackWaow(); } } public void AttackWaow() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Expected O, but got Unknown //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) firecount++; firingTime = 0f; Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((EntityState)this).PlayAnimation("Gesture", FireHash, FireParamHash, duration); string text = "Muzzle_Primary"; TurretlingRainbow turretlingRainbow = default(TurretlingRainbow); if (((Object)((EntityState)this).gameObject).name.Contains("Acanthi")) { effectPrefab = Content.muzzlefx_acanthi; hitEffectPrefab = Content.hitfx_acanthi; tracerEffectPrefab = Content.tracerfx_acanthi; } else if (((Object)((EntityState)this).gameObject).name.Contains("Borbo")) { effectPrefab = Content.muzzlefx_borbo; hitEffectPrefab = Content.hitfx_borbo; tracerEffectPrefab = Content.tracerfx_borbo; } else if (((Object)((EntityState)this).gameObject).name.Contains("Bread")) { effectPrefab = muzzlefx; hitEffectPrefab = Content.hitfx_bread; tracerEffectPrefab = tracerfx; } else if (((Object)((EntityState)this).gameObject).name.Contains("Shortcake")) { effectPrefab = Content.muzzlefx_shortcake; hitEffectPrefab = Content.hitfx_shortcake; tracerEffectPrefab = Content.tracerfx_shortcake; } else if (((Object)((EntityState)this).gameObject).name.Contains("Snowtime")) { effectPrefab = Content.muzzlefx_snowtime; hitEffectPrefab = Content.hitfx_snowtime; tracerEffectPrefab = Content.tracerfx_snowtime; } else if (((Component)((EntityState)this).characterBody.master).gameObject.TryGetComponent(ref turretlingRainbow) && turretlingRainbow.turretlingRainbow) { effectPrefab = Content.muzzlefx_rainbow; hitEffectPrefab = Content.hitfx_rainbow; tracerEffectPrefab = Content.tracerfx_rainbow; } else { effectPrefab = muzzlefx; hitEffectPrefab = hitfx; tracerEffectPrefab = tracerfx; } if (Object.op_Implicit((Object)(object)effectPrefab)) { EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false); } if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack(); TurretlingRainbow turretlingRainbow2 = default(TurretlingRainbow); if (((Object)((EntityState)this).gameObject).name.Contains("Snowtime")) { val.minSpread = 0f; val.maxSpread = 4f; val.bulletCount = 15u; val.damage = damageCoefficient / 5f * base.damageStat; val.procCoefficient = procCoefficient / 5f; } else if ((((Component)((EntityState)this).characterBody.master).gameObject.TryGetComponent(ref turretlingRainbow2) && turretlingRainbow2.turretlingRainbow) || ((Object)((EntityState)this).gameObject).name.Contains("Acanthi") || ((Object)((EntityState)this).gameObject).name.Contains("Bread") || ((Object)((EntityState)this).gameObject).name.Contains("Borbo") || ((Object)((EntityState)this).gameObject).name.Contains("Shortcake")) { val.minSpread = minSpread; val.maxSpread = maxSpread / 4f; val.bulletCount = 1u; val.damage = damageCoefficient * 1f * base.damageStat; val.procCoefficient = procCoefficient * 4f; } else if (((Object)((EntityState)this).gameObject).name.Contains("Survivor")) { val.minSpread = minSpread; val.maxSpread = maxSpread / 4f; val.bulletCount = 1u; val.damage = damageCoefficient / 1.25f * base.damageStat; val.procCoefficient = procCoefficient * 4f; } else { val.minSpread = minSpread; val.maxSpread = maxSpread; val.bulletCount = 1u; val.damage = damageCoefficient * base.damageStat; val.procCoefficient = procCoefficient; } val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.force = force; val.tracerEffectPrefab = tracerEffectPrefab; val.muzzleName = text; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val.HitEffectNormal = false; val.radius = 0.15f; val.damageType.damageSource = (DamageSource)1; val.Fire(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class TurretlingBlasterScepter : BaseState { public static GameObject hitfx_kinetic = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Hitspark__Prismatic_Kinetic.prefab"); public static GameObject hitfx_corrosive = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Hitspark__Prismatic_Corrosive.prefab"); public static GameObject hitfx_energy = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Hitspark__Prismatic_Energy.prefab"); public static GameObject tracerfx_kinetic = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Tracer__Prismatic_Kinetic.prefab"); public static GameObject tracerfx_corrosive = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Tracer__Prismatic_Corrosive.prefab"); public static GameObject tracerfx_energy = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Tracer__Prismatic_Energy.prefab"); public static GameObject muzzlefx_kinetic = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Muzzleflash__Prismatic_Kinetic.prefab"); public static GameObject muzzlefx_corrosive = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Muzzleflash__Prismatic_Corrosive.prefab"); public static GameObject muzzlefx_energy = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/vfx_Muzzleflash__Prismatic_Energy.prefab"); public static string attackSoundString = "Play_TurretlingScepter_Fire"; public static float damageCoefficient = 1f; public static float procCoefficient = 0.5f; public static float force = 50f; public static float minSpread = 0f; public static float maxSpread = 2f; public static int bulletCount = 1; public int bulletCountCurrent = 1; private float duration = 1f; private static int FireHash = Animator.StringToHash("turretling_fire"); private static int FireParamHash = Animator.StringToHash("turretling_fire.playbackRate"); public override void OnEnter() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown //IL_011d: 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_012a: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).StartAimMode(aimRay, 2f, false); ((EntityState)this).PlayAnimation("Gesture", FireHash, FireParamHash, duration); string text = "Muzzle_Primary"; EffectManager.SimpleMuzzleFlash(muzzlefx_kinetic, ((EntityState)this).gameObject, text, false); EffectManager.SimpleMuzzleFlash(muzzlefx_corrosive, ((EntityState)this).gameObject, text, false); EffectManager.SimpleMuzzleFlash(muzzlefx_energy, ((EntityState)this).gameObject, text, false); if (((EntityState)this).isAuthority) { BulletAttack val = new BulletAttack(); BulletAttack val2 = new BulletAttack(); BulletAttack val3 = new BulletAttack(); val.minSpread = 0f; val.maxSpread = 3f; val.bulletCount = 3u; val.damage = damageCoefficient / 1.5f * (base.damageStat * Mathf.Clamp(base.attackSpeedStat - 2.5f, 1f, 9999f)); val.procCoefficient = procCoefficient / 3f; val.owner = ((EntityState)this).gameObject; val.weapon = ((EntityState)this).gameObject; val.origin = ((Ray)(ref aimRay)).origin; val.aimVector = ((Ray)(ref aimRay)).direction; val.force = force; val.muzzleName = text; val.hitEffectPrefab = hitfx_kinetic; val.tracerEffectPrefab = tracerfx_kinetic; val.damageColorIndex = Content.BlasterScepterColor1; val.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val.HitEffectNormal = false; val.radius = 0.15f; val.damageType.damageSource = (DamageSource)1; val.falloffModel = (FalloffModel)0; val.damageType = DamageTypeCombo.op_Implicit((DamageType)2); val2.minSpread = 0f; val2.maxSpread = 3f; val2.bulletCount = 3u; val2.damage = damageCoefficient / 1.5f * (base.damageStat * Mathf.Clamp(base.attackSpeedStat - 2.5f, 1f, 9999f)); val2.procCoefficient = procCoefficient / 3f; val2.owner = ((EntityState)this).gameObject; val2.weapon = ((EntityState)this).gameObject; val2.origin = ((Ray)(ref aimRay)).origin; val2.aimVector = ((Ray)(ref aimRay)).direction; val2.force = force; val2.muzzleName = text; val2.hitEffectPrefab = hitfx_corrosive; val2.tracerEffectPrefab = tracerfx_corrosive; val2.damageColorIndex = Content.BlasterScepterColor2; val2.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val2.HitEffectNormal = false; val2.radius = 0.15f; val2.damageType.damageSource = (DamageSource)1; val2.damageType = DamageTypeCombo.op_Implicit((DamageType)4096); val3.minSpread = 0f; val3.maxSpread = 3f; val3.bulletCount = 3u; val3.damage = damageCoefficient / 1.5f * (base.damageStat * Mathf.Clamp(base.attackSpeedStat - 2.5f, 1f, 9999f)); val3.procCoefficient = procCoefficient / 3f; val3.owner = ((EntityState)this).gameObject; val3.weapon = ((EntityState)this).gameObject; val3.origin = ((Ray)(ref aimRay)).origin; val3.aimVector = ((Ray)(ref aimRay)).direction; val3.force = force; val3.muzzleName = text; val3.hitEffectPrefab = hitfx_energy; val3.tracerEffectPrefab = tracerfx_energy; val3.damageColorIndex = Content.BlasterScepterColor3; val3.isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); val3.HitEffectNormal = false; val3.radius = 0.15f; val3.damageType.damageSource = (DamageSource)1; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)4194304); val.Fire(); val2.Fire(); val3.Fire(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class TurretlingMiniBlinkState : BlinkState { public SwarmPlayerSwarmlingTracker swarmlingTracker; public List Swarmlings = new List(); public override void OnEnter() { base.duration = 0.08f; base.speedCoefficient = 13f; base.beginSoundString = "Play_huntress_shift_mini_blink"; base.endSoundString = "Play_huntress_shift_end"; ((BlinkState)this).OnEnter(); } public override void OnExit() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (!((EntityState)this).isAuthority) { Log.Debug("wasnt authority when tried to blink !! nuh uh .,,. "); } Log.Debug("1"); swarmlingTracker = ((EntityState)this).gameObject.GetComponent(); Swarmlings = swarmlingTracker.GetSwarmlingBodies(); Log.Debug("2"); swarmlingTracker.teleportSwarmling(((EntityState)this).gameObject.transform.position); ((BlinkState)this).OnExit(); } public override Vector3 GetBlinkVector() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_0032: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); return ((Vector3)(ref val)).normalized; } } public class TurretlingDeath : GenericCharacterDeath { public static float deathDelay; public GameObject deathEffectPrefab = Content.deathfx; private bool hasDied; public override void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).FixedUpdate(); if (((EntityState)this).fixedAge > deathDelay && !hasDied) { hasDied = true; ((GenericCharacterDeath)this).DestroyModel(); EffectManager.SimpleImpactEffect(deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false); if (NetworkServer.active) { ((GenericCharacterDeath)this).DestroyBodyAsapServer(); } } } public override void OnExit() { ((GenericCharacterDeath)this).DestroyModel(); ((GenericCharacterDeath)this).OnExit(); } } public class DTTurretlingDeath : GenericCharacterDeath { [SerializeField] public float deathDuration = 1f; private GameObject OwnerObject; public static float deathDelay; public GameObject deathEffectPrefab = Content.deathfx; private bool hasDied; public override void OnEnter() { //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) ((GenericCharacterDeath)this).OnEnter(); CharacterMaster master = ((EntityState)this).characterBody.master; object obj; if (master == null) { obj = null; } else { MinionOwnership minionOwnership = master.minionOwnership; obj = ((minionOwnership != null) ? minionOwnership.ownerMaster : null); } if (Object.op_Implicit((Object)obj)) { CharacterBody body = ((EntityState)this).characterBody.master.minionOwnership.ownerMaster.GetBody(); OwnerObject = (Object.op_Implicit((Object)(object)body) ? ((Component)body).gameObject : null); } EffectManager.SimpleImpactEffect(deathEffectPrefab, ((EntityState)this).characterBody.corePosition, Vector3.up, false); } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > deathDuration) { Explode(); } DroneTechRepairQueue val = default(DroneTechRepairQueue); DroneRepairMaster repairMaster = default(DroneRepairMaster); if (!Object.op_Implicit((Object)(object)OwnerObject) || !OwnerObject.TryGetComponent(ref val)) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).characterBody.master).gameObject); } } else if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && ((Component)((EntityState)this).characterBody.master).TryGetComponent(ref repairMaster)) { ProcessDeath(repairMaster, ((EntityState)this).characterBody.master); } } public void Explode() { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); DroneTechRepairQueue val = default(DroneTechRepairQueue); if ((!Object.op_Implicit((Object)(object)OwnerObject) || !OwnerObject.TryGetComponent(ref val)) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master)) { EntityState.Destroy((Object)(object)((Component)((EntityState)this).characterBody.master).gameObject); } } private void ProcessDeath(DroneRepairMaster repairMaster, CharacterMaster droneMaster) { if (!repairMaster.DoNotRepair) { repairMaster.RespawnBrokenBody(); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } public class TurretlingGrenadeLauncher : GenericProjectileBaseState { private static int FireHash = Animator.StringToHash("turretling_fire"); private static int FireParamHash = Animator.StringToHash("turretling_fire.playbackRate"); public float myHue; public override void OnEnter() { //IL_011a: Unknown result type (might be due to invalid IL or missing references) base.duration = 1.5f / ((BaseState)this).attackSpeedStat; base.damageCoefficient = 3f; base.force = 0f; base.projectilePitchBonus = -2f; if (((Object)((EntityState)this).gameObject).name.Contains("Survivor") || ((Object)((EntityState)this).gameObject).name.Contains("PlayerMaster")) { base.projectilePrefab = Content.grenadePlayerObject; } else { base.projectilePrefab = Content.grenadeObject; } base.targetMuzzle = "Muzzle_Primary"; base.attackSoundString = "Play_DemoTF2_GL"; ((GenericProjectileBaseState)this).OnEnter(); base.stopwatch = 0f; base.delayBeforeFiringProjectile = base.baseDelayBeforeFiringProjectile / ((BaseState)this).attackSpeedStat; ((GenericProjectileBaseState)this).PlayAnimation(base.duration); base.minSpread = 0f; base.maxSpread = 0.5f; Inventory inventory = ((EntityState)this).characterBody.inventory; int itemCountEffective = inventory.GetItemCountEffective(Items.MoreMissile); if (itemCountEffective != 0) { ((GenericProjectileBaseState)this).FireProjectile(); base.minSpread = 0.5f; base.maxSpread = 1.25f; } if (SnowtimeToyboxMod.scepterLoaded && inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("ITEM_ANCIENT_SCEPTER")) != 0) { base.minSpread = 0.75f; base.maxSpread = 1.5f; ((GenericProjectileBaseState)this).FireProjectile(); if (itemCountEffective != 0) { base.minSpread = 1f; base.maxSpread = 2f; ((GenericProjectileBaseState)this).FireProjectile(); } } } public override void PlayAnimation(float duration) { if (Object.op_Implicit((Object)(object)((EntityState)this).GetModelAnimator())) { ((EntityState)this).PlayAnimation("Gesture", FireHash, FireParamHash, duration); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } public override void ModifyProjectileInfo(ref FireProjectileInfo fireProjectileInfo) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ((GenericProjectileBaseState)this).ModifyProjectileInfo(ref fireProjectileInfo); fireProjectileInfo.damageTypeOverride = DamageTypeCombo.GenericSpecial; } } public class DTTurretlingRainbowize : BaseState { public float baseDuration = 5f; private float duration; private TurretlingRainbow rainbowComponent; public override void OnEnter() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); duration = baseDuration; if (((Component)((EntityState)this).characterBody.master).TryGetComponent(ref rainbowComponent) && NetworkServer.active) { rainbowComponent.DTRainbowize(enterExit: true); } else { Log.Debug("rainbow null !! "); } if (!((Object)((EntityState)this).gameObject).name.Contains("RemoteOp")) { ((Component)((EntityState)this).characterBody).GetComponent().droneState = (DroneState)0; } } public override void OnExit() { ((EntityState)this).OnExit(); if ((Object)(object)rainbowComponent != (Object)null && NetworkServer.active) { Log.Debug("setting dt rainbow false !!"); rainbowComponent.DTRainbowize(enterExit: false); } else { Log.Debug("rainbow null !! exit"); } } public override void FixedUpdate() { //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (((Object)((EntityState)this).gameObject).name.Contains("RemoteOp") || ((Object)((EntityState)this).gameObject).name.Contains("_Holy") || ((Object)((EntityState)this).gameObject).name.Contains("PlayerMaster")) { ((EntityState)this).outer.SetNextStateToMain(); } else if (((EntityState)this).fixedAge > duration && ((EntityState)this).isAuthority) { ((Component)((EntityState)this).characterBody).GetComponent().droneState = (DroneState)0; ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } public class TurretlingMissile : BaseState { public float orbDamageCoefficient = 4f; public float orbProcCoefficient = 1f; public string muzzleString = "Muzzle_Secondary"; public float baseDuration = 0.4f; private float duration; protected bool isCrit; private HurtBox initialOrbTarget; private ChildLocator childLocator; private Animator animator; private static int fireMissileHash = Animator.StringToHash("turretling_missile_fire"); private static int fireMissileParamHash = Animator.StringToHash("turretling_missile_fire.playbackRate"); private float firingTime; private float refireTime; private int missilesFired; private bool missileCheckPassed; public override void OnEnter() { ((BaseState)this).OnEnter(); TurretlingMissileTracker turretlingMissileTracker = default(TurretlingMissileTracker); if (!((EntityState)this).TryGetComponent(ref turretlingMissileTracker)) { return; } if (((EntityState)this).isAuthority) { initialOrbTarget = turretlingMissileTracker?.GetTrackingTarget(); } if ((Object)(object)initialOrbTarget == (Object)null && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); return; } Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); animator = ((Component)modelTransform).GetComponent(); } missileCheckPassed = true; if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) && ((EntityState)this).characterBody.inventory.GetItemCountEffective(Items.IncreasePrimaryDamage) > 0) { ((EntityState)this).characterBody.AddIncreasePrimaryDamageStack(); } ((EntityState)this).skillLocator.secondary.RemoveAllStocks(); firingTime = 0f; missilesFired = 0; duration = baseDuration; refireTime = duration / 4f; isCrit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); _ = ((EntityState)this).characterBody.inventory; FireOrbMissile(); } public override void OnExit() { ((EntityState)this).OnExit(); } private void FireOrbMissile() { //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_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { missilesFired++; firingTime = 0f; SnowtimeOrbs snowtimeOrbs = new SnowtimeOrbs(); TurretlingRainbow turretlingRainbow = default(TurretlingRainbow); if (((Object)((EntityState)this).gameObject).name.Contains("Acanthi")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Acanthi; } else if (((Object)((EntityState)this).gameObject).name.Contains("Borbo")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Borbo; } else if (((Object)((EntityState)this).gameObject).name.Contains("Bread")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Bread; } else if (((Object)((EntityState)this).gameObject).name.Contains("Shortcake")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Shortcake; } else if (((Object)((EntityState)this).gameObject).name.Contains("Snowtime")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Snowtime; } else if (((Object)((EntityState)this).gameObject).name.Contains("Survivor") || ((Object)((EntityState)this).gameObject).name.Contains("PlayerMaster")) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Player; } else if (((Component)((EntityState)this).characterBody.master).gameObject.TryGetComponent(ref turretlingRainbow) && turretlingRainbow.turretlingRainbow) { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile_Rainbow; } else { snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.TurretlingMissile; } snowtimeOrbs.isCrit = isCrit; snowtimeOrbs.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject); snowtimeOrbs.damageValue = ((EntityState)this).characterBody.damage * (orbDamageCoefficient + (float)((EntityState)this).skillLocator.secondary.bonusStockFromBody + (float)((EntityState)this).skillLocator.secondary.bonusStockFromBody) * Mathf.Clamp((base.attackSpeedStat - 2.5f) / 2f, 1f, 9999f); snowtimeOrbs.attacker = ((EntityState)this).gameObject; snowtimeOrbs.procCoefficient = (((Object)((EntityState)this).gameObject).name.Contains("Survivor") ? orbProcCoefficient : (orbProcCoefficient / 2f)); snowtimeOrbs.damageType.damageSource = (DamageSource)2; HurtBox val = initialOrbTarget; if (Object.op_Implicit((Object)(object)val)) { Transform val2 = childLocator.FindChild(muzzleString); ((Orb)snowtimeOrbs).origin = val2.position; ((Orb)snowtimeOrbs).target = val; OrbManager.instance.AddOrb((Orb)(object)snowtimeOrbs); ((EntityState)this).PlayAnimation("Gesture", fireMissileHash, fireMissileParamHash, duration); } } } public override void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); firingTime += Time.fixedDeltaTime; Inventory inventory = ((EntityState)this).characterBody.inventory; int itemCountEffective = inventory.GetItemCountEffective(Items.MoreMissile); int itemCountEffective2 = inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("RainbowizerPowerUp")); if ((itemCountEffective > 0 || (itemCountEffective2 > 0 && RainbowizerPowerup.AdditionalMissiles.Value)) && firingTime > refireTime && missilesFired < 4) { FireOrbMissile(); } if (((EntityState)this).fixedAge > duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) NetworkExtensions.Write(writer, HurtBoxReference.FromHurtBox(initialOrbTarget)); } public override void OnDeserialize(NetworkReader reader) { //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) HurtBoxReference val = NetworkExtensions.ReadHurtBoxReference(reader); initialOrbTarget = ((HurtBoxReference)(ref val)).ResolveHurtBox(); } } public class TurretlingEnergyNova : BaseState { public static GameObject novaPrefab = Content.novafx; public static string attackSoundString = "Play_Turretling_Nova"; public static float damageCoefficient = 3f; public static float force = 50f; public static float minSpread = 0f; public static float maxSpread = 2f; public static int bulletCount = 1; public static float radius = 15f; public static float newrad; public static float baseDuration = 0.4f; public int bulletCountCurrent = 1; private float duration = 1f; public float additionalStocks; public override void OnEnter() { //IL_00c9: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: 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) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_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_024b: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_0163: Expected O, but got Unknown ((BaseState)this).OnEnter(); if (((Object)((EntityState)this).gameObject).name.Contains("Survivor")) { attackSoundString = "Play_Turretling_Nova_Player"; } ((EntityState)this).characterBody.SetAimTimer(0f); duration = baseDuration; additionalStocks = ((EntityState)this).skillLocator.special.bonusStockFromBody; newrad = Mathf.Clamp(radius + additionalStocks * 2f, 15f, 30f); Log.Debug("Nova Original Radius: " + radius + "... Now it is: " + newrad); ((EntityState)this).skillLocator.special.RemoveAllStocks(); Util.PlaySound(attackSoundString, ((EntityState)this).gameObject); ((BaseState)this).GetAimRay(); TeamIndex teamIndex = ((EntityState)this).gameObject.GetComponent().teamIndex; Transform transform = ((Component)((EntityState)this).modelLocator.modelChildLocator.FindChild("HeadCenter")).transform; BuffDef immune = Buffs.Immune; if (!((BaseState)this).HasBuff(immune.buffIndex)) { ((EntityState)this).characterBody.AddTimedBuff(immune.buffIndex, 0.15f); } if (((EntityState)this).isAuthority) { if (Object.op_Implicit((Object)(object)novaPrefab)) { EffectManager.SpawnEffect(novaPrefab, new EffectData { origin = transform.position, scale = newrad }, true); } new BlastAttack { position = transform.position, radius = newrad, falloffModel = (FalloffModel)0, attacker = ((EntityState)this).gameObject, inflictor = ((EntityState)this).gameObject, damageColorIndex = (DamageColorIndex)16, damageType = { damageSource = (DamageSource)8 }, baseDamage = (damageCoefficient + additionalStocks / 2f) * Mathf.Clamp(base.attackSpeedStat - 2.5f, 1f, 9999f) * base.damageStat, baseForce = 150f, bonusForce = Vector3.zero, crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master), procCoefficient = 0f, teamIndex = ((EntityState)this).gameObject.GetComponent().teamIndex }.Fire(); RemoveNearbyProjectilesServer(teamIndex, transform.position, radius); } } private static void RemoveNearbyProjectilesServer(TeamIndex teamIndexToIgnore, Vector3 position, float radius) { //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_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) float num = radius * radius; List instancesList = InstanceTracker.GetInstancesList(); List list = CollectionPool>.RentCollection(); int i = 0; for (int count = instancesList.Count; i < count; i++) { ProjectileController val = instancesList[i]; if (!val.cannotBeDeleted && val.teamFilter.teamIndex != teamIndexToIgnore) { Vector3 val2 = ((Component)val).transform.position - position; if (((Vector3)(ref val2)).sqrMagnitude < num) { list.Add(val); } } } int j = 0; for (int count2 = list.Count; j < count2; j++) { ProjectileController val3 = list[j]; if (Object.op_Implicit((Object)(object)val3)) { Object.Destroy((Object)(object)((Component)val3).gameObject); } } CollectionPool>.ReturnCollection(list); } public override void OnExit() { //IL_0011: 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) ((EntityState)this).OnExit(); TeamIndex teamIndex = ((EntityState)this).gameObject.GetComponent().teamIndex; Transform transform = ((Component)((EntityState)this).modelLocator.modelChildLocator.FindChild("HeadCenter")).transform; RemoveNearbyProjectilesServer(teamIndex, transform.position, radius); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } } } namespace SnowtimeToybox { public class SnowtimeHaloRicochetOrb : GenericDamageOrb { public class RicochetOrb : GenericDamageOrb { public GameObject effectPrefab; public override GameObject GetOrbEffect() { return effectPrefab; } } public GameObject orbEffectPrefab = Content.HaloorbEffectObject; public override void Begin() { //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_0039: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown base.speed = 220f; ((Orb)this).duration = Mathf.Max(((Orb)this).distanceToTarget / base.speed, 0.167f); EffectData val = new EffectData { scale = base.scale, origin = ((Orb)this).origin, genericFloat = ((Orb)this).duration }; if (Object.op_Implicit((Object)(object)((Orb)this).target)) { val.SetHurtBoxReference(((Orb)this).target); } } public override void OnArrival() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00a3: 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) if (Object.op_Implicit((Object)(object)((Orb)this).target) && Object.op_Implicit((Object)(object)((Orb)this).target.healthComponent) && ((Orb)this).target.healthComponent.alive) { DamageInfo val = new DamageInfo(); val.damage = base.damageValue; val.attacker = base.attacker; val.inflictor = null; val.force = Vector3.zero; val.crit = base.isCrit; val.procChainMask = base.procChainMask; val.procCoefficient = base.procCoefficient; val.position = ((Component)((Orb)this).target).transform.position; val.damageColorIndex = base.damageColorIndex; val.damageType = base.damageType; val.inflictedHurtbox = ((Orb)this).target; ((Orb)this).target.healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)((Orb)this).target.healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)((Orb)this).target.healthComponent).gameObject); } } public static void CreateHaloRicochetOrb(DamageInfo damageInfo, TeamIndex attackerTeamIndex, CharacterBody victim, List killedBodies = null) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_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_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) HurtBox val = null; BullseyeSearch val2 = new BullseyeSearch(); val2.searchOrigin = damageInfo.position; val2.searchDirection = Vector3.zero; val2.teamMaskFilter = TeamMask.GetEnemyTeams(attackerTeamIndex); val2.filterByLoS = false; val2.sortMode = (SortMode)0; val2.maxAngleFilter = 180f; val2.maxDistanceFilter = 27f; val2.filterByDistinctEntity = true; val2.RefreshCandidates(); if (Object.op_Implicit((Object)(object)victim)) { val2.FilterOutGameObject(((Component)victim).gameObject); } IEnumerable results = val2.GetResults(); float num = float.PositiveInfinity; foreach (HurtBox item in results) { if (Object.op_Implicit((Object)(object)item.healthComponent) && (double)item.healthComponent.combinedHealth < (double)num && item.healthComponent.alive) { num = item.healthComponent.combinedHealth; val = item; } } if (Object.op_Implicit((Object)(object)val)) { RicochetOrb ricochetOrb = new RicochetOrb(); ((Orb)ricochetOrb).origin = damageInfo.position; ricochetOrb.effectPrefab = Content.HaloorbEffectObject; ((GenericDamageOrb)ricochetOrb).damageValue = damageInfo.damage * 0.75f; ((GenericDamageOrb)ricochetOrb).isCrit = damageInfo.crit; ((GenericDamageOrb)ricochetOrb).teamIndex = attackerTeamIndex; ((GenericDamageOrb)ricochetOrb).attacker = damageInfo.attacker; ((GenericDamageOrb)ricochetOrb).procChainMask = damageInfo.procChainMask; ((GenericDamageOrb)ricochetOrb).procCoefficient = 0.3f; ((GenericDamageOrb)ricochetOrb).damageType = DamageTypeCombo.op_Implicit((DamageType)0); ((GenericDamageOrb)ricochetOrb).damageType.damageSource = (DamageSource)1; ((GenericDamageOrb)ricochetOrb).damageColorIndex = (DamageColorIndex)0; ((Orb)ricochetOrb).target = val; OrbManager.instance.AddOrb((Orb)(object)ricochetOrb); } } } public class SnowtimeOrbs : Orb { public enum OrbTypes { ShortcakeTaunt, ShortcakeRetaliate, ShortcakeRetaliateFriendly, TurretlingMissile, TurretlingMissile_Acanthi, TurretlingMissile_Borbo, TurretlingMissile_Bread, TurretlingMissile_Shortcake, TurretlingMissile_Snowtime, TurretlingMissile_Player, TurretlingMissile_Rainbow } public float speed = 200f; public float damageValue; public GameObject attacker; public GameObject inflictor; public TeamIndex teamIndex; public bool isCrit; public ProcChainMask procChainMask; public float procCoefficient = 1f; public DamageColorIndex damageColorIndex; public float range = 20f; public DamageTypeCombo damageType = DamageTypeCombo.op_Implicit((DamageType)0); public OrbTypes snowtimeOrbType; private bool isElectric; private bool isHealing; private bool isRainbow; private bool isMissile; public GameObject orbShortcakeRetaliatePrefab = Content.orbShortcakeRetaliateObject; public GameObject orbShortcakeRetaliateFriendlyPrefab = Content.orbShortcakeRetaliateFriendlyObject; public GameObject orbShortcakeTauntPrefab = Content.orbShortcakeTauntObject; public GameObject orbTurretlingMissilePrefab = Content.orbTurretlingMissileObject; public GameObject orbAcanthilingMissilePrefab = Content.orbAcanthilingMissileObject; public GameObject orbBorbolingMissilePrefab = Content.orbBorbolingMissileObject; public GameObject orbBreadlingMissilePrefab = Content.orbBreadlingMissileObject; public GameObject orbShortcakelingMissilePrefab = Content.orbShortcakelingMissileObject; public GameObject orbSnowtimelingMissilePrefab = Content.orbSnowtimelingMissileObject; public GameObject orbRainbowMissilePrefab = Content.orbRainbowMissileObject; public GameObject orbPlayerMissilePrefab = Content.orbPlayerMissileObject; public override void Begin() { //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_020e: 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_022b: Expected O, but got Unknown ((Orb)this).duration = Mathf.Max(((Orb)this).distanceToTarget / speed, 0.1f); GameObject val = null; switch (snowtimeOrbType) { case OrbTypes.ShortcakeTaunt: val = orbShortcakeTauntPrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = false; break; case OrbTypes.ShortcakeRetaliate: val = orbShortcakeRetaliatePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = false; break; case OrbTypes.ShortcakeRetaliateFriendly: val = orbShortcakeRetaliateFriendlyPrefab; isHealing = true; isElectric = false; isRainbow = false; isMissile = false; break; case OrbTypes.TurretlingMissile: val = orbTurretlingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Acanthi: val = orbAcanthilingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Borbo: val = orbBorbolingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Bread: val = orbBreadlingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Shortcake: val = orbShortcakelingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Snowtime: val = orbSnowtimelingMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; case OrbTypes.TurretlingMissile_Rainbow: val = orbRainbowMissilePrefab; isHealing = false; isElectric = true; isRainbow = true; isMissile = true; break; case OrbTypes.TurretlingMissile_Player: val = orbPlayerMissilePrefab; isHealing = false; isElectric = false; isRainbow = false; isMissile = true; break; } EffectData val2 = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration * 2f }; val2.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(val, val2, true); } public override void OnArrival() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: 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_00ca: 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_00d6: 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_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_00ff: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)base.target)) { return; } HealthComponent healthComponent = base.target.healthComponent; if (Object.op_Implicit((Object)(object)healthComponent)) { DamageInfo val = new DamageInfo(); if (!isHealing) { val.damage = damageValue; val.procChainMask = procChainMask; val.procCoefficient = procCoefficient; } else { healthComponent.Heal(base.target.healthComponent.fullHealth * 0.025f + damageValue, procChainMask, true); val.procCoefficient = 0f; } val.attacker = attacker; val.inflictor = inflictor; val.force = Vector3.zero; val.crit = isCrit; val.position = ((Component)base.target).transform.position; val.damageColorIndex = damageColorIndex; val.damageType = damageType; if (isElectric) { val.damageType.damageTypeExtended = (DamageTypeExtended)8192; } val.inflictedHurtbox = base.target; healthComponent.TakeDamage(val); GlobalEventManager.instance.OnHitEnemy(val, ((Component)healthComponent).gameObject); GlobalEventManager.instance.OnHitAll(val, ((Component)healthComponent).gameObject); } } } public class Hooks { [CompilerGenerated] private static class <>O { public static Action <0>__CharacterMaster_OnStartGlobal; public static hook_OnHitEnemy <1>__JustLetMeDamageMyFoesPleaseThankYou; public static hook_Start <2>__SceneDirectorOnStart; public static hook_FixedUpdate <3>__ShortcakeTurretHandler; public static hook_TickHealthRepairServer <4>__DroneRepairMasterHookTickHealthRepairServer; public static hook_CommandFollowInternal <5>__DroneTechControllerHookCommandFollowInternal; public static hook_CommandFollow_bool_GameObject <6>__DroneTechControllerHookCommandFollowGameObject; public static hook_CommandFollow_bool_DroneInfo <7>__DroneTechControllerHookCommandFollowDroneInfo; public static hook_BeginFollow_CharacterBody <8>__DroneTechControllerHookBeginFollow; public static hook_BeginFollow_CharacterBody_int <9>__DroneTechControllerHookBeginFollowInt; public static hook_FixedUpdate <10>__DroneCommandReceiverHookFixedUpdate; public static hook_CommandFollow <11>__DroneCommandReceiverHookCommandFollow; public static hook_ActivateFollow <12>__DroneCommandReceiverHookActivateFollow; public static hook_CommandActivate <13>__DroneCommandReceiverHookCommandActivate; public static hook_IsReady <14>__DroneCommandReceiverOnIsReady; public static hook_OnEnter <15>__DroneTechHookOnEnter; public static hook_UpdateStack <16>__DroneUpgradeHiddenBodyBehaviorHookUpdateStack; public static hook_IsUpgradedDrone <17>__CharacterModelHookIsUpgradedDrone; public static hook_Init <18>__DroneCombinerControllerHookInit; public static hook_IgnoreCollisionsWithBody <19>__IgnoreCollisionsWithBody; public static hook_GetInteractability <20>__GetInteractabilityFriendlyTurrets; public static hook_UpdateTargets <21>__UpdateFriendlyTurretTargeting; public static hook_UpdateOverlays <22>__CharacterModelOnUpdateOverlays; } public static void Hook() { //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_0063: Expected O, but got Unknown //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_00ad: 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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //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_00f4: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0129: 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: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Expected O, but got Unknown //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Expected O, but got Unknown //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Expected O, but got Unknown //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0309: 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_0314: Expected O, but got Unknown //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown Run.onRunStartGlobal += delegate(Run run) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) SnowtimeToyboxMod.Legendary = false; if (run.selectedDifficulty == SnowtimeToyboxMod.SnowtimeLegendaryDiffIndex) { SnowtimeToyboxMod.Legendary = true; CharacterMaster.onStartGlobal += CharacterMaster_OnStartGlobal; } }; Run.onRunDestroyGlobal += delegate { SnowtimeToyboxMod.Legendary = false; CharacterMaster.onStartGlobal -= CharacterMaster_OnStartGlobal; }; object obj = <>O.<1>__JustLetMeDamageMyFoesPleaseThankYou; if (obj == null) { hook_OnHitEnemy val = JustLetMeDamageMyFoesPleaseThankYou; <>O.<1>__JustLetMeDamageMyFoesPleaseThankYou = val; obj = (object)val; } GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj; object obj2 = <>O.<2>__SceneDirectorOnStart; if (obj2 == null) { hook_Start val2 = SceneDirectorOnStart; <>O.<2>__SceneDirectorOnStart = val2; obj2 = (object)val2; } SceneDirector.Start += (hook_Start)obj2; object obj3 = <>O.<3>__ShortcakeTurretHandler; if (obj3 == null) { hook_FixedUpdate val3 = ShortcakeTurretHandler; <>O.<3>__ShortcakeTurretHandler = val3; obj3 = (object)val3; } CharacterBody.FixedUpdate += (hook_FixedUpdate)obj3; AsyncOperationHandle val4 = Addressables.LoadAssetAsync((object)"RoR2/Base/Drones/Turret1Broken.prefab"); val4.Completed += delegate(AsyncOperationHandle handle) { handle.Result.AddComponent(); }; object obj4 = <>O.<4>__DroneRepairMasterHookTickHealthRepairServer; if (obj4 == null) { hook_TickHealthRepairServer val5 = DroneRepairMasterHookTickHealthRepairServer; <>O.<4>__DroneRepairMasterHookTickHealthRepairServer = val5; obj4 = (object)val5; } DroneRepairMaster.TickHealthRepairServer += (hook_TickHealthRepairServer)obj4; object obj5 = <>O.<5>__DroneTechControllerHookCommandFollowInternal; if (obj5 == null) { hook_CommandFollowInternal val6 = DroneTechControllerHookCommandFollowInternal; <>O.<5>__DroneTechControllerHookCommandFollowInternal = val6; obj5 = (object)val6; } DroneTechController.CommandFollowInternal += (hook_CommandFollowInternal)obj5; object obj6 = <>O.<6>__DroneTechControllerHookCommandFollowGameObject; if (obj6 == null) { hook_CommandFollow_bool_GameObject val7 = DroneTechControllerHookCommandFollowGameObject; <>O.<6>__DroneTechControllerHookCommandFollowGameObject = val7; obj6 = (object)val7; } DroneTechController.CommandFollow_bool_GameObject += (hook_CommandFollow_bool_GameObject)obj6; object obj7 = <>O.<7>__DroneTechControllerHookCommandFollowDroneInfo; if (obj7 == null) { hook_CommandFollow_bool_DroneInfo val8 = DroneTechControllerHookCommandFollowDroneInfo; <>O.<7>__DroneTechControllerHookCommandFollowDroneInfo = val8; obj7 = (object)val8; } DroneTechController.CommandFollow_bool_DroneInfo += (hook_CommandFollow_bool_DroneInfo)obj7; object obj8 = <>O.<8>__DroneTechControllerHookBeginFollow; if (obj8 == null) { hook_BeginFollow_CharacterBody val9 = DroneTechControllerHookBeginFollow; <>O.<8>__DroneTechControllerHookBeginFollow = val9; obj8 = (object)val9; } DroneTechController.BeginFollow_CharacterBody += (hook_BeginFollow_CharacterBody)obj8; object obj9 = <>O.<9>__DroneTechControllerHookBeginFollowInt; if (obj9 == null) { hook_BeginFollow_CharacterBody_int val10 = DroneTechControllerHookBeginFollowInt; <>O.<9>__DroneTechControllerHookBeginFollowInt = val10; obj9 = (object)val10; } DroneTechController.BeginFollow_CharacterBody_int += (hook_BeginFollow_CharacterBody_int)obj9; object obj10 = <>O.<10>__DroneCommandReceiverHookFixedUpdate; if (obj10 == null) { hook_FixedUpdate val11 = DroneCommandReceiverHookFixedUpdate; <>O.<10>__DroneCommandReceiverHookFixedUpdate = val11; obj10 = (object)val11; } DroneCommandReceiver.FixedUpdate += (hook_FixedUpdate)obj10; object obj11 = <>O.<11>__DroneCommandReceiverHookCommandFollow; if (obj11 == null) { hook_CommandFollow val12 = DroneCommandReceiverHookCommandFollow; <>O.<11>__DroneCommandReceiverHookCommandFollow = val12; obj11 = (object)val12; } DroneCommandReceiver.CommandFollow += (hook_CommandFollow)obj11; object obj12 = <>O.<12>__DroneCommandReceiverHookActivateFollow; if (obj12 == null) { hook_ActivateFollow val13 = DroneCommandReceiverHookActivateFollow; <>O.<12>__DroneCommandReceiverHookActivateFollow = val13; obj12 = (object)val13; } DroneCommandReceiver.ActivateFollow += (hook_ActivateFollow)obj12; object obj13 = <>O.<13>__DroneCommandReceiverHookCommandActivate; if (obj13 == null) { hook_CommandActivate val14 = DroneCommandReceiverHookCommandActivate; <>O.<13>__DroneCommandReceiverHookCommandActivate = val14; obj13 = (object)val14; } DroneCommandReceiver.CommandActivate += (hook_CommandActivate)obj13; object obj14 = <>O.<14>__DroneCommandReceiverOnIsReady; if (obj14 == null) { hook_IsReady val15 = DroneCommandReceiverOnIsReady; <>O.<14>__DroneCommandReceiverOnIsReady = val15; obj14 = (object)val15; } DroneCommandReceiver.IsReady += (hook_IsReady)obj14; object obj15 = <>O.<15>__DroneTechHookOnEnter; if (obj15 == null) { hook_OnEnter val16 = DroneTechHookOnEnter; <>O.<15>__DroneTechHookOnEnter = val16; obj15 = (object)val16; } CommandCarry.OnEnter += (hook_OnEnter)obj15; object obj16 = <>O.<16>__DroneUpgradeHiddenBodyBehaviorHookUpdateStack; if (obj16 == null) { hook_UpdateStack val17 = DroneUpgradeHiddenBodyBehaviorHookUpdateStack; <>O.<16>__DroneUpgradeHiddenBodyBehaviorHookUpdateStack = val17; obj16 = (object)val17; } DroneUpgradeHiddenBodyBehavior.UpdateStack += (hook_UpdateStack)obj16; object obj17 = <>O.<17>__CharacterModelHookIsUpgradedDrone; if (obj17 == null) { hook_IsUpgradedDrone val18 = CharacterModelHookIsUpgradedDrone; <>O.<17>__CharacterModelHookIsUpgradedDrone = val18; obj17 = (object)val18; } CharacterModel.IsUpgradedDrone += (hook_IsUpgradedDrone)obj17; object obj18 = <>O.<18>__DroneCombinerControllerHookInit; if (obj18 == null) { hook_Init val19 = DroneCombinerControllerHookInit; <>O.<18>__DroneCombinerControllerHookInit = val19; obj18 = (object)val19; } DroneCombinerController.Init += (hook_Init)obj18; object obj19 = <>O.<19>__IgnoreCollisionsWithBody; if (obj19 == null) { hook_IgnoreCollisionsWithBody val20 = IgnoreCollisionsWithBody; <>O.<19>__IgnoreCollisionsWithBody = val20; obj19 = (object)val20; } ProjectileController.IgnoreCollisionsWithBody += (hook_IgnoreCollisionsWithBody)obj19; object obj20 = <>O.<20>__GetInteractabilityFriendlyTurrets; if (obj20 == null) { hook_GetInteractability val21 = GetInteractabilityFriendlyTurrets; <>O.<20>__GetInteractabilityFriendlyTurrets = val21; obj20 = (object)val21; } PurchaseInteraction.GetInteractability += (hook_GetInteractability)obj20; object obj21 = <>O.<21>__UpdateFriendlyTurretTargeting; if (obj21 == null) { hook_UpdateTargets val22 = UpdateFriendlyTurretTargeting; <>O.<21>__UpdateFriendlyTurretTargeting = val22; obj21 = (object)val22; } BaseAI.UpdateTargets += (hook_UpdateTargets)obj21; object obj22 = <>O.<22>__CharacterModelOnUpdateOverlays; if (obj22 == null) { hook_UpdateOverlays val23 = CharacterModelOnUpdateOverlays; <>O.<22>__CharacterModelOnUpdateOverlays = val23; obj22 = (object)val23; } CharacterModel.UpdateOverlays += (hook_UpdateOverlays)obj22; } private static Interactability GetInteractabilityFriendlyTurrets(orig_GetInteractability orig, PurchaseInteraction self, Interactor activator) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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) if (!self.displayNameToken.StartsWith("FRIENDLYTURRET_")) { return orig.Invoke(self, activator); } CharacterBody component = ((Component)activator).gameObject.GetComponent(); CharacterBody[] array = ((component != null) ? component.GetMinionBodies() : null); if (array == null) { return orig.Invoke(self, activator); } CharacterBody[] array2 = array; foreach (CharacterBody val in array2) { if (val.baseNameToken.StartsWith("FRIENDLYTURRET_") && ((Object)val).name.Contains(((Component)self).gameObject.GetComponent().bodyName)) { return (Interactability)0; } } return orig.Invoke(self, activator); } private static void CharacterModelOnUpdateOverlays(orig_UpdateOverlays orig, CharacterModel self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.body)) { return; } if (self.body.HasBuff(BreadFriendlyTurret.BreadTurretBuffFortune)) { FriendlyTurretOverlayManager friendlyTurretOverlayManager = ((Component)self.body).GetComponent(); if (!Object.op_Implicit((Object)(object)friendlyTurretOverlayManager)) { friendlyTurretOverlayManager = ((Component)self.body).gameObject.AddComponent(); } if (!friendlyTurretOverlayManager.hasOverlay("matBreadFortune")) { friendlyTurretOverlayManager.Body = self.body; TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val.duration = float.PositiveInfinity; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(1f, 1f, 2f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Bread/matBreadFortune.mat"); val.AddToCharacterModel(self); friendlyTurretOverlayManager.Overlay.Add(val); } } if (self.body.HasBuff(AcanthiFriendlyTurret.AcanthiTurretDebuff)) { FriendlyTurretOverlayManager friendlyTurretOverlayManager2 = ((Component)self.body).GetComponent(); if (!Object.op_Implicit((Object)(object)friendlyTurretOverlayManager2)) { friendlyTurretOverlayManager2 = ((Component)self.body).gameObject.AddComponent(); } if (!friendlyTurretOverlayManager2.hasOverlay("acanthidebuffoverlay")) { friendlyTurretOverlayManager2.Body = self.body; TemporaryOverlayInstance val2 = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val2.duration = float.PositiveInfinity; val2.animateShaderAlpha = true; val2.alphaCurve = AnimationCurve.EaseInOut(1f, 1f, 2f, 0f); val2.destroyComponentOnEnd = true; val2.originalMaterial = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Acanthi/acanthidebuffoverlay.mat"); val2.AddToCharacterModel(self); friendlyTurretOverlayManager2.Overlay.Add(val2); } } if (self.body.HasBuff(BorboFriendlyTurret.BorboTurretDebuff)) { FriendlyTurretOverlayManager friendlyTurretOverlayManager3 = ((Component)self.body).GetComponent(); if (!Object.op_Implicit((Object)(object)friendlyTurretOverlayManager3)) { friendlyTurretOverlayManager3 = ((Component)self.body).gameObject.AddComponent(); } if (!friendlyTurretOverlayManager3.hasOverlay("borboturretdebuffoverlay")) { friendlyTurretOverlayManager3.Body = self.body; TemporaryOverlayInstance val3 = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val3.duration = float.PositiveInfinity; val3.animateShaderAlpha = true; val3.alphaCurve = AnimationCurve.EaseInOut(1f, 1f, 2f, 0f); val3.destroyComponentOnEnd = true; val3.originalMaterial = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/borboturretdebuffoverlay.mat"); val3.AddToCharacterModel(self); friendlyTurretOverlayManager3.Overlay.Add(val3); } } if (self.body.HasBuff(BreadFriendlyTurret.BreadTurretBuffNearbyAllies)) { FriendlyTurretOverlayManager friendlyTurretOverlayManager4 = ((Component)self.body).GetComponent(); if (!Object.op_Implicit((Object)(object)friendlyTurretOverlayManager4)) { friendlyTurretOverlayManager4 = ((Component)self.body).gameObject.AddComponent(); } if (!friendlyTurretOverlayManager4.hasOverlay("matBreadGraceOverlay")) { friendlyTurretOverlayManager4.Body = self.body; TemporaryOverlayInstance val4 = TemporaryOverlayManager.AddOverlay(((Component)self).gameObject); val4.duration = float.PositiveInfinity; val4.animateShaderAlpha = true; val4.alphaCurve = AnimationCurve.EaseInOut(1f, 1f, 2f, 0f); val4.destroyComponentOnEnd = true; val4.originalMaterial = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Bread/matBreadGraceOverlay.mat"); val4.AddToCharacterModel(self); friendlyTurretOverlayManager4.Overlay.Add(val4); } } } private static void UpdateFriendlyTurretTargeting(orig_UpdateTargets orig, BaseAI self) { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_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_00b4: 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_00c1: 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_00cd: 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_00d6: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_019d: 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_01a7: 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) //IL_01b9: 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_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); CharacterBody body = self.body; string baseNameToken = body.baseNameToken; float maxDistanceFilter = 250f; if (baseNameToken.Contains("FRIENDLYTURRET_BORBO") || baseNameToken.Contains("FRIENDLYTURRET_SNOWTIME") || baseNameToken.Contains("FRIENDLYTURRET_ACANTHI")) { if (baseNameToken.Contains("FRIENDLYTURRET_SNOWTIME")) { maxDistanceFilter = 125f; } if (baseNameToken.Contains("FRIENDLYTURRET_ACANTHI")) { maxDistanceFilter = 80f; } InputBankTest inputBank = body.inputBank; TeamComponent teamComponent = body.teamComponent; if ((Object)(object)body == (Object)null || (Object)(object)inputBank == (Object)null || (Object)(object)teamComponent == (Object)null) { return; } BullseyeSearch val = new BullseyeSearch { searchOrigin = body.corePosition, searchDirection = inputBank.aimDirection, teamMaskFilter = TeamMask.GetEnemyTeams(teamComponent.teamIndex), maxDistanceFilter = maxDistanceFilter, filterByLoS = true, sortMode = (SortMode)0 }; val.RefreshCandidates(); HurtBox val2 = null; float num = float.NegativeInfinity; foreach (HurtBox result in val.GetResults()) { float fullCombinedHealth = result.healthComponent.fullCombinedHealth; if (fullCombinedHealth > num) { num = fullCombinedHealth; val2 = result; } } if (Object.op_Implicit((Object)(object)val2)) { self.currentEnemy.bestHurtBox = val2; } } if (!baseNameToken.Contains("sometheoreticalturret")) { return; } InputBankTest inputBank2 = body.inputBank; TeamComponent teamComponent2 = body.teamComponent; if ((Object)(object)body == (Object)null || (Object)(object)inputBank2 == (Object)null || (Object)(object)teamComponent2 == (Object)null) { return; } BullseyeSearch val3 = new BullseyeSearch { searchOrigin = body.corePosition, searchDirection = inputBank2.aimDirection, teamMaskFilter = TeamMask.GetEnemyTeams(teamComponent2.teamIndex), maxDistanceFilter = 250f, filterByLoS = true, sortMode = (SortMode)0 }; val3.RefreshCandidates(); HurtBox val4 = null; float num2 = float.NegativeInfinity; foreach (HurtBox result2 in val3.GetResults()) { float health = result2.healthComponent.health; if (health < num2) { num2 = health; val4 = result2; } } if (Object.op_Implicit((Object)(object)val4)) { self.currentEnemy.bestHurtBox = val4; } } private static void JustLetMeDamageMyFoesPleaseThankYou(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!((Object)(object)victim == (Object)null)) { if (DamageAPI.HasModdedDamageType(damageInfo, SnowtimeToyboxMod.HaloRicochetOnHit)) { SnowtimeHaloRicochetOrb.CreateHaloRicochetOrb(damageInfo, damageInfo.attacker.GetComponent().teamIndex, victim.GetComponent()); } if (DamageAPI.HasModdedDamageType(damageInfo, SnowtimeToyboxMod.BorboSuperDebuffOnHit)) { victim.GetComponent().AddTimedBuff(BorboFriendlyTurret.BorboTurretDebuff, 3f); } } } private static void ShortcakeTurretHandler(orig_FixedUpdate orig, CharacterBody self) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Invalid comparison between Unknown and I4 orig.Invoke(self); if ((int)self.teamComponent.teamIndex != 1 || !self.baseNameToken.Contains("FRIENDLYTURRET_")) { return; } if (self.baseNameToken.Contains("FRIENDLYTURRET_SHORTCAKE") && !self.HasBuff(ShortcakeFriendlyTurret.ShortcakeTurretBuff)) { self.AddBuff(ShortcakeFriendlyTurret.ShortcakeTurretBuff); if (SnowtimeToyboxMod.FriendlyTurretShortcakeAggroType.Value) { self.AddBuff(AggroToolsPlugin.priorityAggro); } } if (self.baseNameToken.Contains("FRIENDLYTURRET_ACANTHI") && !self.HasBuff(AcanthiFriendlyTurret.AcanthiTurretBuff)) { self.AddBuff(AcanthiFriendlyTurret.AcanthiTurretBuff); } if (self.baseNameToken.Contains("FRIENDLYTURRET_BREAD") && !self.HasBuff(BreadFriendlyTurret.BreadTurretBuffPassive)) { self.AddBuff(BreadFriendlyTurret.BreadTurretBuffPassive); } } private static void SceneDirectorOnStart(orig_Start orig, SceneDirector self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_12fa: Unknown result type (might be due to invalid IL or missing references) //IL_130e: Unknown result type (might be due to invalid IL or missing references) //IL_1328: Unknown result type (might be due to invalid IL or missing references) //IL_133c: Unknown result type (might be due to invalid IL or missing references) //IL_1488: Unknown result type (might be due to invalid IL or missing references) //IL_149c: Unknown result type (might be due to invalid IL or missing references) //IL_11dc: Unknown result type (might be due to invalid IL or missing references) //IL_11f0: Unknown result type (might be due to invalid IL or missing references) //IL_120a: Unknown result type (might be due to invalid IL or missing references) //IL_121e: Unknown result type (might be due to invalid IL or missing references) //IL_210f: Unknown result type (might be due to invalid IL or missing references) //IL_2123: Unknown result type (might be due to invalid IL or missing references) //IL_213d: Unknown result type (might be due to invalid IL or missing references) //IL_2151: Unknown result type (might be due to invalid IL or missing references) //IL_216b: Unknown result type (might be due to invalid IL or missing references) //IL_217f: Unknown result type (might be due to invalid IL or missing references) //IL_2199: Unknown result type (might be due to invalid IL or missing references) //IL_21ad: Unknown result type (might be due to invalid IL or missing references) //IL_1790: Unknown result type (might be due to invalid IL or missing references) //IL_17a4: Unknown result type (might be due to invalid IL or missing references) //IL_17be: Unknown result type (might be due to invalid IL or missing references) //IL_17d2: Unknown result type (might be due to invalid IL or missing references) //IL_13ef: Unknown result type (might be due to invalid IL or missing references) //IL_1403: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0a5c: Unknown result type (might be due to invalid IL or missing references) //IL_0bff: Unknown result type (might be due to invalid IL or missing references) //IL_0c13: Unknown result type (might be due to invalid IL or missing references) //IL_0c2d: Unknown result type (might be due to invalid IL or missing references) //IL_0c41: Unknown result type (might be due to invalid IL or missing references) //IL_14bb: Unknown result type (might be due to invalid IL or missing references) //IL_14cf: Unknown result type (might be due to invalid IL or missing references) //IL_14e9: Unknown result type (might be due to invalid IL or missing references) //IL_14fd: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0986: Unknown result type (might be due to invalid IL or missing references) //IL_099a: Unknown result type (might be due to invalid IL or missing references) //IL_13bc: Unknown result type (might be due to invalid IL or missing references) //IL_13d0: Unknown result type (might be due to invalid IL or missing references) //IL_0a7b: Unknown result type (might be due to invalid IL or missing references) //IL_0a8f: Unknown result type (might be due to invalid IL or missing references) //IL_0aa9: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0c60: Unknown result type (might be due to invalid IL or missing references) //IL_0c74: Unknown result type (might be due to invalid IL or missing references) //IL_0c8e: Unknown result type (might be due to invalid IL or missing references) //IL_0ca2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0925: Unknown result type (might be due to invalid IL or missing references) //IL_0939: Unknown result type (might be due to invalid IL or missing references) //IL_135b: Unknown result type (might be due to invalid IL or missing references) //IL_136f: Unknown result type (might be due to invalid IL or missing references) //IL_1389: Unknown result type (might be due to invalid IL or missing references) //IL_139d: Unknown result type (might be due to invalid IL or missing references) //IL_111a: Unknown result type (might be due to invalid IL or missing references) //IL_112e: Unknown result type (might be due to invalid IL or missing references) //IL_1148: Unknown result type (might be due to invalid IL or missing references) //IL_115c: Unknown result type (might be due to invalid IL or missing references) //IL_0e73: Unknown result type (might be due to invalid IL or missing references) //IL_0e87: Unknown result type (might be due to invalid IL or missing references) //IL_0ea1: Unknown result type (might be due to invalid IL or missing references) //IL_0eb5: Unknown result type (might be due to invalid IL or missing references) //IL_10b9: Unknown result type (might be due to invalid IL or missing references) //IL_10cd: Unknown result type (might be due to invalid IL or missing references) //IL_10e7: Unknown result type (might be due to invalid IL or missing references) //IL_10fb: Unknown result type (might be due to invalid IL or missing references) //IL_1852: Unknown result type (might be due to invalid IL or missing references) //IL_1866: Unknown result type (might be due to invalid IL or missing references) //IL_1880: Unknown result type (might be due to invalid IL or missing references) //IL_1894: Unknown result type (might be due to invalid IL or missing references) //IL_1914: Unknown result type (might be due to invalid IL or missing references) //IL_1928: Unknown result type (might be due to invalid IL or missing references) //IL_1942: Unknown result type (might be due to invalid IL or missing references) //IL_1956: Unknown result type (might be due to invalid IL or missing references) //IL_1975: Unknown result type (might be due to invalid IL or missing references) //IL_1989: Unknown result type (might be due to invalid IL or missing references) //IL_19a3: Unknown result type (might be due to invalid IL or missing references) //IL_19b7: Unknown result type (might be due to invalid IL or missing references) //IL_1ac6: Unknown result type (might be due to invalid IL or missing references) //IL_1ada: Unknown result type (might be due to invalid IL or missing references) //IL_1af4: Unknown result type (might be due to invalid IL or missing references) //IL_1b08: Unknown result type (might be due to invalid IL or missing references) //IL_1b22: Unknown result type (might be due to invalid IL or missing references) //IL_1b36: Unknown result type (might be due to invalid IL or missing references) //IL_1b50: Unknown result type (might be due to invalid IL or missing references) //IL_1b64: Unknown result type (might be due to invalid IL or missing references) //IL_1b83: Unknown result type (might be due to invalid IL or missing references) //IL_1b97: Unknown result type (might be due to invalid IL or missing references) //IL_1cd4: Unknown result type (might be due to invalid IL or missing references) //IL_1ce8: Unknown result type (might be due to invalid IL or missing references) //IL_1d02: Unknown result type (might be due to invalid IL or missing references) //IL_1d16: Unknown result type (might be due to invalid IL or missing references) //IL_1d30: Unknown result type (might be due to invalid IL or missing references) //IL_1d44: Unknown result type (might be due to invalid IL or missing references) //IL_1d5e: Unknown result type (might be due to invalid IL or missing references) //IL_1d72: Unknown result type (might be due to invalid IL or missing references) //IL_1d8c: Unknown result type (might be due to invalid IL or missing references) //IL_1da0: Unknown result type (might be due to invalid IL or missing references) //IL_1dba: Unknown result type (might be due to invalid IL or missing references) //IL_1dce: Unknown result type (might be due to invalid IL or missing references) //IL_1de8: Unknown result type (might be due to invalid IL or missing references) //IL_1dfc: Unknown result type (might be due to invalid IL or missing references) //IL_1e16: Unknown result type (might be due to invalid IL or missing references) //IL_1e2a: Unknown result type (might be due to invalid IL or missing references) //IL_1e44: Unknown result type (might be due to invalid IL or missing references) //IL_1e58: Unknown result type (might be due to invalid IL or missing references) //IL_1e72: Unknown result type (might be due to invalid IL or missing references) //IL_1e86: Unknown result type (might be due to invalid IL or missing references) //IL_1ea0: Unknown result type (might be due to invalid IL or missing references) //IL_1eb4: Unknown result type (might be due to invalid IL or missing references) //IL_1ece: Unknown result type (might be due to invalid IL or missing references) //IL_1ee2: Unknown result type (might be due to invalid IL or missing references) //IL_18b3: Unknown result type (might be due to invalid IL or missing references) //IL_18c7: Unknown result type (might be due to invalid IL or missing references) //IL_18e1: Unknown result type (might be due to invalid IL or missing references) //IL_18f5: Unknown result type (might be due to invalid IL or missing references) //IL_15de: Unknown result type (might be due to invalid IL or missing references) //IL_15f2: Unknown result type (might be due to invalid IL or missing references) //IL_160c: Unknown result type (might be due to invalid IL or missing references) //IL_1620: Unknown result type (might be due to invalid IL or missing references) //IL_163a: Unknown result type (might be due to invalid IL or missing references) //IL_164e: Unknown result type (might be due to invalid IL or missing references) //IL_0d22: Unknown result type (might be due to invalid IL or missing references) //IL_0d36: Unknown result type (might be due to invalid IL or missing references) //IL_0d50: Unknown result type (might be due to invalid IL or missing references) //IL_0d64: Unknown result type (might be due to invalid IL or missing references) //IL_0d7e: Unknown result type (might be due to invalid IL or missing references) //IL_0d92: Unknown result type (might be due to invalid IL or missing references) //IL_1422: Unknown result type (might be due to invalid IL or missing references) //IL_1436: Unknown result type (might be due to invalid IL or missing references) //IL_0ff7: Unknown result type (might be due to invalid IL or missing references) //IL_100b: Unknown result type (might be due to invalid IL or missing references) //IL_1025: Unknown result type (might be due to invalid IL or missing references) //IL_1039: Unknown result type (might be due to invalid IL or missing references) //IL_1455: Unknown result type (might be due to invalid IL or missing references) //IL_1469: Unknown result type (might be due to invalid IL or missing references) //IL_117b: Unknown result type (might be due to invalid IL or missing references) //IL_118f: Unknown result type (might be due to invalid IL or missing references) //IL_11a9: Unknown result type (might be due to invalid IL or missing references) //IL_11bd: Unknown result type (might be due to invalid IL or missing references) //IL_1058: Unknown result type (might be due to invalid IL or missing references) //IL_106c: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Unknown result type (might be due to invalid IL or missing references) //IL_109a: Unknown result type (might be due to invalid IL or missing references) //IL_0cc1: Unknown result type (might be due to invalid IL or missing references) //IL_0cd5: Unknown result type (might be due to invalid IL or missing references) //IL_0cef: Unknown result type (might be due to invalid IL or missing references) //IL_0d03: Unknown result type (might be due to invalid IL or missing references) //IL_0f35: Unknown result type (might be due to invalid IL or missing references) //IL_0f49: Unknown result type (might be due to invalid IL or missing references) //IL_0f63: Unknown result type (might be due to invalid IL or missing references) //IL_0f77: Unknown result type (might be due to invalid IL or missing references) //IL_1bb6: Unknown result type (might be due to invalid IL or missing references) //IL_1bca: Unknown result type (might be due to invalid IL or missing references) //IL_1be4: Unknown result type (might be due to invalid IL or missing references) //IL_1bf8: Unknown result type (might be due to invalid IL or missing references) //IL_123d: Unknown result type (might be due to invalid IL or missing references) //IL_1251: Unknown result type (might be due to invalid IL or missing references) //IL_126b: Unknown result type (might be due to invalid IL or missing references) //IL_127f: Unknown result type (might be due to invalid IL or missing references) //IL_1299: Unknown result type (might be due to invalid IL or missing references) //IL_12ad: Unknown result type (might be due to invalid IL or missing references) //IL_12c7: Unknown result type (might be due to invalid IL or missing references) //IL_12db: Unknown result type (might be due to invalid IL or missing references) //IL_0f96: Unknown result type (might be due to invalid IL or missing references) //IL_0faa: Unknown result type (might be due to invalid IL or missing references) //IL_0fc4: Unknown result type (might be due to invalid IL or missing references) //IL_0fd8: Unknown result type (might be due to invalid IL or missing references) //IL_0db1: Unknown result type (might be due to invalid IL or missing references) //IL_0dc5: Unknown result type (might be due to invalid IL or missing references) //IL_0ddf: Unknown result type (might be due to invalid IL or missing references) //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_21cc: Unknown result type (might be due to invalid IL or missing references) //IL_21e0: Unknown result type (might be due to invalid IL or missing references) //IL_21fa: Unknown result type (might be due to invalid IL or missing references) //IL_220e: Unknown result type (might be due to invalid IL or missing references) //IL_2228: Unknown result type (might be due to invalid IL or missing references) //IL_223c: Unknown result type (might be due to invalid IL or missing references) //IL_166d: Unknown result type (might be due to invalid IL or missing references) //IL_1681: Unknown result type (might be due to invalid IL or missing references) //IL_169b: Unknown result type (might be due to invalid IL or missing references) //IL_16af: Unknown result type (might be due to invalid IL or missing references) //IL_19d6: Unknown result type (might be due to invalid IL or missing references) //IL_19ea: Unknown result type (might be due to invalid IL or missing references) //IL_1a04: Unknown result type (might be due to invalid IL or missing references) //IL_1a18: Unknown result type (might be due to invalid IL or missing references) //IL_225b: Unknown result type (might be due to invalid IL or missing references) //IL_226f: Unknown result type (might be due to invalid IL or missing references) //IL_2289: Unknown result type (might be due to invalid IL or missing references) //IL_229d: Unknown result type (might be due to invalid IL or missing references) //IL_22b7: Unknown result type (might be due to invalid IL or missing references) //IL_22cb: Unknown result type (might be due to invalid IL or missing references) //IL_22e5: Unknown result type (might be due to invalid IL or missing references) //IL_22f9: Unknown result type (might be due to invalid IL or missing references) //IL_2080: Unknown result type (might be due to invalid IL or missing references) //IL_2094: Unknown result type (might be due to invalid IL or missing references) //IL_20ae: Unknown result type (might be due to invalid IL or missing references) //IL_20c2: Unknown result type (might be due to invalid IL or missing references) //IL_20dc: Unknown result type (might be due to invalid IL or missing references) //IL_20f0: Unknown result type (might be due to invalid IL or missing references) //IL_1f62: Unknown result type (might be due to invalid IL or missing references) //IL_1f76: Unknown result type (might be due to invalid IL or missing references) //IL_1f90: Unknown result type (might be due to invalid IL or missing references) //IL_1fa4: Unknown result type (might be due to invalid IL or missing references) //IL_1fbe: Unknown result type (might be due to invalid IL or missing references) //IL_1fd2: Unknown result type (might be due to invalid IL or missing references) //IL_17f1: Unknown result type (might be due to invalid IL or missing references) //IL_1805: Unknown result type (might be due to invalid IL or missing references) //IL_181f: Unknown result type (might be due to invalid IL or missing references) //IL_1833: Unknown result type (might be due to invalid IL or missing references) //IL_172f: Unknown result type (might be due to invalid IL or missing references) //IL_1743: Unknown result type (might be due to invalid IL or missing references) //IL_175d: Unknown result type (might be due to invalid IL or missing references) //IL_1771: Unknown result type (might be due to invalid IL or missing references) //IL_1ff1: Unknown result type (might be due to invalid IL or missing references) //IL_2005: Unknown result type (might be due to invalid IL or missing references) //IL_201f: Unknown result type (might be due to invalid IL or missing references) //IL_2033: Unknown result type (might be due to invalid IL or missing references) //IL_204d: Unknown result type (might be due to invalid IL or missing references) //IL_2061: Unknown result type (might be due to invalid IL or missing references) //IL_0b3d: Unknown result type (might be due to invalid IL or missing references) //IL_0b51: Unknown result type (might be due to invalid IL or missing references) //IL_0b6b: Unknown result type (might be due to invalid IL or missing references) //IL_0b7f: Unknown result type (might be due to invalid IL or missing references) //IL_0e12: Unknown result type (might be due to invalid IL or missing references) //IL_0e26: Unknown result type (might be due to invalid IL or missing references) //IL_0e40: Unknown result type (might be due to invalid IL or missing references) //IL_0e54: Unknown result type (might be due to invalid IL or missing references) //IL_0ed4: Unknown result type (might be due to invalid IL or missing references) //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0f02: Unknown result type (might be due to invalid IL or missing references) //IL_0f16: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09cd: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0bb2: Unknown result type (might be due to invalid IL or missing references) //IL_0bcc: Unknown result type (might be due to invalid IL or missing references) //IL_0be0: Unknown result type (might be due to invalid IL or missing references) //IL_1c17: Unknown result type (might be due to invalid IL or missing references) //IL_1c2b: Unknown result type (might be due to invalid IL or missing references) //IL_1c45: Unknown result type (might be due to invalid IL or missing references) //IL_1c59: Unknown result type (might be due to invalid IL or missing references) //IL_1c73: Unknown result type (might be due to invalid IL or missing references) //IL_1c87: Unknown result type (might be due to invalid IL or missing references) //IL_1ca1: Unknown result type (might be due to invalid IL or missing references) //IL_1cb5: Unknown result type (might be due to invalid IL or missing references) //IL_157d: Unknown result type (might be due to invalid IL or missing references) //IL_1591: Unknown result type (might be due to invalid IL or missing references) //IL_15ab: Unknown result type (might be due to invalid IL or missing references) //IL_15bf: Unknown result type (might be due to invalid IL or missing references) //IL_1f01: Unknown result type (might be due to invalid IL or missing references) //IL_1f15: Unknown result type (might be due to invalid IL or missing references) //IL_1f2f: Unknown result type (might be due to invalid IL or missing references) //IL_1f43: Unknown result type (might be due to invalid IL or missing references) //IL_151c: Unknown result type (might be due to invalid IL or missing references) //IL_1530: Unknown result type (might be due to invalid IL or missing references) //IL_154a: Unknown result type (might be due to invalid IL or missing references) //IL_155e: Unknown result type (might be due to invalid IL or missing references) //IL_1a37: Unknown result type (might be due to invalid IL or missing references) //IL_1a4b: Unknown result type (might be due to invalid IL or missing references) //IL_1a65: Unknown result type (might be due to invalid IL or missing references) //IL_1a79: Unknown result type (might be due to invalid IL or missing references) //IL_1a93: Unknown result type (might be due to invalid IL or missing references) //IL_1aa7: Unknown result type (might be due to invalid IL or missing references) //IL_16ce: Unknown result type (might be due to invalid IL or missing references) //IL_16e2: Unknown result type (might be due to invalid IL or missing references) //IL_16fc: Unknown result type (might be due to invalid IL or missing references) //IL_1710: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0af0: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_08aa: Unknown result type (might be due to invalid IL or missing references) //IL_08c4: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_2459: Unknown result type (might be due to invalid IL or missing references) //IL_2460: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!NetworkServer.active) { return; } Dictionary dictionary = new Dictionary(); Scene activeScene = SceneManager.GetActiveScene(); switch (((Scene)(ref activeScene)).name) { case "golemplains": dictionary.Add(new Vector3(190.3899f, -86.776f, -135.183f), Quaternion.Euler(0f, 59.69361f, 0f)); dictionary.Add(new Vector3(-91.03493f, -158.2584f, 120.482f), Quaternion.Euler(0f, 205.1253f, 0f)); break; case "golemplains2": dictionary.Add(new Vector3(31.92904f, 82.58593f, -64.25964f), Quaternion.Euler(0f, 0.5191317f, 0f)); dictionary.Add(new Vector3(316.7331f, 44.01719f, -29.57135f), Quaternion.Euler(0f, 336.1666f, 0f)); break; case "blackbeach": dictionary.Add(new Vector3(-24.12934f, -174.6557f, -387.6982f), Quaternion.Euler(0f, 182.4907f, 0f)); dictionary.Add(new Vector3(-4.805637f, -204.4452f, -12.48376f), Quaternion.Euler(0f, 152.4669f, 0f)); break; case "blackbeach2": dictionary.Add(new Vector3(13.17906f, 87.47905f, -133.2737f), Quaternion.Euler(0f, 323.4963f, 0f)); dictionary.Add(new Vector3(-174.5754f, 17.0354f, -96.01575f), Quaternion.Euler(0f, 23.97439f, 0f)); break; case "lakes": dictionary.Add(new Vector3(86.66148f, 15.45605f, 118.2119f), Quaternion.Euler(0f, 195.2255f, 0f)); dictionary.Add(new Vector3(-160.3739f, 0.8921404f, -86.5373f), Quaternion.Euler(0f, 21.13958f, 0f)); break; case "lakesnight": dictionary.Add(new Vector3(86.66148f, 15.45605f, 118.2119f), Quaternion.Euler(0f, 195.2255f, 0f)); dictionary.Add(new Vector3(-160.3739f, 0.8921404f, -86.5373f), Quaternion.Euler(0f, 21.13958f, 0f)); break; case "snowyforest": dictionary.Add(new Vector3(106.6341f, 68.99653f, 214.1347f), Quaternion.Euler(0f, 241.8315f, 0f)); dictionary.Add(new Vector3(101.7054f, 36.81925f, 28.63689f), Quaternion.Euler(0f, 273.5906f, 0f)); break; case "village": dictionary.Add(new Vector3(-116.2186f, -4.684125f, -248.0959f), Quaternion.Euler(0f, 47.27631f, 0f)); dictionary.Add(new Vector3(234.6463f, 48.88169f, 22.69479f), Quaternion.Euler(0f, 232.9216f, 0f)); break; case "villagenight": dictionary.Add(new Vector3(-116.2186f, -4.684125f, -248.0959f), Quaternion.Euler(0f, 47.27631f, 0f)); dictionary.Add(new Vector3(234.6463f, 48.88169f, 22.69479f), Quaternion.Euler(0f, 232.9216f, 0f)); break; case "goolake": dictionary.Add(new Vector3(116.9908f, -91.04021f, -7.358109f), Quaternion.Euler(0f, 170.321f, 0f)); dictionary.Add(new Vector3(193.6468f, -122.2093f, 81.47984f), Quaternion.Euler(0f, 134.2626f, 0f)); break; case "foggyswamp": dictionary.Add(new Vector3(21.54059f, -97.81608f, -48.92618f), Quaternion.Euler(0f, 294.0464f, 0f)); dictionary.Add(new Vector3(321.5318f, -160.4051f, -323.4489f), Quaternion.Euler(0f, 78.9093f, 0f)); break; case "ancientloft": dictionary.Add(new Vector3(80.94776f, 30.03779f, -130.4797f), Quaternion.Euler(0f, 125.4776f, 0f)); dictionary.Add(new Vector3(-71.81654f, 27.19449f, 83.8267f), Quaternion.Euler(0f, 93.52406f, 0f)); break; case "nest": dictionary.Add(new Vector3(-188.9024f, 10.64726f, 30.56748f), Quaternion.Euler(0f, 201.877f, 0f)); dictionary.Add(new Vector3(-129.1165f, 128.4458f, -108.6409f), Quaternion.Euler(0f, 185.5041f, 0f)); dictionary.Add(new Vector3(-85.97453f, 173.3482f, 99.71858f), Quaternion.Euler(0f, 78.47749f, 0f)); break; case "lemuriantemple": dictionary.Add(new Vector3(-4.580923f, 27.38782f, 3.959016f), Quaternion.Euler(0f, 9.96745f, 0f)); dictionary.Add(new Vector3(101.6959f, -27.22142f, 163.6068f), Quaternion.Euler(0f, 232.0676f, 0f)); break; case "frozenwall": dictionary.Add(new Vector3(82.25099f, 3.083081f, 64.41711f), Quaternion.Euler(0f, 330.366f, 0f)); dictionary.Add(new Vector3(96.06144f, 115.7271f, 156.4782f), Quaternion.Euler(0f, 199.4881f, 0f)); break; case "wispgraveyard": dictionary.Add(new Vector3(-133.0515f, -31.09213f, -118.661f), Quaternion.Euler(0f, 24.76236f, 0f)); dictionary.Add(new Vector3(79.80575f, 30.06047f, 56.93044f), Quaternion.Euler(0f, 52.20761f, 0f)); break; case "sulfurpools": dictionary.Add(new Vector3(-183.9088f, 10.77933f, 32.21773f), Quaternion.Euler(0f, 181.6929f, 0f)); dictionary.Add(new Vector3(174.8141f, 28.67295f, 33.7763f), Quaternion.Euler(0f, 308.1877f, 0f)); break; case "ironalluvium": dictionary.Add(new Vector3(13.42801f, 125.7309f, -188.0156f), Quaternion.Euler(0f, 43.0607f, 0f)); dictionary.Add(new Vector3(167.1385f, 149.9529f, 95.30859f), Quaternion.Euler(0f, 205.8401f, 0f)); break; case "ironalluvium2": dictionary.Add(new Vector3(13.42801f, 125.7309f, -188.0156f), Quaternion.Euler(0f, 43.0607f, 0f)); dictionary.Add(new Vector3(167.1385f, 149.9529f, 95.30859f), Quaternion.Euler(0f, 205.8401f, 0f)); break; case "habitat": dictionary.Add(new Vector3(62.35349f, 0.6543378f, 143.4429f), Quaternion.Euler(0f, 292.0843f, 0f)); dictionary.Add(new Vector3(-13.10078f, 21.30807f, -104.7179f), Quaternion.Euler(0f, 205.8312f, 0f)); break; case "habitatfall": dictionary.Add(new Vector3(62.35349f, 0.6543378f, 143.4429f), Quaternion.Euler(0f, 292.0843f, 0f)); dictionary.Add(new Vector3(-13.10078f, 21.30807f, -104.7179f), Quaternion.Euler(0f, 205.8312f, 0f)); break; case "dampcavesimple": dictionary.Add(new Vector3(74.77532f, -87.4948f, -196.4726f), Quaternion.Euler(0f, 200.3068f, 0f)); dictionary.Add(new Vector3(-156.3687f, -122.5679f, -91.23058f), Quaternion.Euler(0f, 111.9192f, 0f)); break; case "shipgraveyard": dictionary.Add(new Vector3(-93.99381f, 11.12058f, -31.31874f), Quaternion.Euler(0f, 218.6378f, 0f)); dictionary.Add(new Vector3(186.8673f, 77.27081f, 26.32287f), Quaternion.Euler(0f, 346.0909f, 0f)); break; case "rootjungle": dictionary.Add(new Vector3(77.77145f, -60.95433f, -8.285771f), Quaternion.Euler(0f, 359.0302f, 0f)); dictionary.Add(new Vector3(-202.9731f, 92.59643f, -166.5592f), Quaternion.Euler(0f, 71.41415f, 0f)); break; case "repurposedcrater": dictionary.Add(new Vector3(-253.8853f, 121.0383f, 11.31156f), Quaternion.Euler(0f, 68.99377f, 0f)); dictionary.Add(new Vector3(9.018836f, 53.40439f, -134.2828f), Quaternion.Euler(0f, 305.9838f, 0f)); break; case "conduitcanyon": dictionary.Add(new Vector3(-420.648f, 43.71975f, -332.4908f), Quaternion.Euler(0f, 61.96296f, 0f)); dictionary.Add(new Vector3(-131.2769f, 32.62687f, -154.4974f), Quaternion.Euler(0f, 173.366f, 0f)); dictionary.Add(new Vector3(135.7131f, 40.00665f, 304.5394f), Quaternion.Euler(0f, 127.5887f, 0f)); dictionary.Add(new Vector3(120.3498f, 113.6439f, 605.4644f), Quaternion.Euler(0f, 181.6343f, 0f)); break; case "skymeadow": dictionary.Add(new Vector3(-122.741f, -87.85542f, -117.1602f), Quaternion.Euler(0f, 79.03946f, 0f)); dictionary.Add(new Vector3(-197.5687f, 26.55142f, 30.68633f), Quaternion.Euler(0f, 135.1837f, 0f)); break; case "helminthroost": dictionary.Add(new Vector3(-569.6815f, -148.7018f, 337.3586f), Quaternion.Euler(0f, 269.8808f, 0f)); dictionary.Add(new Vector3(-397.3075f, 118.8055f, -55.87037f), Quaternion.Euler(0f, 123.3015f, 0f)); break; case "goldshores": dictionary.Add(new Vector3(49.76122f, -7.326298f, -37.93284f), Quaternion.Euler(0f, 180.3956f, 0f)); break; case "moon": dictionary.Add(new Vector3(274.709f, 329.6422f, 110.5199f), Quaternion.Euler(0f, 145.1531f, 0f)); break; case "moon2": dictionary.Add(new Vector3(705.5821f, -157.1221f, 858.8436f), Quaternion.Euler(0f, 79.45797f, 0f)); break; case "meridian": dictionary.Add(new Vector3(101.4198f, 102.1784f, -54.02138f), Quaternion.Euler(0f, 209.4111f, 0f)); break; case "solutionalhaunt": dictionary.Add(new Vector3(96.6469f, -555.6259f, -107.9996f), Quaternion.Euler(0f, 245.2375f, 0f)); break; case "FBLScene": dictionary.Add(new Vector3(300.2629f, 229.4142f, -126.4303f), Quaternion.Euler(0f, 125.6396f, 0f)); dictionary.Add(new Vector3(169.5165f, 255.284f, 410.8152f), Quaternion.Euler(0f, 20.25785f, 0f)); break; case "observatory_wormsworms": dictionary.Add(new Vector3(176.1036f, -2.617247f, -34.78374f), Quaternion.Euler(0f, 210.1473f, 0f)); dictionary.Add(new Vector3(-141.1253f, 77.90317f, 221.5992f), Quaternion.Euler(0f, 13.25202f, 0f)); break; case "foggyswampdownpour": dictionary.Add(new Vector3(-749.5313f, 91.3914f, -2025.714f), Quaternion.Euler(0f, 227.2804f, 0f)); dictionary.Add(new Vector3(-1018.735f, 76.65155f, -2313.54f), Quaternion.Euler(0f, 334.4469f, 0f)); break; case "broadcastperch_wormsworms": dictionary.Add(new Vector3(50.9431f, 280.1794f, 136.6628f), Quaternion.Euler(0f, 176.2385f, 0f)); dictionary.Add(new Vector3(-126.8886f, 270.8356f, 53.03748f), Quaternion.Euler(0f, 109.5885f, 0f)); dictionary.Add(new Vector3(12.31855f, 305.7722f, -138.1022f), Quaternion.Euler(0f, 285.201f, 0f)); break; case "tropics_wormsworms": dictionary.Add(new Vector3(-199.3958f, -31.72103f, -170.7593f), Quaternion.Euler(0f, 338.8611f, 0f)); dictionary.Add(new Vector3(127.7805f, 38.15013f, 158.8848f), Quaternion.Euler(0f, 121.6468f, 0f)); break; case "tropicsnight_wormsworms": dictionary.Add(new Vector3(-199.3958f, -31.72103f, -170.7593f), Quaternion.Euler(0f, 338.8611f, 0f)); dictionary.Add(new Vector3(127.7805f, 38.15013f, 158.8848f), Quaternion.Euler(0f, 121.6468f, 0f)); break; case "hollowsummit_wormsworms": dictionary.Add(new Vector3(-37.58895f, 106.0261f, 108.1745f), Quaternion.Euler(0f, 24.11862f, 0f)); dictionary.Add(new Vector3(160.7567f, 55.26473f, -70.89723f), Quaternion.Euler(0f, 87.57731f, 0f)); break; case "hollowsummitnight_wormsworms": dictionary.Add(new Vector3(-37.58895f, 106.0261f, 108.1745f), Quaternion.Euler(0f, 24.11862f, 0f)); dictionary.Add(new Vector3(160.7567f, 55.26473f, -70.89723f), Quaternion.Euler(0f, 87.57731f, 0f)); break; case "sunkentombs_wormsworms": dictionary.Add(new Vector3(160.82f, -2.51438f, 85.47977f), Quaternion.Euler(8.114909f, 324.5277f, 6.795454f)); dictionary.Add(new Vector3(-141.9162f, 76.95288f, -1.94882f), Quaternion.Euler(27.48974f, 67.94604f, 11.36176f)); break; case "sm64_bbf_SM64_BBF": dictionary.Add(new Vector3(162.9347f, 38.44512f, 74.83717f), Quaternion.Euler(0f, 189.5465f, 0f)); dictionary.Add(new Vector3(-97.6097f, 15.58791f, 97.34737f), Quaternion.Euler(0f, 10.41307f, 0f)); break; case "catacombs_DS1_Catacombs": dictionary.Add(new Vector3(-49.93897f, 218.098f, -439.0562f), Quaternion.Euler(0f, 125.6632f, 0f)); dictionary.Add(new Vector3(-29.51958f, 190.1485f, -174.524f), Quaternion.Euler(0f, 135.824f, 0f)); break; case "snowtime_bloodgulch": dictionary.Add(new Vector3(-380.7556f, 7.749712f, 374.3361f), Quaternion.Euler(0f, 53.47242f, 0f)); dictionary.Add(new Vector3(-59.86384f, 47.40347f, 365.2287f), Quaternion.Euler(0f, 288.4397f, 0f)); break; case "snowtime_deathisland": dictionary.Add(new Vector3(101.2409f, 49.95498f, -98.19534f), Quaternion.Euler(0f, 166.7226f, 0f)); dictionary.Add(new Vector3(119.7398f, 36.45596f, -237.7042f), Quaternion.Euler(0f, 306.9397f, 0f)); break; case "snowtime_deltahalo": dictionary.Add(new Vector3(35.93007f, 82.32765f, 981.3515f), Quaternion.Euler(0f, 175.9509f, 0f)); dictionary.Add(new Vector3(31.13048f, 65.11033f, 641.2076f), Quaternion.Euler(0f, 15.0037f, 0f)); break; case "snowtime_gephyrophobia": dictionary.Add(new Vector3(-93.77584f, -17.08484f, 51.58313f), Quaternion.Euler(0f, 359.9742f, 0f)); dictionary.Add(new Vector3(-93.86058f, -17.27335f, 453.9898f), Quaternion.Euler(0f, 179.6247f, 0f)); dictionary.Add(new Vector3(-93.63819f, -59.47458f, 253.0157f), Quaternion.Euler(0f, 359.8916f, 0f)); break; case "snowtime_gmconstruct": dictionary.Add(new Vector3(125.6074f, -24.182f, 41.94416f), Quaternion.Euler(0f, 224.6205f, 0f)); dictionary.Add(new Vector3(191.7613f, -4.52605f, -229.1491f), Quaternion.Euler(0f, 134.3182f, 0f)); dictionary.Add(new Vector3(-35.97609f, -0.746001f, 50.99677f), Quaternion.Euler(0f, 134.9052f, 0f)); dictionary.Add(new Vector3(-36.71188f, -6.793999f, 58.53889f), Quaternion.Euler(0f, 277.8377f, 0f)); break; case "snowtime_gmflatgrass": dictionary.Add(new Vector3(10.22947f, 15.37018f, 9.359962f), Quaternion.Euler(0f, 256.2039f, 0f)); break; case "snowtime_halo": dictionary.Add(new Vector3(-30.71955f, 229.6823f, -144.8316f), Quaternion.Euler(0f, 209.9076f, 0f)); dictionary.Add(new Vector3(-208.1239f, 202.1529f, 170.1005f), Quaternion.Euler(0f, 134.7629f, 0f)); break; case "snowtime_halo2": dictionary.Add(new Vector3(1867.69f, 238.3529f, -642.8783f), Quaternion.Euler(0f, 44.7936f, 0f)); dictionary.Add(new Vector3(1293.771f, 263.4328f, -554.2413f), Quaternion.Euler(0f, 107.449f, 0f)); dictionary.Add(new Vector3(1342.334f, 164.51f, -135.1692f), Quaternion.Euler(0f, 125.0683f, 0f)); dictionary.Add(new Vector3(1840.748f, 213.0739f, -200.0254f), Quaternion.Euler(0f, 337.9286f, 0f)); break; case "snowtime_highcharity": dictionary.Add(new Vector3(60.14213f, 11.577f, -483.8502f), Quaternion.Euler(0f, 241.12f, 0f)); dictionary.Add(new Vector3(-52.33072f, 11.577f, -487.8752f), Quaternion.Euler(0f, 129.98f, 0f)); dictionary.Add(new Vector3(-61.07679f, 11.57699f, -546.1075f), Quaternion.Euler(0f, 59.45599f, 0f)); dictionary.Add(new Vector3(57.52615f, 11.577f, -544.13f), Quaternion.Euler(0f, 297.445f, 0f)); dictionary.Add(new Vector3(21.75992f, 2.126976f, -484.5297f), Quaternion.Euler(0f, 35.51595f, 0f)); dictionary.Add(new Vector3(37.98527f, 2.126978f, -514.8828f), Quaternion.Euler(0f, 89.67403f, 0f)); dictionary.Add(new Vector3(22.01921f, 2.126978f, -545.0482f), Quaternion.Euler(0f, 145.1344f, 0f)); dictionary.Add(new Vector3(-21.56447f, 2.12697f, -544.3843f), Quaternion.Euler(0f, 217.2564f, 0f)); dictionary.Add(new Vector3(-37.30863f, 2.126962f, -514.6474f), Quaternion.Euler(0f, 271.6194f, 0f)); dictionary.Add(new Vector3(-21.56099f, 2.12697f, -485.05f), Quaternion.Euler(0f, 324.465f, 0f)); dictionary.Add(new Vector3(-17.53811f, 9.018085f, -621.3613f), Quaternion.Euler(0f, 123.2604f, 0f)); dictionary.Add(new Vector3(17.22844f, 9.0188f, -408.7164f), Quaternion.Euler(0f, 313.6848f, 0f)); break; case "snowtime_icefields": dictionary.Add(new Vector3(272.5726f, 7.359958f, -303.162f), Quaternion.Euler(0f, 357.3307f, 0f)); dictionary.Add(new Vector3(-86.97459f, 7.360003f, 77.48335f), Quaternion.Euler(0f, 178.8512f, 0f)); break; case "snowtime_mvmmannhattan": dictionary.Add(new Vector3(97.37387f, -3.909989f, 39.39054f), Quaternion.Euler(0f, 243.5768f, 0f)); dictionary.Add(new Vector3(11.37051f, -10.19141f, 163.9846f), Quaternion.Euler(0f, 138.7431f, 0f)); dictionary.Add(new Vector3(-30.7068f, 1.629176f, -88.67094f), Quaternion.Euler(0f, 44.10945f, 0f)); break; case "snowtime_newmombasabridge": dictionary.Add(new Vector3(-856.0861f, 1.803394f, -65.45497f), Quaternion.Euler(0f, 91.96432f, 0f)); dictionary.Add(new Vector3(79.94922f, 48.21177f, 8.020412f), Quaternion.Euler(0f, 255.742f, 0f)); dictionary.Add(new Vector3(836.3431f, 5.02102f, 28.03459f), Quaternion.Euler(0f, 0.5525074f, 0f)); break; case "snowtime_odstmombasa": dictionary.Add(new Vector3(-600.8646f, 19.12913f, 4.601078f), Quaternion.Euler(0f, 128.6979f, 0f)); dictionary.Add(new Vector3(-41.66861f, 17.09908f, -53.34187f), Quaternion.Euler(0f, 269.7134f, 0f)); dictionary.Add(new Vector3(-413.2506f, 12.5159f, 210.6578f), Quaternion.Euler(0f, 135.8528f, 0f)); break; case "snowtime_plrhightower": dictionary.Add(new Vector3(188.9554f, 46.25977f, -153.9811f), Quaternion.Euler(0f, 304.0394f, 0f)); dictionary.Add(new Vector3(71.34775f, 31.16273f, -141.1281f), Quaternion.Euler(0f, 91.36182f, 0f)); dictionary.Add(new Vector3(23.99743f, 23.75547f, -210.7883f), Quaternion.Euler(0f, 12.54428f, 0f)); dictionary.Add(new Vector3(26.78335f, 24.51611f, -58.37008f), Quaternion.Euler(0f, 194.0668f, 0f)); break; case "snowtime_sandtrap": dictionary.Add(new Vector3(37.73601f, -77.13338f, 176.5529f), Quaternion.Euler(0f, 350.9677f, 0f)); dictionary.Add(new Vector3(-0.09483957f, -78.48047f, 20.26742f), Quaternion.Euler(0f, 178.6303f, 0f)); dictionary.Add(new Vector3(-133.8743f, -71.43472f, 2.363332f), Quaternion.Euler(0f, 276.9908f, 0f)); break; case "snowtime_sidewinder": dictionary.Add(new Vector3(-7.530613f, -7.065588f, -197.7645f), Quaternion.Euler(0f, 2.06729f, 0f)); dictionary.Add(new Vector3(116.0248f, -3.413208f, 46.1681f), Quaternion.Euler(0f, 83.94437f, 0f)); dictionary.Add(new Vector3(117.4637f, -7.276778f, 112.5169f), Quaternion.Euler(0f, 204.6324f, 0f)); dictionary.Add(new Vector3(-102.5031f, -8.326768f, 126.306f), Quaternion.Euler(0f, 181.4125f, 0f)); break; default: Log.Debug("no custom pos !!! too bad ,.."); return; } int[] array = new int[SnowtimeToyboxMod.friendlyTurretList.Count]; foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if ((Object)(object)readOnlyInstances.minionOwnership == (Object)null || !((Object)readOnlyInstances).name.Contains("FriendlyTurret")) { continue; } string text = ((Object)readOnlyInstances).name.Replace("(Clone)", ""); for (int i = 0; i < SnowtimeToyboxMod.friendlyTurretList.Count; i++) { if (!(text != ((Object)SnowtimeToyboxMod.friendlyTurretList[i].master).name)) { array[i]++; } } } List list = new List(); for (int j = 0; j < SnowtimeToyboxMod.friendlyTurretList.Count; j++) { if (array[j] != PlayerCharacterMasterController.playerCount) { list.Add(SnowtimeToyboxMod.friendlyTurretList[j].broken); } } if (list.Count != 0) { GameObject obj = list[Run.instance.runRNG.RangeInt(0, list.Count)]; KeyValuePair keyValuePair = dictionary.ElementAt(Run.instance.runRNG.RangeInt(0, dictionary.Count)); NetworkServer.Spawn(Object.Instantiate(obj, keyValuePair.Key, keyValuePair.Value)); } } private static void CharacterMaster_OnStartGlobal(CharacterMaster obj) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 if ((int)obj.teamIndex != 1) { if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.AlienHead, 1); } if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.BoostAttackSpeed, 3); } if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.BoostHp, 4); } if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.PersonalShield, 5); } if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.BoostDamage, 10); } if (Object.op_Implicit((Object)(object)obj.inventory)) { obj.inventory.GiveItemPermanent(Items.ShinyPearl, 1); } } } private static bool DroneCommandReceiverOnIsReady(orig_IsReady orig, DroneCommandReceiver self) { if (!TurretlingRainbow.DTActiveTurretlings.Contains(self.characterBody)) { return orig.Invoke(self); } return false; } private static void DroneCombinerControllerHookInit(orig_Init orig) { //IL_0010: 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_0038: 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_0060: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00b0: 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_00ce: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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) orig.Invoke(); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.SwarmlingMinionBody)); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.SwarmlingDemoMinionBody)); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.ArtiTurretlingBody)); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.PassiveDemoTurretlingBody)); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.DTTurretlingBody)); DroneCombinerController.doNotDestroy.Add(BodyCatalog.FindBodyIndex(Content.DTDemoTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.SwarmlingMinionBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.SwarmlingDemoMinionBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.ArtiTurretlingBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.PassiveDemoTurretlingBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.DTTurretlingBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); DroneCombinerController.droneCompatibilityLUT.Add(BodyCatalog.FindBodyIndex(Content.DTDemoTurretlingBody), BodyCatalog.FindBodyIndex(Content.FriendlyTurretTurretlingBody)); } private static bool CharacterModelHookIsUpgradedDrone(orig_IsUpgradedDrone orig, CharacterModel self) { if (((Object)((Component)self).gameObject).name.Contains("Turretling")) { return false; } return orig.Invoke(self); } private static void DroneUpgradeHiddenBodyBehaviorHookUpdateStack(orig_UpdateStack orig, DroneUpgradeHiddenBodyBehavior self, int newStack) { if (!((Object)((Component)((BaseItemBodyBehavior)self).body).gameObject).name.Contains("Turretling")) { orig.Invoke(self, newStack); } } private static void DroneTechHookOnEnter(orig_OnEnter orig, CommandCarry self) { //IL_0191: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) if (((Object)((EntityState)self).gameObject).name.Contains("Turretling")) { CharacterBody targetBody = default(CharacterBody); if (Object.op_Implicit((Object)(object)self.target) && self.target.TryGetComponent(ref targetBody)) { self.targetBody = targetBody; self.targetTransform = self.targetBody.modelLocator.modelChildLocator.FindChild((int)self.targetChildIndex); } Object.op_Implicit((Object)(object)self.targetTransform); if (Object.op_Implicit((Object)(object)((EntityState)self).rigidbodyMotor)) { ((Behaviour)((EntityState)self).rigidbodyMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor)) { ((Behaviour)((EntityState)self).characterMotor).enabled = false; } if (Object.op_Implicit((Object)(object)((EntityState)self).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)self).modelLocator.modelBaseTransform) && Object.op_Implicit((Object)(object)self.targetTransform)) { Transform modelBaseTransform = ((EntityState)self).modelLocator.modelBaseTransform; self.cachedModelPosition = modelBaseTransform.localPosition; self.cachedModelRotation = modelBaseTransform.localRotation; modelBaseTransform.parent = self.targetTransform; modelBaseTransform.rotation = self.targetTransform.rotation; modelBaseTransform.localPosition = new Vector3(0f, ((EntityState)self).characterBody.radius, 0f); ((EntityState)self).transform.position = ((Component)modelBaseTransform).transform.position; } int hurtBoxesDeactivatorCounter; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody.hurtBoxGroup)) { HurtBoxGroup hurtBoxGroup = ((EntityState)self).characterBody.hurtBoxGroup; hurtBoxesDeactivatorCounter = hurtBoxGroup.hurtBoxesDeactivatorCounter; hurtBoxGroup.hurtBoxesDeactivatorCounter = hurtBoxesDeactivatorCounter + 1; } self.commandReceiver = ((EntityState)self).GetComponent(); if (Object.op_Implicit((Object)(object)self.commandReceiver)) { self.commandReceiver.droneState = (DroneState)4; } CharacterBody characterBody = ((EntityState)self).characterBody; hurtBoxesDeactivatorCounter = characterBody.fakeActorCounter; characterBody.fakeActorCounter = hurtBoxesDeactivatorCounter + 1; CharacterNetworkTransform networkTransform = default(CharacterNetworkTransform); if (!((EntityState)self).isAuthority && ((EntityState)self).TryGetComponent(ref networkTransform)) { self.networkTransform = networkTransform; ((Behaviour)self.networkTransform).enabled = false; } } if (!((Object)((EntityState)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self); } } private static void DroneTechControllerHookCommandFollowInternal(orig_CommandFollowInternal orig, DroneTechController self, bool shouldFollow, GameObject droneBody) { if (!((Object)droneBody.gameObject).name.Contains("Turretling")) { orig.Invoke(self, shouldFollow, droneBody); } } private static void DroneTechControllerHookCommandFollowGameObject(orig_CommandFollow_bool_GameObject orig, DroneTechController self, bool shouldFollow, GameObject droneBody) { if (!((Object)droneBody.gameObject).name.Contains("Turretling")) { orig.Invoke(self, shouldFollow, droneBody); } } private static void DroneTechControllerHookCommandFollowDroneInfo(orig_CommandFollow_bool_DroneInfo orig, DroneTechController self, bool shouldFollow, DroneInfo drone) { if (!((Object)((Component)drone.characterBody).gameObject).name.Contains("Turretling")) { orig.Invoke(self, shouldFollow, drone); } } private static void DroneRepairMasterHookTickHealthRepairServer(orig_TickHealthRepairServer orig, DroneRepairMaster self, float healRate) { //IL_0068: 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) if (((Object)((Component)self).gameObject).name.Contains("Turretling")) { if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void RoR2.DroneRepairMaster::TickHealthRepairServer(System.Single)' called on client"); } else if (self.HaveRepairBody && !((Object)(object)self.healthComponent == (Object)null) && NetworkServer.active) { self.healthComponent.Heal(healRate * 2f * self.healthComponent.fullHealth * Time.fixedDeltaTime, default(ProcChainMask), false); if (self.healthComponent.health >= self.healthComponent.fullHealth) { self.RespawnDrone(); } } } if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self, healRate); } } private static void DroneTechControllerHookBeginFollow(orig_BeginFollow_CharacterBody orig, DroneTechController self, CharacterBody drone) { if (!((Object)((Component)drone).gameObject).name.Contains("Turretling")) { orig.Invoke(self, drone); } } private static void DroneTechControllerHookBeginFollowInt(orig_BeginFollow_CharacterBody_int orig, DroneTechController self, CharacterBody drone, int index) { if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self, drone, index); } } private static void DroneCommandReceiverHookFixedUpdate(orig_FixedUpdate orig, DroneCommandReceiver self) { if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self); } } private static void DroneCommandReceiverHookCommandFollow(orig_CommandFollow orig, DroneCommandReceiver self, bool shouldFollow) { if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self, shouldFollow); } } private static void DroneCommandReceiverHookActivateFollow(orig_ActivateFollow orig, DroneCommandReceiver self, bool occupySpace) { if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self, occupySpace); } } private static void DroneCommandReceiverHookCommandActivate(orig_CommandActivate orig, DroneCommandReceiver self) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)self.commandSkill) && ((Object)((Component)self).gameObject).name.Contains("Turretling")) { SerializableEntityStateType activationState = self.commandSkill.activationState; self.commandSkill.stateMachine.SetInterruptState(EntityStateCatalog.InstantiateState(ref activationState), (InterruptPriority)8); } if (!((Object)((Component)self).gameObject).name.Contains("Turretling")) { orig.Invoke(self); } } private static void IgnoreCollisionsWithBody(orig_IgnoreCollisionsWithBody orig, ProjectileController self, GameObject bodyObject, bool shouldIgnore) { orig.Invoke(self, bodyObject, shouldIgnore); if (!((Object)self).name.Contains("TurretlingDemoGrenade")) { return; } GameObject owner = self.owner; if (Object.op_Implicit((Object)(object)((owner != null) ? owner.gameObject.GetComponent() : null))) { float myHue = ((Component)self.owner.gameObject.GetComponent().master).gameObject.GetComponent().myHue; bool turretlingRainbow = ((Component)self.owner.gameObject.GetComponent().master).gameObject.GetComponent().turretlingRainbow; ((Component)((Component)self).gameObject.GetComponent().FindChild("Grenade")).gameObject.GetComponent().SetBool("rainbow", turretlingRainbow); if (turretlingRainbow) { ((Component)((Component)self).gameObject.GetComponent().FindChild("Grenade")).gameObject.GetComponent().SetFloat("hue", 0f); ((Component)self).gameObject.GetComponent().impactEffect = Content.grenadeImpactRainbowObject; } else { ((Component)((Component)self).gameObject.GetComponent().FindChild("Grenade")).gameObject.GetComponent().SetFloat("hue", myHue); } } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object 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.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("SnowySnowtime.SnowtimeToyboxMod", "SnowtimeToyboxMod", "1.2.9")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class SnowtimeToyboxMod : BaseUnityPlugin { public const string Author = "SnowySnowtime"; public const string Name = "SnowtimeToyboxMod"; public const string Version = "1.2.9"; public const string GUID = "SnowySnowtime.SnowtimeToyboxMod"; public static SnowtimeToyboxMod instance; public static DifficultyDef SnowtimeLegendaryDiffDef; public static DifficultyIndex SnowtimeLegendaryDiffIndex; public static SkillDef SnowtimePlasmaRifleSkillDef; public static GameObject MuzzleFlashObject; public static GameObject TracerObject; public static GameObject HitObject; public static GameObject OrbObject; public static BodyFlags bodyFlags; public static ModdedDamageType HaloRicochetOnHit = DamageAPI.ReserveDamageType(); public static ModdedDamageType BorboSuperDebuffOnHit = DamageAPI.ReserveDamageType(); public static List friendlyTurretList = new List(); public static bool Legendary = false; public static string assetDirectory; public static AssetBundle _stdifficultyAssetBundle; public static AssetBundle _stcharacterAssetBundle; public static AssetBundle _stitemAssetBundle; internal const string _stdifficultyAssetBundleName = "snowtimetoybox_difficulty"; internal const string _stcharacterAssetBundleName = "snowtimetoybox_characters"; internal const string _stitemAssetBundleName = "snowtimetoybox_items"; private Dictionary itemStuff = new Dictionary { { "ITEM_LUNARSOAP_NAME", "FriendTurret_Acanthi_Whitelist" }, { "SEEKINTHEVOID_STRAWPAIRY_NAME", "FriendTurret_Shortcake_Whitelist,FriendTurret_Acanthi_Whitelist" }, { "NT_ITEM_HYDRATOOTH_NAME", "FriendTurret_Acanthi_Whitelist" }, { "NT_ITEM_SHIMMERINGNAUTILUS_NAME", "FriendTurret_Shortcake_Whitelist" }, { "ROB_ITEM_FIRST_AID_SPRAY_NAME", "FriendTurret_Shortcake_Whitelist" }, { "ROB_ITEM_PERFECT_APPLE_NAME", "FriendTurret_Shortcake_Whitelist" }, { "ITEM_BORBOFUSE", "FriendTurret_Shortcake_Whitelist,FriendTurret_Snowtime_Whitelist" }, { "ITEM_CHOCYCOIN", "FriendTurret_Acanthi_Whitelist" }, { "ITEM_REWORKRACK", "FriendTurret_Acanthi_Whitelist" }, { "ITEM_ICHORVIOLET", "FriendTurret_Shortcake_Whitelist" }, { "ITEM_DESIGNANOMALY", "FriendTurret_Shortcake_Whitelist" }, { "ITEM_VOIDLASERTURBINE", "FriendTurret_Borbo_Whitelist" }, { "ITEM_GOODEXECUTIONITEM", "FriendTurret_Snowtime_Whitelist" }, { "ITEM_SANDSWEPT_AMBER_KNIFE", "FriendTurret_Acanthi_Whitelist" }, { "ITEM_SANDSWEPT_BLEEDING_WITNESS", "FriendTurret_Acanthi_Whitelist" }, { "ITEM_SANDSWEPT_PRESERVED_ATOLL", "FriendTurret_Shortcake_Whitelist" }, { "ITEM_SANDSWEPT_SMOULDERING_DOCUMENT", "FriendTurret_Acanthi_Whitelist" }, { "Bork", "FriendTurret_Borbo_Whitelist,FriendTurret_Shortcake_Whitelist,FriendTurret_Acanthi_Whitelist" }, { "GuinsoosRageblade", "FriendTurret_Acanthi_Whitelist" }, { "ImperialMandate", "FriendTurret_Acanthi_Whitelist" }, { "KrakenSlayer", "FriendTurret_Acanthi_Whitelist,FriendTurret_Snowtime_Whitelist" }, { "VV_ITEM_CRYOCANISTER_ITEM", "FriendTurret_Snowtime_Whitelist" }, { "SS2_ITEM_ARMEDBACKPACK_NAME", "FriendTurret_Shortcake_Whitelist" }, { "SS2_ITEM_STRANGECAN_NAME", "FriendTurret_Acanthi_Whitelist" }, { "SS2_ITEM_ICETOOL_NAME", "FriendTurret_Snowtime_Whitelist" }, { "ITEM_WoodenToolKit_Name", "FriendTurret_Bread_Whitelist" }, { "SEEKINTHEVOID_COASTALCORAL_NAME", "GlobalFriendTurret_Whitelist" }, { "NT_ITEM_VISCOUSPOT_NAME", "GlobalFriendTurret_Whitelist" }, { "NT_ITEM_MOTHEROFPEARL_NAME", "GlobalFriendTurret_Whitelist" }, { "NT_ITEM_MOBIUSNODE_NAME", "GlobalFriendTurret_Whitelist" }, { "NT_ITEM_OSMIUMSHACKLES_NAME", "GlobalFriendTurret_Whitelist" }, { "ROB_ITEM_GREENHERB_NAME", "GlobalFriendTurret_Whitelist" }, { "ROB_ITEM_REDHERB_NAME", "GlobalFriendTurret_Whitelist" }, { "ROB_ITEM_MIXEDHERB_NAME", "GlobalFriendTurret_Whitelist" }, { "ROB_ITEM_GOLDEN_APPLE_NAME", "GlobalFriendTurret_Whitelist" }, { "ROB_ITEM_HEAVY_BOOT_NAME", "GlobalFriendTurret_Whitelist" }, { "ITEM_EGG", "GlobalFriendTurret_Whitelist" }, { "ITEM_CUCKLER", "GlobalFriendTurret_Whitelist" }, { "ITEM_DANGERCRIT", "GlobalFriendTurret_Whitelist" }, { "ITEM_GAMMAKNIFE", "GlobalFriendTurret_Whitelist" }, { "ITEM_FROZENSHELL", "GlobalFriendTurret_Whitelist" }, { "ITEM_MASSANOMALY", "GlobalFriendTurret_Whitelist" }, { "ITEM_BLOODANOMALY", "GlobalFriendTurret_Whitelist" }, { "ITEM_BORBOBIGBATTERY", "GlobalFriendTurret_Whitelist" }, { "ITEM_BORBOMANAFLOWER", "GlobalFriendTurret_Whitelist" }, { "ITEM_SANDSWEPT_CROWNS_DIAMOND", "GlobalFriendTurret_Whitelist" }, { "Rabadons", "GlobalFriendTurret_Whitelist" }, { "VV_ITEM_ADZE_ITEM", "GlobalFriendTurret_Whitelist" }, { "SS2_ITEM_HUNTERSSIGIL_NAME", "GlobalFriendTurret_Whitelist" } }; public static List eliteDefsEquipInherit = new List(); public static bool riskierLoaded => ModLoaded("com.RiskOfBrainrot.RiskierRain"); public static bool scepterLoaded => ModLoaded("com.DestroyedClone.AncientScepter"); public static ConfigEntry ToggleLegendary { get; set; } public static ConfigEntry SwarmlingOSP { get; set; } public static ConfigEntry SwarmlingBaseDamage { get; set; } public static ConfigEntry SwarmlingDamagePerLevel { get; set; } public static ConfigEntry SwarmlingBaseMaxHealth { get; set; } public static ConfigEntry SwarmlingMaxHealthPerLevel { get; set; } public static ConfigEntry SwarmlingBaseRegen { get; set; } public static ConfigEntry SwarmlingRegenPerLevel { get; set; } public static ConfigEntry SwarmlingBaseArmor { get; set; } public static ConfigEntry SwarmlingMinionStatMult { get; set; } public static ConfigEntry ToggleSpawnMessages { get; set; } public static ConfigEntry FriendlyTurretImmuneVoidDeath { get; set; } public static ConfigEntry TurretlingImmuneVoidDeath { get; set; } public static ConfigEntry FriendlyTurretFallImmunity { get; set; } public static ConfigEntry FriendlyTurretDrone { get; set; } public static ConfigEntry FriendlyTurretRemoteOpPrice { get; set; } public static ConfigEntry FriendlyTurretShortcakeAggroType { get; set; } public static ConfigEntry TurretlingSpawnChance { get; set; } public static ConfigEntry TurretlingRainbowChance { get; set; } public static ConfigEntry TurretlingRainbowBonusItems { get; set; } public static ConfigEntry TurretlingKillOriginalTurrets { get; set; } public static ConfigEntry TurretlingArtificerPassive { get; set; } public static ConfigEntry TurretlingPassives { get; set; } public static ConfigEntry TurretlingReviveCostMult { get; set; } public static ConfigEntry TurretlingBaseDamage { get; set; } public static ConfigEntry TurretlingBaseDamagePerLevel { get; set; } public static ConfigEntry TurretlingDemoChance { get; set; } public static ConfigEntry TurretlingGibberishChance { get; set; } public static bool ModLoaded(string modGuid) { if (!string.IsNullOrEmpty(modGuid)) { return Chainloader.PluginInfos.ContainsKey(modGuid); } return false; } public void Awake() { //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) instance = this; Log.Init(((BaseUnityPlugin)this).Logger); ToggleLegendary = ((BaseUnityPlugin)this).Config.Bind("Difficulty", "Legendary", true, "If true, Legendary is enabled as a selectable difficulty."); SwarmlingOSP = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "One-Shot Protection", false, "If true, enables one shot protection for the Swarmling."); SwarmlingBaseDamage = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Base Damage", 12f, "Base Damage."); SwarmlingDamagePerLevel = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Damage per Level", 2.4f, "Damage per Level."); SwarmlingBaseMaxHealth = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Base Health", 50f, "Base Health."); SwarmlingMaxHealthPerLevel = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Health per Level", 15f, "Health per Level."); SwarmlingBaseRegen = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Base Health Regen", 5f, "Base Health Regen."); SwarmlingRegenPerLevel = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Health Regen per Level", 1f, "Health Regen per Level."); SwarmlingBaseArmor = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "Base Armor", 15f, "Base Armor."); SwarmlingMinionStatMult = ((BaseUnityPlugin)this).Config.Bind("Survivors - Swarmling", "(Minion) Swarm Stat Divider", 3f, "Divides the 'Base Damage', 'Damage per Level' of the Swarm for balance purposes. Uses the base stats of the player at 1"); ToggleSpawnMessages = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Functions", "Spawn Message", true, "If true, the Friendly Turrets will give a message on every stage they spawn on, for insight on if and which turret spawned. Otherwise, friendly turrets are shy, and are also sad!"); FriendlyTurretShortcakeAggroType = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Functions", "Strawberry Shortcake Aggro Method", false, "If true, the Strawberry Shortcake Turret will spawn with a native increase to its aggro. Else, it only gains aggro for ~0.5s when its main skill fires."); FriendlyTurretImmuneVoidDeath = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Flags", "Void Death Immunity", true, "If true, Friendly Turrets are immune to Void Death (Void Reaver implosions), this is because they are awful at avoiding them even with mods to make allies avoid them, and we get sad when they are detained."); FriendlyTurretFallImmunity = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Flags", "Fall Damage Immunity", true, "If true, Friendly Turrets (and turretlings) are immune to fall damage, as navigating some maps can be a little difficult for them. Prevents any unexpected turret deaths, as we cant simply 'replace' them like Engineer can."); FriendlyTurretDrone = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Flags", "Drone", false, "If true, Friendly Turrets (and turretlings) are flagged as drones. Probably comes with some oddities."); FriendlyTurretRemoteOpPrice = ((BaseUnityPlugin)this).Config.Bind("Friendly Turret Functions", "Remote Operation Cost", 250, "Cost for becoming a Friendly Turret with Remote Operation."); TurretlingArtificerPassive = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "Turretling Passive", false, "If true, gives a turretling passive to those defined in Turretling Passive List."); TurretlingPassives = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "Turretling Passive List", "MageBody,Divineling;MercBody,Mercling;RailgunnerBody,Purity;BastionRobot,Ganymede;SeekerBody,Toastling;HuntressBody,Kottling;RocketSurvivorBody,Lil'lusiveling;LoaderBody,Scrapling;ArbiterBody,Nugget;CaptainBody,'Paperweight';DemolisherBody,Demoling", "internal names for bodies that should have turretlings ,.., (bodyname,turretlingname) turretlingname is the name given to these turretlings"); TurretlingSpawnChance = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "Turretling Variant Spawn Chance ,,.", 100f, "chance to get a turretling when buying a friendly turret !!!"); TurretlingImmuneVoidDeath = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "Void Death Immunity", false, "If true, All turretlings are immune to Void Death (Void Reaver implosions). Keep the scrunglies safe."); TurretlingReviveCostMult = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "turretling revive cost mult .,.", 0.6f, "price multiplier for reviving turretlings ,.. ,."); TurretlingKillOriginalTurrets = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "kill original turrets .,,.", false, "kills normal(gunner) turrets and replaces them with turretlings ,. ,."); TurretlingRainbowChance = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "turretling rainbow chance ,,.", 1f, "% chance to get a powerful and prideful rainbow turretling ,.,."); TurretlingRainbowBonusItems = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "turretling rainbow bonus items ,,.", "syringe,50,alienhead,5,extralife,1,moremissile,1,adaptivearmor,1,powercube,1,shockdamageaura,1", "give rainbow turretlings bonus items !!! follows (internalitemname),(count)"); TurretlingDemoChance = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "turretling demo chance ,.,,,.", 10f, "% chance to get a drunken gremlin ,.,."); TurretlingGibberishChance = ((BaseUnityPlugin)this).Config.Bind("Turretlings", "turretling demo gibberish chance ,.,,,.", 100f, "how often for demolings to go fghrgjnbvrfbjftgnbfg ,.,."); TurretlingBaseDamage = ((BaseUnityPlugin)this).Config.Bind("Turretling Stats", "Base Damage", 12f, "Damage the turretling deals. Blaster deals 100%(1x) base damage, Pixi Launcher deal 200%(2x) base damage. demoling grenade launcher does 300%(3x) base damage. Does not affect Turretling variants."); TurretlingBaseDamagePerLevel = ((BaseUnityPlugin)this).Config.Bind("Turretling Stats", "Base Damage Per Level", 3f, "Base Damage increase per level. Does not affect Turretling variants."); Language.collectLanguageRootFolders += CollectLanguageRootFolders; Hooks.Hook(); instance = this; string path = (assetDirectory = Path.Combine(Path.GetDirectoryName(typeof(SnowtimeToyboxMod).Assembly.Location), "assetbundles")); Debug.Log((object)"Ran Start!"); _stcharacterAssetBundle = AssetBundle.LoadFromFile(Path.Combine(path, "snowtimetoybox_characters")); ((MonoBehaviour)this).StartCoroutine(ShaderSwapper.UpgradeStubbedShadersAsync(_stcharacterAssetBundle)); _stdifficultyAssetBundle = AssetBundle.LoadFromFile(Path.Combine(path, "snowtimetoybox_difficulty")); _stitemAssetBundle = AssetBundle.LoadFromFile(Path.Combine(path, "snowtimetoybox_items")); Debug.Log((object)_stcharacterAssetBundle); Debug.Log((object)_stdifficultyAssetBundle); Debug.Log((object)_stitemAssetBundle); if (ToggleLegendary.Value) { AddDifficulty(); } AddCustomItems(); Content.AddCustomSkills(); Content.AddCustomAllies(); AddCustomBuffs(); Content.AddCustomEffects(); if (scepterLoaded) { Content.AddScepterSkills(); } ItemTag val = ItemAPI.AddItemTag("FriendTurret_Borbo_Whitelist"); Log.Debug("FriendTurret_Borbo_Whitelist: " + ((object)(ItemTag)(ref val)).ToString()); ItemTag val2 = ItemAPI.AddItemTag("FriendTurret_Shortcake_Whitelist"); Log.Debug("FriendTurret_Shortcake_Whitelist: " + ((object)(ItemTag)(ref val2)).ToString()); ItemTag val3 = ItemAPI.AddItemTag("FriendTurret_Snowtime_Whitelist"); Log.Debug("FriendTurret_Snowtime_Whitelist: " + ((object)(ItemTag)(ref val3)).ToString()); ItemTag val4 = ItemAPI.AddItemTag("FriendTurret_Acanthi_Whitelist"); Log.Debug("FriendTurret_Acanthi_Whitelist: " + ((object)(ItemTag)(ref val4)).ToString()); ItemTag val5 = ItemAPI.AddItemTag("FriendTurret_Bread_Whitelist"); Log.Debug("FriendTurret_Acanthi_Whitelist: " + ((object)(ItemTag)(ref val5)).ToString()); ItemTag val6 = ItemAPI.AddItemTag("GlobalFriendTurret_Whitelist"); Log.Debug("GlobalFriendTurret_Whitelist: " + ((object)(ItemTag)(ref val6)).ToString()); ItemTag val7 = ItemAPI.AddItemTag("FriendTurret_None_Whitelist"); Log.Debug("None FriendTurret_Whitelist: " + ((object)(ItemTag)(ref val7)).ToString()); ((ResourceAvailability)(ref ItemCatalog.availability)).CallWhenAvailable((Action)AddCustomTagsToItems); ((ResourceAvailability)(ref EquipmentCatalog.availability)).CallWhenAvailable((Action)AddElitesToList); } public void AddCustomItems() { foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase)) select type) { ((ItemBase)Activator.CreateInstance(item)).Init(((BaseUnityPlugin)this).Config); } } public void AddCustomTagsToItems() { Log.Debug("SnowtimeToybox is adding custom tags to items for Friendly Turrets/Drones..."); ItemDef[] array = (ItemDef[])(object)new ItemDef[7] { Items.Pearl, Items.ShinyPearl, Items.FallBoots, Items.BonusGoldPackOnKill, Items.FlatHealth, Items.Knurl, Items.CookedSteak }; ItemDef[] array2 = (ItemDef[])(object)new ItemDef[6] { Items.Syringe, Items.BossDamageBonus, Items.PermanentDebuffOnHit, Items.MoreMissile, Items.MeteorAttackOnHighDamage, Items.AttackSpeedPerNearbyAllyOrEnemy }; ItemDef[] array3 = (ItemDef[])(object)new ItemDef[18] { Items.Thorns, Items.BarrierOnKill, Items.HealWhileSafe, Items.ArmorPlate, Items.PersonalShield, Items.Infusion, Items.ChainLightning, Items.BarrierOnOverHeal, Items.Plant, Items.BounceNearby, Items.ShockNearby, Items.OutOfCombatArmor, Items.HalfSpeedDoubleHealth, Items.MissileVoid, Items.ChainLightningVoid, Items.MoreMissile, Items.ShieldBooster, Items.ShockDamageAura }; ItemDef[] array4 = (ItemDef[])(object)new ItemDef[8] { Items.Syringe, Items.IceRing, Items.PersonalShield, Items.SlowOnHit, Items.ElementalRingVoid, Items.SlowOnHitVoid, Items.MoreMissile, Items.ShieldBooster }; ItemDef[] array5 = (ItemDef[])(object)new ItemDef[14] { Items.Tooth, Items.BleedOnHit, Items.Syringe, Items.Clover, Items.LunarBadLuck, Items.DeathMark, Items.Seed, Items.Infusion, Items.IncreaseHealing, Items.NovaOnHeal, Items.BleedOnHitVoid, Items.MoreMissile, Items.TriggerEnemyDebuffs, Items.UltimateMeal }; ItemDef[] array6 = (ItemDef[])(object)new ItemDef[9] { Items.WardOnLevel, Items.Medkit, Items.BarrierOnKill, Items.BarrierOnOverHeal, Items.SprintArmor, Items.ArmorReductionOnHit, Items.IncreaseHealing, Items.MoreMissile, Items.BoostAllStats }; ItemDef[] array7 = (ItemDef[])(object)new ItemDef[1] { Items.BoostDamage }; ItemDef[] array8 = array; foreach (ItemDef val in array8) { Log.Debug("Added " + ((Object)val).name + " to global friendly turret item whitelist"); ItemAPI.ApplyTagToItem("GlobalFriendTurret_Whitelist", val); } array8 = array2; foreach (ItemDef val2 in array8) { Log.Debug("Added " + ((Object)val2).name + " to borbo turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_Borbo_Whitelist", val2); } array8 = array3; foreach (ItemDef val3 in array8) { Log.Debug("Added " + ((Object)val3).name + " to Strawberry Shortcake Turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_Shortcake_Whitelist", val3); } array8 = array4; foreach (ItemDef val4 in array8) { Log.Debug("Added " + ((Object)val4).name + " to Snowtime Turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_Snowtime_Whitelist", val4); } array8 = array5; foreach (ItemDef val5 in array8) { Log.Debug("Added " + ((Object)val5).name + " to acanthi turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_Acanthi_Whitelist", val5); } array8 = array6; foreach (ItemDef val6 in array8) { Log.Debug("Added " + ((Object)val6).name + " to bread turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_Bread_Whitelist", val6); } array8 = array7; foreach (ItemDef val7 in array8) { Log.Debug("Added " + ((Object)val7).name + " to bread turret's item whitelist"); ItemAPI.ApplyTagToItem("FriendTurret_None_Whitelist", val7); } AddCustomTagsToModdedItems(); } public void AddCustomTagsToModdedItems() { Log.Debug("SnowtimeToybox is adding custom tags to Modded items for Friendly Turrets/Drones..."); ItemDef[] itemDefs = ItemCatalog.itemDefs; foreach (ItemDef val in itemDefs) { string text = ""; if (itemStuff.TryGetValue(val.nameToken, out var value)) { text = value; } else { if (val.nameToken.Length > 6) { Dictionary dictionary = itemStuff; string nameToken = val.nameToken; if (dictionary.TryGetValue(nameToken.Substring(0, nameToken.Length - 5), out var value2)) { text = value2; goto IL_008f; } } if (itemStuff.TryGetValue(((Object)val).name, out var value3)) { text = value3; } } goto IL_008f; IL_008f: if (!Utility.IsNullOrWhiteSpace(text)) { string[] array = text.Split(','); foreach (string text2 in array) { Log.Debug("adding " + val.nameToken + " to " + text2 + " whitelist"); ItemAPI.ApplyTagToItem(text2, val); } } } } public void AddElitesToList() { //IL_0041: 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_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) Log.Debug("SnowtimeToybox is listing Elite equipment for inheritance..."); eliteDefsEquipInherit = new List(); EliteDef[] eliteDefs = EliteCatalog.eliteDefs; foreach (EliteDef val in eliteDefs) { if ((Object)(object)val.eliteEquipmentDef == (Object)null) { break; } EquipmentDef eliteEquipmentDef = val.eliteEquipmentDef; if (eliteEquipmentDef != null) { _ = eliteEquipmentDef.equipmentIndex; if (false) { break; } eliteDefsEquipInherit.Add(val.eliteEquipmentDef.equipmentIndex); string? obj = ((object)val.eliteEquipmentDef)?.ToString(); EquipmentIndex equipmentIndex = val.eliteEquipmentDef.equipmentIndex; Log.Debug("Elite Equipment: " + obj + " Index: " + ((object)(EquipmentIndex)(ref equipmentIndex)).ToString()); continue; } break; } } public void AddDifficulty() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_00cb: 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) Log.Debug("Adding SnowtimeToybox Custom Difficulty..."); if (riskierLoaded) { Log.Debug("2R4R detected, updating name to LASO and its description to match new gimmicks."); SnowtimeLegendaryDiffDef = new DifficultyDef(3.5f, "SNOWTIME_LASO_NAME", "SNOWTIME_LEGENDARY_ICON", "SNOWTIME_LASO_DESC", Color32.op_Implicit(new Color32((byte)168, (byte)50, (byte)50, byte.MaxValue)), "stLeg", false); } else { Log.Debug("2R4R not detected, adding Legendary."); SnowtimeLegendaryDiffDef = new DifficultyDef(3.5f, "SNOWTIME_LEGENDARY_NAME", "SNOWTIME_LEGENDARY_ICON", "SNOWTIME_LEGENDARY_DESC", Color32.op_Implicit(new Color32((byte)100, (byte)170, byte.MaxValue, byte.MaxValue)), "stLeg", false); } SnowtimeLegendaryDiffDef.iconSprite = _stdifficultyAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/_difficulty/texSnowtimeLegendaryPLNK.png"); SnowtimeLegendaryDiffDef.foundIconSprite = true; SnowtimeLegendaryDiffIndex = DifficultyAPI.AddDifficulty(SnowtimeLegendaryDiffDef); } public void AddCustomBuffs() { Log.Debug("Adding SnowtimeToybox Custom BuffDefs..."); foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(BuffBase)) select type) { Log.Debug(item.Name); ((BuffBase)Activator.CreateInstance(item)).Create(); } } public void CollectLanguageRootFolders(List folders) { folders.Add(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Language")); } private void Destroy() { Language.collectLanguageRootFolders -= CollectLanguageRootFolders; } private void Update() { } [ConCommand(/*Could not decode attribute arguments.*/)] public static void friendturretfindher(ConCommandArgs args) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: 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_004e: 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_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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00e8: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); Log.Info("case \"" + ((Scene)(ref activeScene)).name + "\":"); object[] obj = new object[6] { ((ConCommandArgs)(ref args)).senderBody.footPosition.x, ((ConCommandArgs)(ref args)).senderBody.footPosition.y, ((ConCommandArgs)(ref args)).senderBody.footPosition.z, null, null, null }; Quaternion rotation = ((ConCommandArgs)(ref args)).senderBody.modelLocator.modelTransform.rotation; obj[3] = ((Quaternion)(ref rotation)).eulerAngles.x; rotation = ((ConCommandArgs)(ref args)).senderBody.modelLocator.modelTransform.rotation; obj[4] = ((Quaternion)(ref rotation)).eulerAngles.y; rotation = ((ConCommandArgs)(ref args)).senderBody.modelLocator.modelTransform.rotation; obj[5] = ((Quaternion)(ref rotation)).eulerAngles.z; Log.Info(string.Format(" stagePositions.Add(new Vector3({0}f, {1}f, {2}f), Quaternion.Euler({3}f, {4}f, {5}f));", obj)); Log.Info(" break;"); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void spawnturret(ConCommandArgs args) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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) Log.Info("tryings to find " + ((ConCommandArgs)(ref args))[0] + ".,,. "); Object.Instantiate(friendlyTurretList.First((FriendlyTurretBase friendlyTurret) => friendlyTurret.turretName.Contains(((ConCommandArgs)(ref args))[0], StringComparison.InvariantCultureIgnoreCase)).broken, ((ConCommandArgs)(ref args)).senderBody.footPosition, ((ConCommandArgs)(ref args)).senderBody.transform.rotation); } [ConCommand(/*Could not decode attribute arguments.*/)] public static void listturret(ConCommandArgs args) { foreach (FriendlyTurretBase friendlyTurret in friendlyTurretList) { Log.Info(friendlyTurret.turretName); } } } public class Content { public static DroneDef FriendlyTurretTurretlingDef; public static InteractableSpawnCard FriendlyTurretTurretlingIsc; public static SkillFamily FriendlyTurretTurretlingPrimarySkillFamily; public static SkillFamily FriendlyTurretTurretlingPrimaryMinionSkillFamily; public static SkillFamily FriendlyTurretTurretlingSecondarySkillFamily; public static SkillFamily FriendlyTurretTurretlingUtilSkillFamily; public static SkillDef FriendlyTurretTurretlingPrimarySkillDef; public static SkillDef FriendlyTurretTurretlingPrimaryMinionSkillDef; public static SkillDef FriendlyTurretTurretlingPrimaryScepterSkillDef; public static SkillDef FriendlyTurretTurretlingPrimaryScepterMinionSkillDef; public static SkillDef FriendlyTurretTurretlingSecondarySkillDef; public static SkillDef FriendlyTurretTurretlingUtilSkillDef; public static GameObject FriendlyTurretTurretlingBody; public static GameObject FriendlyTurretTurretlingBodyRemoteOp; public static GameObject FriendlyTurretTurretlingMaster; public static GameObject FriendlyTurretTurretlingBroken; public static GameObject AcanthiTurretlingBody; public static GameObject AcanthiTurretlingMaster; public static GameObject BorboTurretlingBody; public static GameObject BorboTurretlingMaster; public static GameObject BreadTurretlingBody; public static GameObject BreadTurretlingMaster; public static GameObject ShortcakeTurretlingBody; public static GameObject ShortcakeTurretlingMaster; public static GameObject SnowtimeTurretlingBody; public static GameObject SnowtimeTurretlingMaster; public static DroneDef DTTurretlingDef; public static GameObject DTTurretlingBody; public static GameObject DTTurretlingMaster; public static GameObject DTTurretlingBroken; public static SkillFamily DTTurretlingSkillFamily; public static SkillDef DTTurretlingSkillDef; public static DroneDef DTDemoTurretlingDef; public static GameObject DTDemoTurretlingBody; public static GameObject DTDemoTurretlingMaster; public static GameObject DTDemoTurretlingBroken; public static SkillFamily ArtiPassiveFamily; public static SkillDef ArtiTurretSkill; public static SkillDef ArtiNoTurretSkill; public static DroneDef ArtiTurretlingDef; public static GameObject ArtiTurretlingBody; public static GameObject ArtiTurretlingMaster; public static GameObject ArtiTurretlingBroken; public static DroneDef DemoTurretlingDef; public static GameObject DemoTurretlingBody; public static GameObject DemoTurretlingMaster; public static GameObject DemoTurretlingBroken; public static GameObject DemoTurretlingProjectile; public static GameObject DemoTurretlingProjectileGhost; public static GameObject DemoTurretlingExplosEffect; public static InteractableSpawnCard DemoTurretlingIsc; public static SkillFamily DemoTurretlingPrimaryFamily; public static SkillDef DemoTurretlingPrimarySkill; public static SkillDef PassiveDemoTurretSkill; public static DroneDef PassiveDemoTurretlingDef; public static GameObject PassiveDemoTurretlingBody; public static GameObject PassiveDemoTurretlingMaster; public static GameObject PassiveDemoTurretlingBroken; public static SurvivorDef SwarmlingDef; public static GameObject SwarmlingBody; public static GameObject SwarmlingMaster; public static DroneDef SwarmlingMinionDef; public static GameObject SwarmlingMinionBody; public static GameObject SwarmlingMinionBroken; public static GameObject SwarmlingMinionMaster; public static DroneDef SwarmlingDemoMinionDef; public static GameObject SwarmlingDemoMinionBody; public static GameObject SwarmlingDemoMinionBroken; public static GameObject SwarmlingDemoMinionMaster; public static SkillFamily Swarmling_PassiveFamily1; public static SkillFamily Swarmling_PassiveFamily2; public static SkillFamily Swarmling_PassiveFamily3; public static SkillFamily Swarmling_PassiveFamily4; public static SkillFamily Swarmling_PassiveFamily5; public static SkillFamily Swarmling_PassiveFamily6; public static SkillDef SwarmlingPassiveMinion; public static SkillDef SwarmlingDemoPassiveMinion; public static SkillFamily SwarmlingSpecialFamily; public static SkillDef SwarmlingSpecialSkill; public static SkillFamily SwarmlingUtilityFamily; public static SkillDef SwarmlingUtilitySkill; public static DamageColorIndex BlasterScepterColor1; public static DamageColorIndex BlasterScepterColor2; public static DamageColorIndex BlasterScepterColor3; public static GameObject muzzlefx_acanthi; public static GameObject hitfx_acanthi; public static GameObject tracerfx_acanthi; public static GameObject muzzlefx_borbo; public static GameObject hitfx_borbo; public static GameObject tracerfx_borbo; public static GameObject hitfx_bread; public static GameObject muzzlefx_shortcake; public static GameObject hitfx_shortcake; public static GameObject tracerfx_shortcake; public static GameObject muzzlefx_snowtime; public static GameObject hitfx_snowtime; public static GameObject tracerfx_snowtime; public static GameObject muzzlefx_rainbow; public static GameObject hitfx_rainbow; public static GameObject tracerfx_rainbow; public static GameObject orbTurretlingMissileObject; public static GameObject orbTurretlingMissileImpactObject; public static GameObject orbAcanthilingMissileObject; public static GameObject orbAcanthilingMissileImpactObject; public static GameObject orbBorbolingMissileObject; public static GameObject orbBorbolingMissileImpactObject; public static GameObject orbBreadlingMissileObject; public static GameObject orbBreadlingMissileImpactObject; public static GameObject orbShortcakelingMissileObject; public static GameObject orbShortcakelingMissileImpactObject; public static GameObject orbSnowtimelingMissileObject; public static GameObject orbSnowtimelingMissileImpactObject; public static GameObject orbRainbowMissileObject; public static GameObject orbRainbowMissileImpactObject; public static GameObject orbPlayerMissileObject; public static GameObject orbPlayerMissileImpactObject; public static GameObject novafx; public static GameObject orbShortcakeRetaliateObject; public static GameObject orbShortcakeRetaliateImpactObject; public static GameObject orbShortcakeRetaliateFriendlyObject; public static GameObject orbShortcakeRetaliateFriendlyImpactObject; public static GameObject orbShortcakeTauntObject; public static GameObject orbShortcakeTauntImpactObject; public static GameObject deathfx; public static GameObject grenadeObject; public static GameObject grenadePlayerObject; public static GameObject grenadeGhostObject; public static GameObject grenadeImpactObject; public static GameObject grenadeImpactRainbowObject; public static GameObject effectPrefabObject; public static GameObject hitEffectPrefabObject; public static GameObject tracerEffectPrefabObject; public static GameObject muzzleflashEffectObject; public static GameObject projectileObject; public static GameObject projectileGhostObject; public static GameObject projectileExplosionObject; public static GameObject HaloMuzzleFlashObject; public static GameObject HaloTracerObject; public static GameObject HaloHitObject; public static GameObject HaloorbEffectObject; public static void AddCustomSkills() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01c7: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Expected O, but got Unknown //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Expected O, but got Unknown //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) Log.Debug("Adding SnowtimeToybox Custom Skills..."); ArtiPassiveFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/ArtificerHiddenPassiveFamily.asset"); ArtiNoTurretSkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/ArtificerNoTurretling.asset"); ArtiNoTurretSkill.activationState = new SerializableEntityStateType(typeof(Idle)); ArtiNoTurretSkill.activationStateMachineName = "gorp"; ArtiTurretSkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/ArtificerTurretling.asset"); ArtiTurretSkill.activationState = new SerializableEntityStateType(typeof(Idle)); ArtiTurretSkill.activationStateMachineName = "gorp"; PassiveDemoTurretSkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/ArtificerDemoTurretling.asset"); PassiveDemoTurretSkill.activationState = new SerializableEntityStateType(typeof(Idle)); PassiveDemoTurretSkill.activationStateMachineName = "gorp"; ContentAddition.AddSkillFamily(ArtiPassiveFamily); ContentAddition.AddSkillDef(ArtiNoTurretSkill); ContentAddition.AddSkillDef(ArtiTurretSkill); ContentAddition.AddSkillDef(PassiveDemoTurretSkill); string[] bodyNames; if (SnowtimeToyboxMod.TurretlingArtificerPassive.Value) { bodyNames = SnowtimeToyboxMod.TurretlingPassives.Value.Split(";"); ContentManager.onContentPacksAssigned += ContentManagerOnonContentPacksAssigned; } GameObject obj2 = Addressables.LoadAssetAsync((object)RoR2_DLC3_Drone_Tech.DroneTechBody_prefab).WaitForCompletion(); SkillFamily skillFamily = obj2.GetComponent().primary.skillFamily; SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/entskilldefFirePlasmaRifle.asset"); val.activationState = new SerializableEntityStateType(typeof(FirePlasmaRifle)); Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1); Variant[] variants = skillFamily.variants; int num = variants.Length - 1; Variant val2 = new Variant { skillDef = val }; ((Variant)(ref val2)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[num] = val2; bool flag = default(bool); ContentAddition.AddEntityState(typeof(FirePlasmaRifle), ref flag); ContentAddition.AddSkillDef(val); SkillDef val3 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/DroneTechTurretling.asset"); val3.activationState = new SerializableEntityStateType(typeof(Idle)); val3.activationStateMachineName = "gorp"; SkillDef val4 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/DroneTechTurretlingDemo.asset"); val4.activationState = new SerializableEntityStateType(typeof(Idle)); val4.activationStateMachineName = "gorp"; GenericSkill[] components = obj2.GetComponents(); foreach (GenericSkill val5 in components) { if (val5.skillName == "Drone1") { Log.Debug("Found Operator Passive SkillFamily 1!"); Array.Resize(ref val5.skillFamily.variants, val5.skillFamily.variants.Length + 2); Variant[] variants2 = val5.skillFamily.variants; int num2 = variants2.Length - 1; val2 = new Variant { skillDef = val3 }; ((Variant)(ref val2)).viewableNode = new Node(val3.skillNameToken, false, (Node)null); variants2[num2] = val2; Variant[] variants3 = val5.skillFamily.variants; int num3 = variants3.Length - 2; val2 = new Variant { skillDef = val4 }; ((Variant)(ref val2)).viewableNode = new Node(val4.skillNameToken, false, (Node)null); variants3[num3] = val2; } else if (val5.skillName == "Drone2") { Log.Debug("Found Operator Passive SkillFamily 2!"); Array.Resize(ref val5.skillFamily.variants, val5.skillFamily.variants.Length + 2); Variant[] variants4 = val5.skillFamily.variants; int num4 = variants4.Length - 1; val2 = new Variant { skillDef = val3 }; ((Variant)(ref val2)).viewableNode = new Node(val3.skillNameToken, false, (Node)null); variants4[num4] = val2; Variant[] variants5 = val5.skillFamily.variants; int num5 = variants5.Length - 2; val2 = new Variant { skillDef = val4 }; ((Variant)(ref val2)).viewableNode = new Node(val4.skillNameToken, false, (Node)null); variants5[num5] = val2; } } ContentAddition.AddSkillDef(val3); ContentAddition.AddSkillDef(val4); Addressables.LoadAssetAsync((object)RoR2_Base_Core.PlayerMaster_prefab).WaitForCompletion().AddComponent(); void ContentManagerOnonContentPacksAssigned(ReadOnlyArray obj) { //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_000f: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_016d: Expected O, but got Unknown //IL_016d: 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) Enumerator enumerator = obj.GetEnumerator(); try { while (enumerator.MoveNext()) { ReadOnlyContentPack current = enumerator.Current; AssetEnumerator enumerator2 = ((ReadOnlyContentPack)(ref current)).bodyPrefabs.GetEnumerator(); try { while (enumerator2.MoveNext()) { GameObject current2 = enumerator2.Current; try { string[] array = bodyNames; foreach (string text in array) { string text2 = text.Split(",")[0]; if (!(text2 != ((Object)current2).name)) { string text3 = text.Split(",")[1]; Log.Debug(text2 + " has turretling friend .,,. Its fragile so be careful!"); if (((Object)current2).name == text2) { GenericSkill val6 = current2.gameObject.AddComponent(); SkillFamily val7 = ScriptableObject.CreateInstance(); ((Object)val7).name = ((Object)current2).name.Replace(" (UnityEngine.GameObject)", "").ToString() + "TurretlingFamily"; val7.variants = Array.Empty(); Variant[] variants6 = ArtiPassiveFamily.variants; foreach (Variant val8 in variants6) { Array.Resize(ref val7.variants, val7.variants.Length + 1); Variant[] variants7 = val7.variants; int num6 = variants7.Length - 1; Variant val9 = new Variant { skillDef = val8.skillDef, unlockableDef = val8.unlockableDef }; ((Variant)(ref val9)).viewableNode = new Node(val8.skillDef.skillNameToken, false, (Node)null); variants7[num6] = val9; } ContentAddition.AddSkillFamily(val7); val6._skillFamily = val7; val6.skillName = "Turretling"; current2.gameObject.AddComponent().healRate = 0.05f; Log.Debug(" body prefab name " + ((Object)current2).name); LanguageAPI.Add("TURRETLING_" + ((Object)current2).name.ToUpper() + "_NAME", text3); } else { Log.Warning("unables to find body " + text2 + " !!!"); } } } } catch (Exception data) { Log.Warning(data); } } } finally { ((IDisposable)enumerator2).Dispose(); } } } finally { ((IDisposable)enumerator).Dispose(); } } } public static void AddCustomAllies() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_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_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: 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_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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_0777: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_0862: Unknown result type (might be due to invalid IL or missing references) //IL_0874: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b06: Unknown result type (might be due to invalid IL or missing references) //IL_0c1d: Unknown result type (might be due to invalid IL or missing references) //IL_0c22: Unknown result type (might be due to invalid IL or missing references) //IL_0ddc: Unknown result type (might be due to invalid IL or missing references) //IL_0de1: Unknown result type (might be due to invalid IL or missing references) //IL_0e1e: Unknown result type (might be due to invalid IL or missing references) //IL_0e23: Unknown result type (might be due to invalid IL or missing references) //IL_0e51: Unknown result type (might be due to invalid IL or missing references) //IL_0e56: Unknown result type (might be due to invalid IL or missing references) //IL_0f2d: Unknown result type (might be due to invalid IL or missing references) //IL_0f3f: Unknown result type (might be due to invalid IL or missing references) //IL_0f8d: Unknown result type (might be due to invalid IL or missing references) //IL_0f92: Unknown result type (might be due to invalid IL or missing references) //IL_107d: Unknown result type (might be due to invalid IL or missing references) //IL_1082: Unknown result type (might be due to invalid IL or missing references) //IL_1152: Unknown result type (might be due to invalid IL or missing references) //IL_1157: Unknown result type (might be due to invalid IL or missing references) //IL_11c4: Unknown result type (might be due to invalid IL or missing references) //IL_11c9: Unknown result type (might be due to invalid IL or missing references) //IL_11da: Unknown result type (might be due to invalid IL or missing references) //IL_1223: Unknown result type (might be due to invalid IL or missing references) //IL_12ba: Unknown result type (might be due to invalid IL or missing references) //IL_12bf: Unknown result type (might be due to invalid IL or missing references) //IL_12ca: Unknown result type (might be due to invalid IL or missing references) //IL_12d2: Unknown result type (might be due to invalid IL or missing references) //IL_12d4: Unknown result type (might be due to invalid IL or missing references) //IL_12d9: Unknown result type (might be due to invalid IL or missing references) //IL_12e0: Unknown result type (might be due to invalid IL or missing references) //IL_12e8: Expected O, but got Unknown //IL_12e8: Unknown result type (might be due to invalid IL or missing references) //IL_12ed: Unknown result type (might be due to invalid IL or missing references) //IL_12f4: Unknown result type (might be due to invalid IL or missing references) //IL_12f6: Unknown result type (might be due to invalid IL or missing references) //IL_12fc: Expected O, but got Unknown //IL_12fc: Unknown result type (might be due to invalid IL or missing references) //IL_1301: Unknown result type (might be due to invalid IL or missing references) //IL_130c: Unknown result type (might be due to invalid IL or missing references) //IL_1314: Unknown result type (might be due to invalid IL or missing references) //IL_1316: Unknown result type (might be due to invalid IL or missing references) //IL_131b: Unknown result type (might be due to invalid IL or missing references) //IL_1326: Unknown result type (might be due to invalid IL or missing references) //IL_132f: Expected O, but got Unknown //IL_132f: Unknown result type (might be due to invalid IL or missing references) //IL_1334: Unknown result type (might be due to invalid IL or missing references) //IL_133c: Unknown result type (might be due to invalid IL or missing references) //IL_133e: Unknown result type (might be due to invalid IL or missing references) //IL_1345: Expected O, but got Unknown //IL_152e: Unknown result type (might be due to invalid IL or missing references) //IL_1533: Unknown result type (might be due to invalid IL or missing references) //IL_1552: Unknown result type (might be due to invalid IL or missing references) //IL_1560: Unknown result type (might be due to invalid IL or missing references) //IL_1786: Unknown result type (might be due to invalid IL or missing references) //IL_178b: Unknown result type (might be due to invalid IL or missing references) //IL_1790: Unknown result type (might be due to invalid IL or missing references) //IL_1791: Unknown result type (might be due to invalid IL or missing references) //IL_1817: Unknown result type (might be due to invalid IL or missing references) //IL_181d: Unknown result type (might be due to invalid IL or missing references) //IL_181e: Unknown result type (might be due to invalid IL or missing references) //IL_17c6: Unknown result type (might be due to invalid IL or missing references) //IL_17d0: Unknown result type (might be due to invalid IL or missing references) //IL_17d1: Unknown result type (might be due to invalid IL or missing references) //IL_17e1: Unknown result type (might be due to invalid IL or missing references) //IL_17eb: Unknown result type (might be due to invalid IL or missing references) //IL_17ec: Unknown result type (might be due to invalid IL or missing references) //IL_17fc: Unknown result type (might be due to invalid IL or missing references) //IL_1806: Unknown result type (might be due to invalid IL or missing references) //IL_1807: Unknown result type (might be due to invalid IL or missing references) SnowtimeToyboxMod.bodyFlags = (BodyFlags)0; if (SnowtimeToyboxMod.FriendlyTurretImmuneVoidDeath.Value) { SnowtimeToyboxMod.bodyFlags = (BodyFlags)(SnowtimeToyboxMod.bodyFlags | 0xA40); } if (SnowtimeToyboxMod.FriendlyTurretFallImmunity.Value) { SnowtimeToyboxMod.bodyFlags = (BodyFlags)(SnowtimeToyboxMod.bodyFlags | 1); } if (SnowtimeToyboxMod.FriendlyTurretDrone.Value) { SnowtimeToyboxMod.bodyFlags = (BodyFlags)(SnowtimeToyboxMod.bodyFlags | 0x400000); } foreach (Type item in from type in Assembly.GetExecutingAssembly().GetTypes() where !type.IsAbstract && type.IsSubclassOf(typeof(FriendlyTurretBase)) select type) { FriendlyTurretBase obj = (FriendlyTurretBase)Activator.CreateInstance(item); obj.Initalization(); obj.ContentAdditionFuncs(); obj.StageInteractableFuncs(); obj.PostInit(); } BlasterScepterColor1 = ColorsAPI.RegisterDamageColor(new Color(1f, 0.1f, 0.1f)); BlasterScepterColor2 = ColorsAPI.RegisterDamageColor(new Color(0.1f, 1f, 0.1f)); BlasterScepterColor3 = ColorsAPI.RegisterDamageColor(new Color(0.1f, 0.7f, 1f)); Log.Debug("Defining Turretling(s)..."); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/"; FriendlyTurretTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_TurretlingBody.prefab"); FriendlyTurretTurretlingBodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_TurretlingBodyRemoteOp.prefab"); FriendlyTurretTurretlingBody.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value; FriendlyTurretTurretlingBody.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value; FriendlyTurretTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); FriendlyTurretTurretlingBodyRemoteOp.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value; FriendlyTurretTurretlingBodyRemoteOp.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value; FriendlyTurretTurretlingBodyRemoteOp.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); FriendlyTurretTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_TurretlingMaster.prefab"); FriendlyTurretTurretlingPrimarySkillFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingPrimaryFamily.asset"); FriendlyTurretTurretlingPrimaryMinionSkillFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingPrimaryFamilyMinion.asset"); FriendlyTurretTurretlingPrimarySkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Primary.asset"); FriendlyTurretTurretlingPrimaryMinionSkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Primary_Minion.asset"); FriendlyTurretTurretlingPrimarySkillDef.activationState = new SerializableEntityStateType(typeof(TurretlingBlaster)); FriendlyTurretTurretlingPrimaryMinionSkillDef.activationState = new SerializableEntityStateType(typeof(TurretlingBlaster)); FriendlyTurretTurretlingSecondarySkillFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingSecondaryFamily.asset"); FriendlyTurretTurretlingSecondarySkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Secondary.asset"); FriendlyTurretTurretlingSecondarySkillDef.activationState = new SerializableEntityStateType(typeof(TurretlingMissile)); FriendlyTurretTurretlingUtilSkillFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingUtilityFamily.asset"); FriendlyTurretTurretlingUtilSkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingShenanigans.asset"); FriendlyTurretTurretlingUtilSkillDef.activationState = new SerializableEntityStateType(typeof(Shenanigans)); FriendlyTurretTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_Turretling.asset"); FriendlyTurretTurretlingMaster.AddComponent(); ContentAddition.AddDroneDef(FriendlyTurretTurretlingDef); bool flag = default(bool); ContentAddition.AddEntityState(typeof(TurretlingDeath), ref flag); ContentAddition.AddEntityState(typeof(TurretlingBlaster), ref flag); ContentAddition.AddEntityState(typeof(TurretlingMissile), ref flag); ContentAddition.AddBody(FriendlyTurretTurretlingBody); ContentAddition.AddBody(FriendlyTurretTurretlingBodyRemoteOp); ContentAddition.AddMaster(FriendlyTurretTurretlingMaster); ContentAddition.AddSkillFamily(FriendlyTurretTurretlingPrimarySkillFamily); ContentAddition.AddSkillFamily(FriendlyTurretTurretlingPrimaryMinionSkillFamily); ContentAddition.AddSkillDef(FriendlyTurretTurretlingPrimarySkillDef); ContentAddition.AddSkillDef(FriendlyTurretTurretlingPrimaryMinionSkillDef); ContentAddition.AddSkillFamily(FriendlyTurretTurretlingSecondarySkillFamily); ContentAddition.AddSkillDef(FriendlyTurretTurretlingSecondarySkillDef); AcanthiTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingBody_Acanthi.prefab"); AcanthiTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); AcanthiTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingMaster_Acanthi.prefab"); BorboTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingBody_Borbo.prefab"); BorboTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); BorboTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingMaster_Borbo.prefab"); BreadTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingBody_Bread.prefab"); BreadTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); BreadTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingMaster_Bread.prefab"); ShortcakeTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingBody_Shortcake.prefab"); ShortcakeTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); ShortcakeTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingMaster_Shortcake.prefab"); SnowtimeTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingBody_Snowtime.prefab"); SnowtimeTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); SnowtimeTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Variants/_TurretlingMaster_Snowtime.prefab"); ContentAddition.AddBody(AcanthiTurretlingBody); ContentAddition.AddMaster(AcanthiTurretlingMaster); ContentAddition.AddBody(BorboTurretlingBody); ContentAddition.AddMaster(BorboTurretlingMaster); ContentAddition.AddBody(BreadTurretlingBody); ContentAddition.AddMaster(BreadTurretlingMaster); ContentAddition.AddBody(ShortcakeTurretlingBody); ContentAddition.AddMaster(ShortcakeTurretlingMaster); ContentAddition.AddBody(SnowtimeTurretlingBody); ContentAddition.AddMaster(SnowtimeTurretlingMaster); ArtiTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_HolyTurretling.asset"); ArtiTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_HolyTurretlingBody.prefab"); ArtiTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); ArtiTurretlingBody.AddComponent(); ArtiTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_HolyTurretlingMaster.prefab"); ArtiTurretlingMaster.AddComponent(); ArtiTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; ArtiTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_HolyTurretlingBroken.prefab"); ArtiTurretlingBroken.AddComponent(); ArtiTurretlingBody.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value / 1.5f; ArtiTurretlingBody.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value / 1.5f; ContentAddition.AddDroneDef(ArtiTurretlingDef); ContentAddition.AddBody(ArtiTurretlingBody); ContentAddition.AddMaster(ArtiTurretlingMaster); ContentAddition.AddBody(ArtiTurretlingBroken); DTTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretling.asset"); DTTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretlingBody.prefab"); DTTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); DTTurretlingBody.GetComponent().droneState = (DroneState)0; DTTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretlingMaster.prefab"); DTTurretlingMaster.AddComponent(); DTTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; DTTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretlingBroken.prefab"); DTTurretlingSkillFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/DTTurretlingSpecialFamily.asset"); DTTurretlingSkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/DTTurretling_Special.asset"); DTTurretlingSkillDef.activationState = new SerializableEntityStateType(typeof(DTTurretlingRainbowize)); ContentAddition.AddDroneDef(DTTurretlingDef); ContentAddition.AddBody(DTTurretlingBody); ContentAddition.AddMaster(DTTurretlingMaster); ContentAddition.AddBody(DTTurretlingBroken); ContentAddition.AddSkillFamily(DTTurretlingSkillFamily); ContentAddition.AddSkillDef(DTTurretlingSkillDef); ContentAddition.AddEntityState(typeof(DTTurretlingDeath), ref flag); ContentAddition.AddEntityState(typeof(DTTurretlingRainbowize), ref flag); DTDemoTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretling_Demo.asset"); DTDemoTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretling_DemoBody.prefab"); DTDemoTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); DTDemoTurretlingBody.GetComponent().droneState = (DroneState)0; DTDemoTurretlingBody.AddComponent(); DTDemoTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretling_DemoMaster.prefab"); DTDemoTurretlingMaster.AddComponent(); DTDemoTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; DTDemoTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DTTurretling_DemoBroken.prefab"); ContentAddition.AddDroneDef(DTDemoTurretlingDef); ContentAddition.AddBody(DTDemoTurretlingBody); ContentAddition.AddMaster(DTDemoTurretlingMaster); ContentAddition.AddBody(DTDemoTurretlingBroken); PassiveDemoTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DManTurretling.asset"); PassiveDemoTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DManTurretlingBody.prefab"); PassiveDemoTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); PassiveDemoTurretlingBody.AddComponent(); PassiveDemoTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DManTurretlingMaster.prefab"); PassiveDemoTurretlingMaster.AddComponent(); PassiveDemoTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; PassiveDemoTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/Turretling/_DManTurretlingBroken.prefab"); PassiveDemoTurretlingBroken.AddComponent(); PassiveDemoTurretlingBody.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value / 1.5f; PassiveDemoTurretlingBody.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value / 1.5f; PassiveDemoTurretlingBody.AddComponent(); ContentAddition.AddDroneDef(PassiveDemoTurretlingDef); ContentAddition.AddBody(PassiveDemoTurretlingBody); ContentAddition.AddMaster(PassiveDemoTurretlingMaster); ContentAddition.AddBody(PassiveDemoTurretlingBroken); string text2 = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/"; SwarmlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Swarmling.asset"); SwarmlingMinionDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretling.asset"); SwarmlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_TurretlingSurvivorBody.prefab"); SwarmlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_TurretlingSurvivorMonsterMaster.prefab"); SwarmlingBody.GetComponent().hasOneShotProtection = SnowtimeToyboxMod.SwarmlingOSP.Value; SwarmlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); SwarmlingBody.AddComponent(); SwarmlingBody.AddComponent(); SwarmlingBody.AddComponent(); SwarmlingBody.GetComponent().baseDamage = SnowtimeToyboxMod.SwarmlingBaseDamage.Value; SwarmlingBody.GetComponent().levelDamage = SnowtimeToyboxMod.SwarmlingDamagePerLevel.Value; SwarmlingBody.GetComponent().maxHealth = SnowtimeToyboxMod.SwarmlingBaseMaxHealth.Value; SwarmlingBody.GetComponent().levelMaxHealth = SnowtimeToyboxMod.SwarmlingMaxHealthPerLevel.Value; SwarmlingBody.GetComponent().baseRegen = SnowtimeToyboxMod.SwarmlingBaseRegen.Value; SwarmlingBody.GetComponent().levelRegen = SnowtimeToyboxMod.SwarmlingRegenPerLevel.Value; SwarmlingBody.GetComponent().baseArmor = SnowtimeToyboxMod.SwarmlingBaseArmor.Value; SwarmlingBody.AddComponent().healRate = 0.05f; SwarmlingMinionBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretlingBody.prefab"); SwarmlingMinionBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); SwarmlingMinionBody.AddComponent(); SwarmlingMinionBody.AddComponent(); SwarmlingMinionBody.AddComponent(); SwarmlingMinionBody.GetComponent().baseDamage = SnowtimeToyboxMod.SwarmlingBaseDamage.Value / SnowtimeToyboxMod.SwarmlingMinionStatMult.Value; SwarmlingMinionBody.GetComponent().levelDamage = SnowtimeToyboxMod.SwarmlingDamagePerLevel.Value / SnowtimeToyboxMod.SwarmlingMinionStatMult.Value; SwarmlingMinionBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretlingBroken.prefab"); SwarmlingMinionMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretlingMaster.prefab"); SwarmlingMinionMaster.AddComponent(); SwarmlingMinionMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; Swarmling_PassiveFamily1 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily1.asset"); Swarmling_PassiveFamily2 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily2.asset"); Swarmling_PassiveFamily3 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily3.asset"); Swarmling_PassiveFamily4 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily4.asset"); Swarmling_PassiveFamily5 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily5.asset"); Swarmling_PassiveFamily6 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarm_PassiveFamily6.asset"); SwarmlingSpecialFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/TurretlingSpecialFamilySurvivor.asset"); SwarmlingUtilityFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/TurretlingUtilityFamilySurvivor.asset"); SwarmlingPassiveMinion = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarmling.asset"); SwarmlingPassiveMinion.activationState = new SerializableEntityStateType(typeof(Idle)); SwarmlingPassiveMinion.activationStateMachineName = "gorp"; SwarmlingSpecialSkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Turretling_SpecialSurvivor.asset"); SwarmlingSpecialSkill.activationState = new SerializableEntityStateType(typeof(TurretlingEnergyNova)); SwarmlingUtilitySkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Turretling_UtilitySurvivor.asset"); SwarmlingUtilitySkill.activationState = new SerializableEntityStateType(typeof(TurretlingMiniBlinkState)); ContentAddition.AddSurvivorDef(SwarmlingDef); ContentAddition.AddDroneDef(SwarmlingMinionDef); ContentAddition.AddBody(SwarmlingBody); ContentAddition.AddMaster(SwarmlingMaster); ContentAddition.AddBody(SwarmlingMinionBody); ContentAddition.AddBody(SwarmlingMinionBroken); ContentAddition.AddMaster(SwarmlingMinionMaster); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily1); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily2); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily3); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily4); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily5); ContentAddition.AddSkillFamily(Swarmling_PassiveFamily6); ContentAddition.AddSkillFamily(SwarmlingSpecialFamily); ContentAddition.AddSkillFamily(SwarmlingUtilityFamily); ContentAddition.AddSkillDef(SwarmlingPassiveMinion); ContentAddition.AddSkillDef(SwarmlingSpecialSkill); ContentAddition.AddSkillDef(SwarmlingUtilitySkill); ContentAddition.AddEntityState(typeof(TurretlingEnergyNova), ref flag); ContentAddition.AddEntityState(typeof(TurretlingMiniBlinkState), ref flag); SwarmlingDemoMinionDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretling_Demo.asset"); SwarmlingDemoMinionBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretling_DemoBody.prefab"); SwarmlingDemoMinionBody.GetComponent().deathState = new SerializableEntityStateType(typeof(DTTurretlingDeath)); SwarmlingDemoMinionBody.AddComponent(); SwarmlingDemoMinionBody.AddComponent(); SwarmlingDemoMinionBody.AddComponent(); SwarmlingDemoMinionBody.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value / 2f; SwarmlingDemoMinionBody.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value / 2f; SwarmlingDemoMinionBody.AddComponent(); SwarmlingDemoMinionBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretling_DemoBroken.prefab"); SwarmlingDemoMinionMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "_SwarmTurretling_DemoMaster.prefab"); SwarmlingDemoMinionMaster.AddComponent(); SwarmlingDemoMinionMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; SwarmlingDemoPassiveMinion = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text2 + "Skills/Swarmling_Demo.asset"); SwarmlingDemoPassiveMinion.activationState = new SerializableEntityStateType(typeof(Idle)); SwarmlingDemoPassiveMinion.activationStateMachineName = "gorp"; ContentAddition.AddDroneDef(SwarmlingDemoMinionDef); ContentAddition.AddBody(SwarmlingDemoMinionBody); ContentAddition.AddBody(SwarmlingDemoMinionBroken); ContentAddition.AddMaster(SwarmlingDemoMinionMaster); ContentAddition.AddSkillDef(SwarmlingDemoPassiveMinion); DemoTurretlingDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_DemoTurretling.asset"); DemoTurretlingBody = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_DemoTurretlingBody.prefab"); DemoTurretlingBody.GetComponent().baseDamage = SnowtimeToyboxMod.TurretlingBaseDamage.Value; DemoTurretlingBody.GetComponent().levelDamage = SnowtimeToyboxMod.TurretlingBaseDamagePerLevel.Value; DemoTurretlingBody.AddComponent(); DemoTurretlingBody.GetComponent().deathState = new SerializableEntityStateType(typeof(TurretlingDeath)); DemoTurretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_DemoTurretlingMaster.prefab"); DemoTurretlingMaster.AddComponent(); DemoTurretlingPrimaryFamily = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/TurretlingPrimaryFamilyAlt.asset"); DemoTurretlingPrimarySkill = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Primary_GL.asset"); DemoTurretlingPrimarySkill.activationState = new SerializableEntityStateType(typeof(TurretlingGrenadeLauncher)); ContentAddition.AddEntityState(typeof(TurretlingGrenadeLauncher), ref flag); ContentAddition.AddSkillDef(DemoTurretlingPrimarySkill); ContentAddition.AddSkillFamily(DemoTurretlingPrimaryFamily); ContentAddition.AddBody(DemoTurretlingBody); ContentAddition.AddMaster(DemoTurretlingMaster); ContentAddition.AddDroneDef(DemoTurretlingDef); ContentAddition.AddEntityState(typeof(Shenanigans), ref flag); SwarmlingBody.GetComponent().dontRaycastToPivot = true; FriendlyTurretTurretlingBodyRemoteOp.GetComponent().dontRaycastToPivot = true; FriendlyTurretTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/_mdlTurretlingBroken.prefab"); FriendlyTurretTurretlingBroken.AddComponent(); FriendlyTurretTurretlingIsc = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/_iscBrokenTurretling.asset"); DemoTurretlingBroken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/_DemoTurretlingBroken.prefab"); DemoTurretlingIsc = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/_iscBrokenDemoTurretling.asset"); ContentAddition.AddNetworkedObject(FriendlyTurretTurretlingBroken); ContentAddition.AddNetworkedObject(DemoTurretlingBroken); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)FriendlyTurretTurretlingIsc, selectionWeight = 14, spawnDistance = (MonsterSpawnDistance)0, minimumStageCompletions = 0, preventOverhead = false }; DirectorCardHolder val = new DirectorCardHolder { Card = card, InteractableCategory = (InteractableCategory)5 }; DirectorCard card2 = new DirectorCard { spawnCard = (SpawnCard)(object)DemoTurretlingIsc, selectionWeight = 67, spawnDistance = (MonsterSpawnDistance)0, minimumStageCompletions = 69420, preventOverhead = false }; DirectorCardHolder val2 = new DirectorCardHolder { Card = card2, InteractableCategory = (InteractableCategory)5 }; List list = new List(); List list2 = new List(); list.Add((Stage)2); list.Add((Stage)4); list.Add((Stage)67108864); list.Add((Stage)1073741824); list.Add((Stage)2147483648u); list.Add((Stage)16); list.Add((Stage)262144); list.Add((Stage)70368744177664L); list.Add((Stage)32); list.Add((Stage)64); list.Add((Stage)17592186044416L); list.Add((Stage)35184372088832L); list.Add((Stage)256); list.Add((Stage)131072); list.Add((Stage)140737488355328L); list.Add((Stage)8796093022208L); list.Add((Stage)16384); list2.Add("FBLScene"); list2.Add("broadcastperch_wormsworms"); list2.Add("sunkentombs_wormsworms"); list2.Add("tropics_wormsworms"); list2.Add("tropicsnight_wormsworms"); list2.Add("hollowsummit_wormsworms"); list2.Add("hollowsummitnight_wormsworms"); list2.Add("catacombs_DS1_Catacombs"); list2.Add("snowtime_bloodgulch"); list2.Add("snowtime_deathisland"); list2.Add("snowtime_gephyrophobia"); list2.Add("snowtime_gmconstruct"); list2.Add("snowtime_gmflatgrass"); list2.Add("snowtime_halo"); list2.Add("snowtime_halo2"); list2.Add("snowtime_highcharity"); list2.Add("snowtime_icefields"); list2.Add("snowtime_newmombasabridge"); list2.Add("snowtime_odstmombasa"); list2.Add("snowtime_plrhightower"); list2.Add("snowtime_sandtrap"); list2.Add("snowtime_sidewinder"); foreach (Stage item2 in list) { Stage current = item2; Log.Debug("Adding Turretlings to stage: " + ((object)(Stage)(ref current)).ToString()); Helpers.AddNewInteractableToStage(val, current, ""); Helpers.AddNewInteractableToStage(val2, current, ""); } foreach (string item3 in list2) { Log.Debug("Adding Turretlings to custom stage (if present, will log regardless): " + item3); Helpers.AddNewInteractableToStage(val, (Stage)1, item3); Helpers.AddNewInteractableToStage(val2, (Stage)1, item3); } List list3 = new List(12) { FriendlyTurretTurretlingBody, AcanthiTurretlingBody, BorboTurretlingBody, ShortcakeTurretlingBody, SnowtimeTurretlingBody, BreadTurretlingBody, DTTurretlingBody, DTDemoTurretlingBody, FriendlyTurretTurretlingBodyRemoteOp, ArtiTurretlingBody, DemoTurretlingBody, PassiveDemoTurretlingBody }; foreach (GameObject item4 in list3) { item4.AddComponent(); if (!((Object)item4.gameObject).name.Contains("RemoteOp")) { item4.AddComponent(); } } FriendlyTurretTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; BorboTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_Borbo_Whitelist"; SnowtimeTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_Snowtime_Whitelist"; AcanthiTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_Acanthi_Whitelist"; BreadTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_Bread_Whitelist"; ShortcakeTurretlingMaster.AddComponent().whitelistedTag = "FriendTurret_Shortcake_Whitelist"; ArtiTurretlingBody.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; DemoTurretlingBody.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; PassiveDemoTurretlingBody.AddComponent().whitelistedTag = "FriendTurret_None_Whitelist"; foreach (GameObject item5 in list3) { CharacterBody component = item5.GetComponent(); component.bodyFlags |= SnowtimeToyboxMod.bodyFlags; } if (SnowtimeToyboxMod.TurretlingImmuneVoidDeath.Value) { CharacterBody component2 = FriendlyTurretTurretlingBody.GetComponent(); component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0xA40); CharacterBody component3 = SwarmlingMinionBody.GetComponent(); component3.bodyFlags = (BodyFlags)(component3.bodyFlags | 0xA40); CharacterBody component4 = SwarmlingDemoMinionBody.GetComponent(); component4.bodyFlags = (BodyFlags)(component4.bodyFlags | 0xA40); } CharacterBody component5 = SwarmlingMinionBody.GetComponent(); component5.bodyFlags = (BodyFlags)(component5.bodyFlags | 1); if (!SnowtimeToyboxMod.scepterLoaded) { DemoTurretlingPrimarySkill.keywordTokens = new string[1] { "TURRETLING_SKILL7_KEYWORD" }; } } public static void AddCustomEffects() { string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/"; orbShortcakeRetaliateObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcakeretaliate_orbeffect.prefab"); orbShortcakeRetaliateImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcakeretaliate_impacteffect.prefab"); orbShortcakeRetaliateFriendlyObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcakeretaliatefriendly_orbeffect.prefab"); orbShortcakeRetaliateFriendlyImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcakeretaliatefriendly_impacteffect.prefab"); orbShortcakeTauntObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcaketaunt_orbeffect.prefab"); orbShortcakeTauntImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/Skills/shortcaketaunt_impacteffect.prefab"); orbTurretlingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/turretling_orbeffect.prefab"); orbTurretlingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/turretling_impacteffect.prefab"); orbAcanthilingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb_Acanthiling.prefab"); orbAcanthilingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact_Acanthiling.prefab"); orbBorbolingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb_Borboling.prefab"); orbBorbolingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact_Borboling.prefab"); orbBreadlingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb_Breadling.prefab"); orbBreadlingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact_Breadling.prefab"); orbShortcakelingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb_Shortcakeling.prefab"); orbShortcakelingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact_Shortcakeling.prefab"); orbSnowtimelingMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb_Snowtimeling.prefab"); orbSnowtimelingMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact_Snowtimeling.prefab"); orbRainbowMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb__Rainbow.prefab"); orbRainbowMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact__Rainbow.prefab"); orbPlayerMissileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Orb__Player.prefab"); orbPlayerMissileImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx__Missile_Impact__Player.prefab"); muzzlefx_acanthi = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Muzzleflash_Acanthiling.prefab"); hitfx_acanthi = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark_Acanthiling.prefab"); tracerfx_acanthi = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Tracer_Acanthiling.prefab"); muzzlefx_borbo = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Muzzleflash_Borboling.prefab"); hitfx_borbo = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark_Borboling.prefab"); tracerfx_borbo = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Tracer_Borboling.prefab"); hitfx_bread = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark_Breadling.prefab"); muzzlefx_shortcake = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Muzzleflash_Shortcakeling.prefab"); hitfx_shortcake = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark_Shortcakeling.prefab"); tracerfx_shortcake = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Tracer_Shortcakeling.prefab"); muzzlefx_snowtime = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Muzzleflash_Snowtimeling.prefab"); hitfx_snowtime = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark_Snowtimeling.prefab"); tracerfx_snowtime = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Tracer_Snowtimeling.prefab"); muzzlefx_rainbow = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Muzzleflash__Rainbow.prefab"); hitfx_rainbow = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Hitspark__Rainbow.prefab"); tracerfx_rainbow = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "vfx_Tracer__Rainbow.prefab"); novafx = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Survivor/Skills/turretling_novaeffect.prefab"); deathfx = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/turretling_deatheffect.prefab"); grenadeObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/TurretlingDemoGrenadeProjectile.prefab"); grenadePlayerObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/TurretlingDemoGrenadeProjectile_Player.prefab"); grenadeGhostObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/DemoGrenadeGhost.prefab"); grenadeImpactObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/GrenadeImpact.prefab"); grenadeImpactRainbowObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Skills/GrenadeImpact_Rainbow.prefab"); effectPrefabObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/Skills/MuzzleflashBorbo.prefab"); hitEffectPrefabObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/Skills/ExplosionBorbo.prefab"); tracerEffectPrefabObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/Skills/TracerBorbo.prefab"); muzzleflashEffectObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Snowtime/Skills/CryoGaussMuzzleFlash.prefab"); projectileObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Snowtime/Skills/CryoGaussProjectile.prefab"); projectileGhostObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Snowtime/Skills/CryoGaussProjectileGhost.prefab"); projectileExplosionObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Snowtime/Skills/CryoGaussExplosion.prefab"); HaloMuzzleFlashObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/PlasmaRifleMuzzleFlashVFX.prefab"); HaloTracerObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/TracerPlasmaRifle.prefab"); HaloHitObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/PlasmaRifleImpactVFX.prefab"); HaloorbEffectObject = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/PlasmaRifleOrbEffect.prefab"); ContentAddition.AddEffect(muzzleflashEffectObject); ContentAddition.AddProjectile(projectileObject); ContentAddition.AddEffect(projectileGhostObject); ContentAddition.AddEffect(projectileExplosionObject); ContentAddition.AddEffect(effectPrefabObject); ContentAddition.AddEffect(hitEffectPrefabObject); ContentAddition.AddEffect(tracerEffectPrefabObject); ContentAddition.AddEffect(HaloMuzzleFlashObject); ContentAddition.AddEffect(HaloTracerObject); ContentAddition.AddEffect(HaloHitObject); ContentAddition.AddEffect(HaloorbEffectObject); ContentAddition.AddEffect(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/DroneTech/PlasmaRifle/PlasmaRifleImpactVFXRico.prefab")); ContentAddition.AddEffect(BorboCheck.turretUseEffect); ContentAddition.AddEffect(deathfx); ContentAddition.AddEffect(orbShortcakeRetaliateObject); ContentAddition.AddEffect(orbShortcakeRetaliateFriendlyObject); ContentAddition.AddEffect(orbShortcakeTauntObject); ContentAddition.AddEffect(orbShortcakeRetaliateImpactObject); ContentAddition.AddEffect(orbShortcakeRetaliateFriendlyImpactObject); ContentAddition.AddEffect(orbShortcakeTauntImpactObject); ContentAddition.AddEffect(orbTurretlingMissileObject); ContentAddition.AddEffect(orbTurretlingMissileImpactObject); ContentAddition.AddEffect(muzzlefx_acanthi); ContentAddition.AddEffect(hitfx_acanthi); ContentAddition.AddEffect(tracerfx_acanthi); ContentAddition.AddEffect(orbAcanthilingMissileObject); ContentAddition.AddEffect(orbAcanthilingMissileImpactObject); ContentAddition.AddEffect(muzzlefx_borbo); ContentAddition.AddEffect(hitfx_borbo); ContentAddition.AddEffect(tracerfx_borbo); ContentAddition.AddEffect(orbBorbolingMissileObject); ContentAddition.AddEffect(orbBorbolingMissileImpactObject); ContentAddition.AddEffect(hitfx_bread); ContentAddition.AddEffect(orbBreadlingMissileObject); ContentAddition.AddEffect(orbBreadlingMissileImpactObject); ContentAddition.AddEffect(muzzlefx_shortcake); ContentAddition.AddEffect(hitfx_shortcake); ContentAddition.AddEffect(tracerfx_shortcake); ContentAddition.AddEffect(orbShortcakelingMissileObject); ContentAddition.AddEffect(orbShortcakelingMissileImpactObject); ContentAddition.AddEffect(muzzlefx_snowtime); ContentAddition.AddEffect(hitfx_snowtime); ContentAddition.AddEffect(tracerfx_snowtime); ContentAddition.AddEffect(orbSnowtimelingMissileObject); ContentAddition.AddEffect(orbSnowtimelingMissileImpactObject); ContentAddition.AddEffect(muzzlefx_rainbow); ContentAddition.AddEffect(hitfx_rainbow); ContentAddition.AddEffect(tracerfx_rainbow); ContentAddition.AddEffect(orbRainbowMissileObject); ContentAddition.AddEffect(orbRainbowMissileImpactObject); ContentAddition.AddEffect(orbPlayerMissileObject); ContentAddition.AddEffect(orbPlayerMissileImpactObject); ContentAddition.AddEffect(novafx); ContentAddition.AddEffect(grenadeGhostObject); ContentAddition.AddEffect(grenadeImpactObject); ContentAddition.AddEffect(grenadeImpactRainbowObject); ContentAddition.AddProjectile(grenadeObject); ContentAddition.AddProjectile(grenadePlayerObject); } public static void AddScepterSkills() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/"; if (SnowtimeToyboxMod.scepterLoaded) { FriendlyTurretTurretlingPrimaryScepterSkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Primary_Scepter.asset"); FriendlyTurretTurretlingPrimaryScepterSkillDef.activationState = new SerializableEntityStateType(typeof(TurretlingBlasterScepter)); FriendlyTurretTurretlingPrimarySkillDef.keywordTokens = new string[1] { "TURRETLING_SKILL1_KEYWORD" }; DemoTurretlingPrimarySkill.keywordTokens = new string[1] { "TURRETLING_SKILL7_KEYWORD_SCEPTER" }; FriendlyTurretTurretlingPrimaryScepterMinionSkillDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/Turretling_Primary_Scepter.asset"); FriendlyTurretTurretlingPrimaryScepterMinionSkillDef.activationState = new SerializableEntityStateType(typeof(TurretlingBlasterScepter)); ContentAddition.AddSkillDef(FriendlyTurretTurretlingPrimaryScepterSkillDef); ContentAddition.AddSkillDef(FriendlyTurretTurretlingPrimaryScepterMinionSkillDef); ContentAddition.AddEffect(TurretlingBlasterScepter.muzzlefx_kinetic); ContentAddition.AddEffect(TurretlingBlasterScepter.muzzlefx_corrosive); ContentAddition.AddEffect(TurretlingBlasterScepter.muzzlefx_energy); ContentAddition.AddEffect(TurretlingBlasterScepter.hitfx_kinetic); ContentAddition.AddEffect(TurretlingBlasterScepter.hitfx_corrosive); ContentAddition.AddEffect(TurretlingBlasterScepter.hitfx_energy); ContentAddition.AddEffect(TurretlingBlasterScepter.tracerfx_kinetic); ContentAddition.AddEffect(TurretlingBlasterScepter.tracerfx_corrosive); ContentAddition.AddEffect(TurretlingBlasterScepter.tracerfx_energy); bool flag = default(bool); ContentAddition.AddEntityState(typeof(TurretlingBlasterScepter), ref flag); AncientScepterItem instance = ItemBase.instance; if (instance != null) { instance.RegisterScepterSkill(FriendlyTurretTurretlingPrimaryScepterSkillDef, "_TurretlingSurvivorBody", (SkillSlot)0, 0); } AncientScepterItem instance2 = ItemBase.instance; if (instance2 != null) { instance2.RegisterScepterSkill(FriendlyTurretTurretlingPrimaryScepterMinionSkillDef, "_SwarmTurretlingBody", (SkillSlot)0, 0); } } } } } namespace SnowtimeToybox.Items { public abstract class ItemBase : ItemBase where T : ItemBase { public static T instance { get; private set; } public ItemBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class ItemBase { public string ItemName; public static string ItemNameInternal; public abstract ItemDef ItemDef { get; } public bool AIBlacklisted { get; set; } public bool Hidden { get; set; } public abstract void Init(ConfigFile config); public virtual void CreateConfig(ConfigFile config) { } protected virtual void CreateLang() { } public abstract ItemDisplayRuleDict CreateItemDisplayRules(); protected void CreateItem() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown CreateLang(); if ((Object)(object)ItemDef == (Object)null) { Log.Error("An ItemDef was null! Ensure that the paths are correct. Especially make sure it uses .asset suffix"); } ItemAPI.Add(new CustomItem(ItemDef, CreateItemDisplayRules())); Log.Debug("Attempted to add item: " + ItemDef.nameToken + "... Check Ingame if it works!"); if (Hidden) { ItemDef.hidden = true; } if (AIBlacklisted && !ItemDef.tags.Contains((ItemTag)4)) { ItemDef.tags = ItemDef.tags.Append((ItemTag)4).ToArray(); } } public void RegItemName() { if ((Object)(object)ItemDef != (Object)null) { ItemName = ((Object)ItemDef).name; } ItemNameInternal = ((Object)ItemDef).name; } public virtual void Hooks() { } public int GetCount(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCountEffective(ItemDef); } public int GetCount(CharacterMaster master) { if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)master.inventory)) { return 0; } return master.inventory.GetItemCountEffective(ItemDef); } public bool HasItem(CharacterBody body) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return false; } return body.inventory.GetItemCountEffective(ItemDef) > 0; } public bool HasItem(CharacterMaster master) { if (!Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)master.inventory)) { return false; } return master.inventory.GetItemCountEffective(ItemDef) > 0; } public int GetCountSpecific(CharacterBody body, ItemDef itemDef) { if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return 0; } return body.inventory.GetItemCountEffective(itemDef); } } public class RainbowizerPowerup : ItemBase { public static ConfigEntry AttackSpeedMod; public static ConfigEntry CritDMGMod; public static ConfigEntry DamageMod; public static ConfigEntry CoolDownMod; public static ConfigEntry LuckMod; public static ConfigEntry AdditionalMissiles; public static ConfigEntry PreventBarrierDecay; public override ItemDef ItemDef => SnowtimeToyboxMod._stitemAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Items/Hidden/RainbowizerPowerUp.asset"); public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown return new ItemDisplayRuleDict(Array.Empty()); } public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateItem(); Hooks(); } public override void CreateConfig(ConfigFile config) { AttackSpeedMod = config.Bind("Operator Turretling: Rainbowizer Powerup", "Attack Speed Modifier (Mult)", 7.5f, "Attack speed modifier when Rainbowizer is active"); CritDMGMod = config.Bind("Operator Turretling: Rainbowizer Powerup", "Crit Damage Modifier (Mult)", 1f, "Critical Strike damage modifier when Rainbowizer is active"); DamageMod = config.Bind("Operator Turretling: Rainbowizer Powerup", "Damage Modifier (Mult)", 1f, "Damage modifier when Rainbowizer is active"); CoolDownMod = config.Bind("Operator Turretling: Rainbowizer Powerup", "Pixi Launcher Cooldown Modifier (Mult)", 0.25f, "Pixi Launcher Cooldown modifier when Rainbowizer is active. Excludes Rainbowizer"); LuckMod = config.Bind("Operator Turretling: Rainbowizer Powerup", "Luck Modifier (Add)", 1f, "Luck modifier when Rainbowizer is active"); AdditionalMissiles = config.Bind("Operator Turretling: Rainbowizer Powerup", "Additional Missiles", true, "If true, fire additional missiles with Pixi Launcher without the need of a Pocket I.C.B.M"); PreventBarrierDecay = config.Bind("Operator Turretling: Rainbowizer Powerup", "Barrier Decay", true, "If true, barrier no longer decays naturally"); } public override void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStats); } private void RecalculateStats(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && GetCount(sender) != 0 && (Object)(object)sender.healthComponent != (Object)null) { args.attackSpeedMultAdd += AttackSpeedMod.Value; args.damageMultAdd += DamageMod.Value; args.critDamageMultAdd *= CritDMGMod.Value; args.shouldFreezeBarrier = PreventBarrierDecay.Value; args.luckAdd += LuckMod.Value; args.secondarySkill.cooldownReductionMultAdd += CoolDownMod.Value; } } } } namespace SnowtimeToybox.FriendlyTurrets { public class AcanthiFriendlyTurret : FriendlyTurretBase { public static BuffDef AcanthiTurretBuff; public static BuffDef AcanthiTurretDebuff; public override string turretWhitelistString => "FriendTurret_Acanthi_Whitelist"; public override string turretName => "canthi turret"; public override string[] riskierStats => new string[12] { "baseDamage", "5", "baseRegen", "7", "baseArmor", "40", "levelDamage", "1.25", "levelRegen", "1.5", "levelArmor", "4" }; public override void Initalization() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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) base.Initalization(); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Acanthi/"; broken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_mdlFriendlyTurretAcanthiBroken.prefab"); body = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretAcanthiBody.prefab"); bodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretAcanthiBodyRemoteOp.prefab"); master = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretAcanthiMaster.prefab"); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/AcanthiPrimaryFamily.asset")); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/AcanthiUtilityFamily.asset")); SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/AcanthiLaser.asset"); val.activationState = new SerializableEntityStateType(typeof(FireAcanthiBeam)); skillDefs.Add(val); SkillDef val2 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/AcanthiShenanigans.asset"); val2.activationState = new SerializableEntityStateType(typeof(Shenanigans)); skillDefs.Add(val2); AcanthiTurretBuff = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/VampiricDesires.asset"); AcanthiTurretDebuff = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/VampiricBleeding.asset"); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretAcanthi.asset"); interactableSpawnCard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_iscBrokenFriendlyTurretAcanthi.asset"); turretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/_TurretlingMaster_Acanthi.prefab"); } public override void ContentAdditionFuncs() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) base.ContentAdditionFuncs(); bool flag = default(bool); ContentAddition.AddEntityState(typeof(FireAcanthiBeam), ref flag); } public override void StageInteractableFuncs() { base.StageInteractableFuncs(); } } public class BorboFriendlyTurret : FriendlyTurretBase { public static BuffDef BorboTurretDebuff; public override string turretWhitelistString => "FriendTurret_Borbo_Whitelist"; public override string turretName => "borbno turret"; public override string[] riskierStats => new string[12] { "baseDamage", "25", "baseRegen", "20", "baseArmor", "35", "levelDamage", "5", "levelRegen", "4", "levelArmor", "3" }; public override void Initalization() { //IL_00d7: 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_011d: 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) base.Initalization(); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Borbo/"; broken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_mdlFriendlyTurretBorboBroken.prefab"); body = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBorboBody.prefab"); bodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBorboBodyRemoteOp.prefab"); master = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBorboMaster.prefab"); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BorboPrimaryFamily.asset")); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BorboUtilityFamily.asset")); SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BorboBlast.asset").activationState = new SerializableEntityStateType(typeof(ChargeBorboLaser)); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBorbo.asset"); SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BorboShenanigans.asset"); val.activationState = new SerializableEntityStateType(typeof(Shenanigans)); skillDefs.Add(val); BorboTurretDebuff = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/BorboTurretDebuff.asset"); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBorbo.asset"); interactableSpawnCard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_iscBrokenFriendlyTurretBorbo.asset"); turretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/_TurretlingMaster_Borbo.prefab"); } public override void ContentAdditionFuncs() { //IL_0012: 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) base.ContentAdditionFuncs(); bool flag = default(bool); ContentAddition.AddEntityState(typeof(FireBorboLaser), ref flag); ContentAddition.AddEntityState(typeof(ChargeBorboLaser), ref flag); } public override void StageInteractableFuncs() { base.StageInteractableFuncs(); } } public class BreadFriendlyTurret : FriendlyTurretBase { public static BuffDef BreadTurretBuffPassive; public static BuffDef BreadTurretBuffFortune; public static BuffDef BreadTurretBuffNearbyAllies; public static GameObject FriendlyTurretBreadBeamL; public static GameObject FriendlyTurretBreadBeamR; public static GameObject FriendlyTurretBreadGraceWard; public override string turretWhitelistString => "FriendTurret_Bread_Whitelist"; public override string turretName => "breads turret"; public override GameObject turretlingMaster { get; set; } public override string[] riskierStats => new string[12] { "baseDamage", "20", "baseRegen", "25", "baseArmor", "60", "levelDamage", "4", "levelRegen", "5", "levelArmor", "15" }; public override void Initalization() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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) base.Initalization(); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Bread/"; broken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_mdlFriendlyTurretBreadBroken.prefab"); body = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBreadBody.prefab"); bodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBreadBodyRemoteOp.prefab"); master = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBreadMaster.prefab"); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadPrimaryFamily.asset")); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadUtilityFamily.asset")); SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadBeam.asset"); val.activationState = new SerializableEntityStateType(typeof(FireBreadBeam)); skillDefs.Add(val); SkillDef val2 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadShenanigans.asset"); val2.activationState = new SerializableEntityStateType(typeof(Shenanigans)); skillDefs.Add(val2); FriendlyTurretBreadBeamL = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadFortuneBeamL.prefab"); FriendlyTurretBreadBeamR = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/BreadFortuneBeamR.prefab"); FriendlyTurretBreadGraceWard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/BreadsGraceWard.prefab"); BreadTurretBuffPassive = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/BreadsPassive.asset"); BreadTurretBuffFortune = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/BreadsFortune.asset"); BreadTurretBuffNearbyAllies = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/BreadsGrace.asset"); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretBread.asset"); interactableSpawnCard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_iscBrokenFriendlyTurretBread.asset"); turretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/_TurretlingMaster_Bread.prefab"); } public override void ContentAdditionFuncs() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) base.ContentAdditionFuncs(); bool flag = default(bool); ContentAddition.AddEntityState(typeof(FireBreadBeam), ref flag); PrefabAPI.RegisterNetworkPrefab(FriendlyTurretBreadBeamL); PrefabAPI.RegisterNetworkPrefab(FriendlyTurretBreadBeamR); PrefabAPI.RegisterNetworkPrefab(FriendlyTurretBreadGraceWard); body.AddComponent(); bodyRemoteOp.AddComponent(); } public override void StageInteractableFuncs() { base.StageInteractableFuncs(); } } public abstract class FriendlyTurretBase : FriendlyTurretBase where T : FriendlyTurretBase { public static T instance { get; private set; } public FriendlyTurretBase() { if (instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } instance = this as T; } } public abstract class FriendlyTurretBase { public List skillFamilies = new List(); public List skillDefs = new List(); public virtual GameObject broken { get; set; } public virtual GameObject body { get; set; } public virtual GameObject bodyRemoteOp { get; set; } public virtual GameObject master { get; set; } public virtual DroneDef droneDef { get; set; } public virtual string turretWhitelistString { get; set; } public virtual string turretName { get; set; } public virtual GameObject turretlingMaster { get; set; } public virtual InteractableSpawnCard interactableSpawnCard { get; set; } public virtual string[] riskierStats { get; set; } public virtual void Initalization() { Log.Debug("initalizing " + turretName + " !!"); } public virtual void ContentAdditionFuncs() { ContentAddition.AddDroneDef(droneDef); ContentAddition.AddBody(body); ContentAddition.AddBody(bodyRemoteOp); ContentAddition.AddMaster(master); foreach (SkillFamily skillFamily in skillFamilies) { ContentAddition.AddSkillFamily(skillFamily); } foreach (SkillDef skillDef in skillDefs) { ContentAddition.AddSkillDef(skillDef); } ContentAddition.AddNetworkedObject(broken); } public virtual void StageInteractableFuncs() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: 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_003d: Expected O, but got Unknown //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) Log.Debug(interactableSpawnCard); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)interactableSpawnCard, selectionWeight = 0, spawnDistance = (MonsterSpawnDistance)0, minimumStageCompletions = 670, preventOverhead = false }; DirectorCardHolder val = new DirectorCardHolder { Card = card, InteractableCategory = (InteractableCategory)5 }; List list = new List(); List list2 = new List(); list.Add((Stage)2); list.Add((Stage)4); list.Add((Stage)67108864); list.Add((Stage)1073741824); list.Add((Stage)2147483648u); list.Add((Stage)16); list.Add((Stage)262144); list.Add((Stage)70368744177664L); list.Add((Stage)32); list.Add((Stage)64); list.Add((Stage)17592186044416L); list.Add((Stage)35184372088832L); list.Add((Stage)256); list.Add((Stage)131072); list.Add((Stage)140737488355328L); list.Add((Stage)8796093022208L); list.Add((Stage)16384); list2.Add("FBLScene"); list2.Add("broadcastperch_wormsworms"); list2.Add("sunkentombs_wormsworms"); list2.Add("tropics_wormsworms"); list2.Add("tropicsnight_wormsworms"); list2.Add("hollowsummit_wormsworms"); list2.Add("hollowsummitnight_wormsworms"); list2.Add("catacombs_DS1_Catacombs"); list2.Add("snowtime_bloodgulch"); list2.Add("snowtime_deathisland"); list2.Add("snowtime_gephyrophobia"); list2.Add("snowtime_gmconstruct"); list2.Add("snowtime_gmflatgrass"); list2.Add("snowtime_halo"); list2.Add("snowtime_halo2"); list2.Add("snowtime_highcharity"); list2.Add("snowtime_icefields"); list2.Add("snowtime_newmombasabridge"); list2.Add("snowtime_odstmombasa"); list2.Add("snowtime_plrhightower"); list2.Add("snowtime_sandtrap"); list2.Add("snowtime_sidewinder"); foreach (Stage item in list) { Helpers.AddNewInteractableToStage(val, item, ""); } foreach (string item2 in list2) { Helpers.AddNewInteractableToStage(val, (Stage)1, item2); } } public virtual void PostInit() { //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_00be: 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_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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) master.AddComponent().turretlingPrefab = turretlingMaster; broken.AddComponent().purchaseInteraction = broken.GetComponent(); broken.GetComponent().bodyName = ((Object)body).name; master.AddComponent().whitelistedTag = turretWhitelistString; body.AddComponent(); CharacterBody component = body.GetComponent(); if (SnowtimeToyboxMod.riskierLoaded) { for (int i = 0; i < riskierStats.Length; i += 2) { Reflection.SetFieldValue((object)component, riskierStats[i], float.Parse(riskierStats[i + 1])); } } component.bodyFlags |= SnowtimeToyboxMod.bodyFlags; SnowtimeToyboxMod.friendlyTurretList.Add(this); droneDef.remoteOpCost = SnowtimeToyboxMod.FriendlyTurretRemoteOpPrice.Value; Log.Debug("Updated Friendly Turret " + ((Object)component).name + " Remote Operation prices to: " + droneDef.remoteOpCost); bodyRemoteOp.GetComponent().dontRaycastToPivot = true; ExplicitPickupDropTable val = Addressables.LoadAssetAsync((object)RoR2_DLC3_TripleDroneShop.dtTripleDroneShopBlacklist_asset).WaitForCompletion(); Array.Resize(ref val.pickupEntries, val.pickupEntries.Length + 1); Log.Debug("Adding " + ((Object)droneDef).name + " to " + ((Object)val).name); val.pickupEntries[^1] = new PickupDefEntry { pickupDef = (Object)(object)droneDef, pickupWeight = 8008132f }; } } public class ShortcakeFriendlyTurret : FriendlyTurretBase { public static BuffDef ShortcakeTurretBuff; public override string turretWhitelistString => "FriendTurret_Shortcake_Whitelist"; public override string turretName => "shortscake turret"; public override string[] riskierStats => new string[12] { "baseDamage", "20", "baseRegen", "25", "baseArmor", "60", "levelDamage", "4", "levelRegen", "5", "levelArmor", "15" }; public override void Initalization() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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) base.Initalization(); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Shortcake/"; broken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_mdlFriendlyTurretShortcakeBroken.prefab"); body = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretShortcakeBody.prefab"); bodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretShortcakeBodyRemoteOp.prefab"); master = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretShortcakeMaster.prefab"); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/ShortcakePrimaryFamily.asset")); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/ShortcakeUtilityFamily.asset")); SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/ShortcakeTaunt.asset"); val.activationState = new SerializableEntityStateType(typeof(ShortcakeTaunt)); skillDefs.Add(val); SkillDef val2 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/ShortcakeShenanigans.asset"); val2.activationState = new SerializableEntityStateType(typeof(Shenanigans)); skillDefs.Add(val2); ShortcakeTurretBuff = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Buff/ShortcakeTurretBuff.asset"); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretShortcake.asset"); interactableSpawnCard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_iscBrokenFriendlyTurretShortcake.asset"); turretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/_TurretlingMaster_Shortcake.prefab"); } public override void ContentAdditionFuncs() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) base.ContentAdditionFuncs(); bool flag = default(bool); ContentAddition.AddEntityState(typeof(ShortcakeTaunt), ref flag); } public override void StageInteractableFuncs() { base.StageInteractableFuncs(); } } public class SnowtimeFriendlyTurret : FriendlyTurretBase { public override string turretWhitelistString => "FriendTurret_Snowtime_Whitelist"; public override string turretName => "snowsytimesnowtimesnowysnowstages turret"; public override string[] riskierStats => new string[12] { "baseDamage", "25", "baseRegen", "21", "baseArmor", "30", "levelDamage", "5", "levelRegen", "5", "levelArmor", "2" }; public override void Initalization() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0110: 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) base.Initalization(); string text = "Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Snowtime/"; broken = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_mdlFriendlyTurretSnowtimeBroken.prefab"); body = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretSnowtimeBody.prefab"); bodyRemoteOp = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretSnowtimeBodyRemoteOp.prefab"); master = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretSnowtimeMaster.prefab"); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/SnowtimePrimaryFamily.asset")); skillFamilies.Add(SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/SnowtimeUtilityFamily.asset")); SkillDef val = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/SnowtimeCryoGauss.asset"); val.activationState = new SerializableEntityStateType(typeof(SnowtimeCryoGaussFire)); skillDefs.Add(val); SkillDef val2 = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "Skills/SnowtimeShenanigans.asset"); val2.activationState = new SerializableEntityStateType(typeof(Shenanigans)); skillDefs.Add(val2); droneDef = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_FriendlyTurretSnowtime.asset"); interactableSpawnCard = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset(text + "_iscBrokenFriendlyTurretSnowtime.asset"); turretlingMaster = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/Turretling/Variants/_TurretlingMaster_Snowtime.prefab"); } public override void ContentAdditionFuncs() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) base.ContentAdditionFuncs(); bool flag = default(bool); ContentAddition.AddEntityState(typeof(SnowtimeCryoGaussFire), ref flag); } public override void StageInteractableFuncs() { base.StageInteractableFuncs(); } } } namespace SnowtimeToybox.FriendlyTurretChecks { public class BorboCheck : NetworkBehaviour { public PurchaseInteraction purchaseInteraction; public string bodyName; public static GameObject turretUseEffect = SnowtimeToyboxMod._stcharacterAssetBundle.LoadAsset("Assets/SnowtimeMod/Assets/Characters/FriendlyTurrets/FriendlyTurretTestIngame/TurretUseEffect.prefab"); private SummonMasterBehavior summonMasterBehavior; private SummonMasterBehavior turretlingSummon; public void Awake() { //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_00c6: Expected O, but got Unknown //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Expected O, but got Unknown //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_00f2: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance)) { purchaseInteraction.SetAvailable(true); } if (!Object.op_Implicit((Object)(object)summonMasterBehavior)) { summonMasterBehavior = ((Component)this).GetComponent(); } ((UnityEvent)(object)purchaseInteraction.onDetailedPurchaseServer).AddListener((UnityAction)OnDetailedPurchase); if (SnowtimeToyboxMod.ToggleSpawnMessages.Value) { switch (purchaseInteraction.displayNameToken) { case "FRIENDLYTURRET_BORBO_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Friendly Turret: pleas repair me, i will update 2r4r if you do..!" }); break; case "FRIENDLYTURRET_SHORTCAKE_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Friendly Turret: uwaah! pleas repair me, i have a cake for you if you do..!" }); break; case "FRIENDLYTURRET_SNOWTIME_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Friendly Turret: bwaaaa! pleas repair me, i have a snowcone for you if you do..!" }); break; case "FRIENDLYTURRET_ACANTHI_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Friendly Turret: hjelp! pleas repair me, i have a flower for you if you do..!" }); break; case "FRIENDLYTURRET_BREAD_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Friendly Turret: bleh ! p .,., pleas repair me ;!;;!!!,.,., i hav es.,., um,,.,., plead react if you do !!!!,,,!,!!!,!!!!!,.,.,," }); break; } } } [Server] public void OnDetailedPurchase(PayCostContext payCostContext, PayCostResults payCostResult) { //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ad: 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_00c2: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //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_00f0: Expected O, but got Unknown if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SnowtimeToybox.FriendlyTurretChecks.BorboCheck::OnDetailedPurchase(RoR2.CostTypeDef/PayCostContext,RoR2.CostTypeDef/PayCostResults)' called on client"); return; } purchaseInteraction.SetAvailable(false); if (SnowtimeToyboxMod.ToggleSpawnMessages.Value) { switch (purchaseInteraction.displayNameToken) { case "FRIENDLYTURRET_BORBO_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "borbo turret: Thank you! We are friends now!" }); break; case "FRIENDLYTURRET_SHORTCAKE_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Strawberry Shortcake Turret: Thank you friend! Let's take ibuprofen together? No? Aw. I'll defend you instead!" }); break; case "FRIENDLYTURRET_SNOWTIME_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Snowtime Turret: waow! thank yous! we are friend now.,,," }); break; case "FRIENDLYTURRET_ACANTHI_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "Acanthi Turret: Thank you! We are friends now! :soyeyes:" }); break; case "FRIENDLYTURRET_BREAD_BROKEN_NAME": Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "bread turret: t ,.,., thank yo ubestie !!!!!!!!!!!!! :uppies : !!!!!!!!!!!!!!!!" }); break; } } EffectManager.SpawnEffect(turretUseEffect, new EffectData { origin = ((Component)this).gameObject.transform.position, rotation = Quaternion.identity, scale = 1f, color = Color32.op_Implicit(Color.white) }, true); if (Object.op_Implicit((Object)(object)turretlingSummon) && SnowtimeToyboxMod.TurretlingSpawnChance.Value >= Run.instance.runRNG.RangeFloat(0f, 100f)) { turretlingSummon.OpenSummon(payCostContext.activator); } summonMasterBehavior.OpenSummon(payCostContext.activator); Object.Destroy((Object)(object)purchaseInteraction); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class FriendlyTurretOverlayManager : MonoBehaviour { private TemporaryOverlayInstance temporaryOverlay; public List Overlay = new List(); public CharacterBody Body; public void Start() { } public bool hasOverlay(string matName) { foreach (TemporaryOverlayInstance item in Overlay) { if (matName == ((Object)item.materialInstance).name) { return true; } } return false; } public void FixedUpdate() { foreach (TemporaryOverlayInstance item in Overlay.ToList()) { switch (((Object)item.originalMaterial).name) { case "matBreadFortune": if (!Body.HasBuff(BreadFriendlyTurret.BreadTurretBuffFortune)) { Overlay.Remove(item); item.Destroy(); } break; case "matBreadGraceOverlay": if (!Body.HasBuff(BreadFriendlyTurret.BreadTurretBuffNearbyAllies)) { Overlay.Remove(item); item.Destroy(); } break; case "borboturretdebuffoverlay": if (!Body.HasBuff(BorboFriendlyTurret.BorboTurretDebuff)) { Overlay.Remove(item); item.Destroy(); } break; case "acanthidebuffoverlay": if (!Body.HasBuff(AcanthiFriendlyTurret.AcanthiTurretDebuff)) { Overlay.Remove(item); item.Destroy(); } break; } } if (Overlay.Count == 0) { Object.Destroy((Object)(object)this); } } } } namespace SnowtimeToybox.Components { [RequireComponent(typeof(CharacterBody))] public class BreadTurretWard : MonoBehaviour { public CharacterBody self; public GameObject BreadGraceWard = BreadFriendlyTurret.FriendlyTurretBreadGraceWard; public GameObject BreadGraceWardInstance; public void Awake() { ((Behaviour)this).enabled = NetworkServer.active; self = ((Component)this).GetComponent(); } public void FixedUpdate() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (self.HasBuff(BreadFriendlyTurret.BreadTurretBuffPassive)) { if ((Object)(object)BreadGraceWardInstance == (Object)null) { BreadGraceWardInstance = Object.Instantiate(BreadGraceWard); BreadGraceWardInstance.GetComponent().teamIndex = self.teamComponent.teamIndex; BreadGraceWardInstance.GetComponent().Networkradius = 30f + self.radius; BreadGraceWardInstance.GetComponent().AttachToGameObjectAndSpawn(((Component)self).gameObject, (string)null); } } else { Object.Destroy((Object)(object)BreadGraceWardInstance); BreadGraceWardInstance = null; } } public void OnDestroy() { if (Object.op_Implicit((Object)(object)BreadGraceWardInstance)) { Object.Destroy((Object)(object)BreadGraceWardInstance); BreadGraceWardInstance = null; } } } [RequireComponent(typeof(CharacterMaster))] public class FriendlyTurretInheritance : MonoBehaviour { private int[] previouslyProvidedItemBuffer; public Inventory ownerInventory; public CharacterMaster self; public string whitelistedTag; public void Awake() { ((Behaviour)this).enabled = NetworkServer.active; self = ((Component)this).GetComponent(); previouslyProvidedItemBuffer = PerItemBufferPool.Request(); } public void FixedUpdate() { if (!Object.op_Implicit((Object)(object)ownerInventory) && Object.op_Implicit((Object)(object)self.minionOwnership) && Object.op_Implicit((Object)(object)self.minionOwnership.ownerMaster)) { ownerInventory = self.minionOwnership.ownerMaster.inventory; ownerInventory.onInventoryChanged += FriendlyTurretMirrorInventory; FriendlyTurretMirrorInventory(); } if (self.inventory.GetItemCountPermanent(Items.MinionLeash) <= 0) { self.inventory.GiveItemPermanent(Items.MinionLeash, 1); } } public void OnDestroy() { if (ownerInventory != null) { ownerInventory.onInventoryChanged -= FriendlyTurretMirrorInventory; } } public void FriendlyTurretMirrorInventory() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) CharacterMaster obj = self; if (Object.op_Implicit((Object)(object)((obj != null) ? obj.inventory : null)) && Object.op_Implicit((Object)(object)ownerInventory)) { ChannelOwnerInventory(); EquipmentIndex val = ownerInventory.currentEquipmentIndex; if (!SnowtimeToyboxMod.eliteDefsEquipInherit.Contains(val)) { val = (EquipmentIndex)(-1); } if (self.inventory.currentEquipmentIndex != val) { self.inventory.SetEquipmentIndex(val, true); } } } public void ChannelOwnerInventory() { //IL_000f: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00df: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) int combinedItemsCount = 0; ItemIndex[] combinedItemsAcquired = default(ItemIndex[]); DisposableRental val = PerItemBufferPool.RequestTemp(ref combinedItemsAcquired); bool[] indicesToUpdateSet = default(bool[]); try { DisposableRental val2 = PerItemBufferPool.RequestTemp(ref indicesToUpdateSet); try { InventoryChangeScope val3 = new InventoryChangeScope(self.inventory); try { ReadOnlySpan nonZeroIndicesSpan = ((ItemCollection)(ref self.inventory.permanentItemStacks)).GetNonZeroIndicesSpan(); for (int i = 0; i < nonZeroIndicesSpan.Length; i++) { AddItem(nonZeroIndicesSpan[i]); } ReadOnlySpan nonZeroIndicesSpan2 = ((ItemCollection)(ref ownerInventory.permanentItemStacks)).GetNonZeroIndicesSpan(); for (int j = 0; j < nonZeroIndicesSpan2.Length; j++) { AddItem(nonZeroIndicesSpan2[j]); } Span span = MemoryExtensions.AsSpan(combinedItemsAcquired, 0, combinedItemsCount); for (int k = 0; k < span.Length; k++) { ItemIndex val4 = span[k]; ref int reference = ref previouslyProvidedItemBuffer[val4]; int num = (ItemFilter(val4) ? ownerInventory.GetItemCountPermanent(val4) : 0); int num2 = num - reference; if (num2 != 0) { self.inventory.ChangeItemStacksCount(new GiveItemPermanentImpl { inventory = self.inventory }, val4, num2); reference = num; } } } finally { ((InventoryChangeScope)(ref val3)).Dispose(); } } finally { val2.Dispose(); } } finally { val.Dispose(); } void AddItem(ItemIndex idx) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected I4, but got Unknown if (!indicesToUpdateSet[idx]) { indicesToUpdateSet[idx] = true; combinedItemsAcquired[combinedItemsCount++] = (ItemIndex)(int)idx; } } } public bool ItemFilter(ItemIndex index) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_00ae: 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) ItemDef itemDef = ItemCatalog.GetItemDef(index); if ((int)itemDef.tier == 5) { return false; } ItemTag val = ItemAPI.FindItemTagByName(whitelistedTag); ItemTag val2 = ItemAPI.FindItemTagByName("GlobalFriendTurret_Whitelist"); if (((Object)((Component)this).gameObject).name.Contains("_SwarmTurretling") && itemDef.nameToken.Contains("ANCIENT_SCEPTER")) { return true; } if (((Object)((Component)this).gameObject).name.Contains("_SwarmTurretling") || ((Object)((Component)this).gameObject).name.Contains("_DT")) { if (itemDef.ContainsTag((ItemTag)4) || itemDef.ContainsTag((ItemTag)29) || itemDef.ContainsTag((ItemTag)20) || itemDef.ContainsTag((ItemTag)13)) { return false; } return true; } if (itemDef.ContainsTag(val) || itemDef.ContainsTag(val2)) { return true; } return false; } } [RequireComponent(typeof(CharacterBody))] public class PassiveTurretlingUpdateNamePerCharacter : MonoBehaviour { public CharacterBody self; public CharacterBody ownerBody; public CharacterMaster charMaster; public bool nameUpdated; public void Awake() { self = ((Component)this).gameObject.GetComponent(); nameUpdated = false; } public void FixedUpdate() { if (!nameUpdated && Object.op_Implicit((Object)(object)self.master)) { charMaster = self.master; if (Object.op_Implicit((Object)(object)charMaster.minionOwnership.ownerMaster) && Object.op_Implicit((Object)(object)charMaster.minionOwnership.ownerMaster.GetBody())) { ownerBody = charMaster.minionOwnership.ownerMaster.GetBody(); string text = ((Object)ownerBody).name.Replace("(Clone)", ""); self.baseNameToken = "TURRETLING_" + text.ToUpper() + "_NAME"; nameUpdated = true; } } } } [RequireComponent(typeof(PlayerCharacterMasterController))] [RequireComponent(typeof(CharacterMaster))] public class PlayerTurretlingRainbowHandler : NetworkBehaviour { public CharacterMaster self; public PlayerCharacterMasterController pcmc; public CharacterBody charBody; public GameObject charBodyObject; public bool addedRainbowizer; public bool idfound; [SyncVar] private string steamid = ""; public string steamid_; public string Networksteamid { get { return steamid; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref steamid, 1u); } } public void Awake() { self = ((Component)this).gameObject.GetComponent(); pcmc = ((Component)this).gameObject.GetComponent(); } public void FixedUpdate() { GetSteamID(); if (Object.op_Implicit((Object)(object)self.GetBody())) { charBody = self.GetBody(); charBodyObject = ((Component)charBody).gameObject; if (((Object)charBodyObject).name.Contains("Turretling") && !((Object)charBodyObject).name.Contains("Body_") && !addedRainbowizer) { addedRainbowizer = true; ((Component)self).gameObject.AddComponent(); } } } public void GetSteamID() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance) && !idfound && Object.op_Implicit((Object)(object)((Component)this).gameObject.GetComponent())) { NetworkUserId id = pcmc.networkUser.id; PlatformID steamId = ((NetworkUserId)(ref id)).steamId; Networksteamid = ((PlatformID)(ref steamId)).ToSteamID(); steamid_ = steamid; idfound = true; } } public string SendSteamID() { return steamid; } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(steamid); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(steamid); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { steamid = reader.ReadString(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { steamid = reader.ReadString(); } } } [RequireComponent(typeof(CharacterBody))] public class SwarmMinionSwarmlingTeleportHandler : MonoBehaviour { [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 ownerPosition; public SwarmMinionSwarmlingTeleportHandler <>4__this; private NodeGraph 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0036: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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) int num = <>1__state; SwarmMinionSwarmlingTeleportHandler swarmMinionSwarmlingTeleportHandler = <>4__this; List list; switch (num) { default: return false; case 0: <>1__state = -1; 5__2 = SceneInfo.instance.GetNodeGraph((GraphType)0); list = 5__2.FindNodesInRangeWithFlagConditions(ownerPosition, 3f, 20f, (HullMask)0, (NodeFlags)0, (NodeFlags)4, false); break; case 1: <>1__state = -1; list = 5__2.FindNodesInRangeWithFlagConditions(ownerPosition, 3f, 20f, (HullMask)0, (NodeFlags)0, (NodeFlags)4, false); break; } if (list.Count == 0) { <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } Vector3 val2 = default(Vector3); while (list.Count > 0) { int index = Random.Range(0, list.Count); NodeIndex val = list[index]; if (5__2.GetNodePosition(val, ref val2)) { TeleportHelper.TeleportBody(swarmMinionSwarmlingTeleportHandler.self, val2); GameObject val3 = Addressables.LoadAssetAsync((object)RoR2_Base_Huntress.HuntressBlinkEffect_prefab).WaitForCompletion(); if (Object.op_Implicit((Object)(object)val3)) { EffectManager.SimpleEffect(val3, val2, Quaternion.identity, true); Util.PlaySound("Play_huntress_shift_end", ((Component)swarmMinionSwarmlingTeleportHandler).gameObject); } break; } } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public CharacterBody self; private RigidbodyMotor rigidbodyMotor; public void Start() { self = ((Component)this).gameObject.GetComponent(); } public void StartTeleporting(Vector3 position) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) CharacterMaster master = self.master; CharacterMaster val = (Object.op_Implicit((Object)(object)master) ? master.minionOwnership.ownerMaster : null); CharacterBody val2 = (Object.op_Implicit((Object)(object)val) ? val.GetBody() : null); if (self.hasEffectiveAuthority && Object.op_Implicit((Object)(object)val2) && (Object.op_Implicit((Object)(object)self.characterMotor) || Object.op_Implicit((Object)(object)rigidbodyMotor))) { ((MonoBehaviour)this).StartCoroutine(Teleport(position)); } } [IteratorStateMachine(typeof(d__4))] public IEnumerator Teleport(Vector3 ownerPosition) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { <>4__this = this, ownerPosition = ownerPosition }; } } [RequireComponent(typeof(CharacterBody))] public class SwarmPlayerOSPHandler : MonoBehaviour { public CharacterBody self; public void Awake() { self = ((Component)this).gameObject.GetComponent(); } public void OnEnable() { self.onRecalculateStats += onBodyRecalculateStats; } public void OnDisable() { self.onRecalculateStats -= onBodyRecalculateStats; } public void OnDestroy() { self.onRecalculateStats -= onBodyRecalculateStats; } private void onBodyRecalculateStats(CharacterBody body) { Log.Debug("ughhhhhh"); if (body.isPlayerControlled) { body.hasOneShotProtection = SnowtimeToyboxMod.SwarmlingOSP.Value; } } } [RequireComponent(typeof(CharacterBody))] public class SwarmPlayerSwarmlingTracker : NetworkBehaviour { public CharacterBody self; public List SwarmlingBodies = new List(); private static int kCmdCmdTeleportSwarmlings; public void Start() { self = ((Component)this).gameObject.GetComponent(); GetSwarmlings(); CharacterBody.onBodyDestroyGlobal += OnSwarmlingBodyDestroyGlobal; CharacterBody.onBodyStartGlobal += OnSwarmlingBodyStartGlobal; } public void FixedUpdate() { if (SwarmlingBodies.Count == 0) { GetSwarmlings(); } } public List GetSwarmlingBodies() { return SwarmlingBodies; } public void GetSwarmlings() { CharacterBody[] minionBodies = self.GetMinionBodies(); foreach (CharacterBody val in minionBodies) { if (((Object)val).name.Contains("_SwarmTurretling")) { OnSwarmlingFound(val); } } } public void OnSwarmlingFound(CharacterBody body) { if (!SwarmlingBodies.Contains(body)) { SwarmlingBodies.Add(body); } } private void OnSwarmlingBodyStartGlobal(CharacterBody body) { if (((Object)body).name.Contains("_SwarmTurretling") && !((Object)(object)body.GetOwnerBody() != (Object)(object)self)) { OnSwarmlingDiscovered(body); } } private void OnSwarmlingDiscovered(CharacterBody body) { if (!SwarmlingBodies.Contains(body)) { SwarmlingBodies.Add(body); } } private void OnSwarmlingBodyDestroyGlobal(CharacterBody body) { if (((Object)body).name.Contains("_SwarmTurretling")) { OnSwarmlingLost(body); } } private void OnSwarmlingLost(CharacterBody body) { if (SwarmlingBodies.Contains(body)) { SwarmlingBodies.Remove(body); } } public void teleportSwarmling(Vector3 position) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { StartTeleporting(position); } else { CallCmdTeleportSwarmlings(position); } } [Command] public void CmdTeleportSwarmlings(Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) StartTeleporting(position); } [Server] public void StartTeleporting(Vector3 position) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void SnowtimeToybox.Components.SwarmPlayerSwarmlingTracker::StartTeleporting(UnityEngine.Vector3)' called on client"); return; } foreach (CharacterBody swarmlingBody in SwarmlingBodies) { if (!Object.op_Implicit((Object)(object)((swarmlingBody != null) ? ((Component)swarmlingBody).GetComponent() : null))) { break; } ((Component)swarmlingBody).GetComponent().StartTeleporting(position); } } private void UNetVersion() { } protected static void InvokeCmdCmdTeleportSwarmlings(NetworkBehaviour obj, NetworkReader reader) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"Command CmdTeleportSwarmlings called on client."); } else { ((SwarmPlayerSwarmlingTracker)(object)obj).CmdTeleportSwarmlings(reader.ReadVector3()); } } public void CallCmdTeleportSwarmlings(Vector3 position) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"Command function CmdTeleportSwarmlings called on server."); return; } if (((NetworkBehaviour)this).isServer) { CmdTeleportSwarmlings(position); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)5); val.WritePackedUInt32((uint)kCmdCmdTeleportSwarmlings); val.Write(((Component)this).GetComponent().netId); val.Write(position); ((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdTeleportSwarmlings"); } static SwarmPlayerSwarmlingTracker() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kCmdCmdTeleportSwarmlings = 1628594259; NetworkBehaviour.RegisterCommandDelegate(typeof(SwarmPlayerSwarmlingTracker), kCmdCmdTeleportSwarmlings, new CmdDelegate(InvokeCmdCmdTeleportSwarmlings)); NetworkCRC.RegisterBehaviour("SwarmPlayerSwarmlingTracker", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class TracerComponentLinger : MonoBehaviour { public Tracer tracer; public void OnEnable() { tracer = ((Component)this).GetComponent(); } public void LateUpdate() { tracer.distanceTraveled = Mathf.Min(tracer.distanceTraveled, tracer.totalDistance - 1f); } } public class TurretlingBabySpawner : MonoBehaviour { public GameObject turretlingPrefab; private CharacterMaster turretlingMaster; private CharacterMaster master; private bool enableTurretlings; public void OnEnable() { master = ((Component)this).gameObject.GetComponent(); master.onBodyStart += MasterOnonBodyStart; if (NetworkServer.active && SnowtimeToyboxMod.TurretlingSpawnChance.Value >= Run.instance.runRNG.RangeFloat(0f, 100f)) { enableTurretlings = true; } } private void MasterOnonBodyStart(CharacterBody body) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_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) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_0089: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)turretlingMaster) || !enableTurretlings) { return; } turretlingMaster = new MasterSummon { masterPrefab = turretlingPrefab, position = ((Component)this).transform.position + Vector3.up * 10f, rotation = ((Component)this).transform.rotation, summonerBodyObject = master.GetBodyObject(), ignoreTeamMemberLimit = true, useAmbientLevel = true, teamIndexOverride = master.teamIndex }.Perform(); if (!Object.op_Implicit((Object)(object)turretlingMaster)) { return; } turretlingMaster.inventory.GiveItemPermanent(Items.DroneUpgradeHidden, master.inventory.GetItemCountEffective(Items.DroneUpgradeHidden)); GameObject bodyObject = turretlingMaster.GetBodyObject(); if (Object.op_Implicit((Object)(object)bodyObject)) { ModelLocator component = bodyObject.GetComponent(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform)) { TemporaryOverlayInstance obj = TemporaryOverlayManager.AddOverlay(((Component)component.modelTransform).gameObject); obj.duration = 0.5f; obj.animateShaderAlpha = true; obj.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); obj.destroyComponentOnEnd = true; obj.originalMaterial = LegacyResourcesAPI.Load("Materials/matSummonDrone"); obj.AddToCharacterModel(((Component)component.modelTransform).GetComponent()); } } } } [RequireComponent(typeof(CharacterBody))] public class TurretlingDrunkenRamblingHandler : NetworkBehaviour { public CharacterBody self; public CharacterBody ownerBody; public CharacterMaster charMaster; public bool bodiesLogged; public string ownerName; public bool timeToRamble; public float rambleChance; public float timeSinceLastRamble = 999f; public float timeBetweenRambles = 12f; private static int kRpcRpcRamble; public void Awake() { self = ((Component)this).gameObject.GetComponent(); bodiesLogged = false; rambleChance = 0.05f; timeSinceLastRamble = 12f; } public void FixedUpdate() { if (!NetworkServer.active) { return; } timeSinceLastRamble += Time.fixedDeltaTime; if (!bodiesLogged) { if (!Object.op_Implicit((Object)(object)self.master)) { return; } charMaster = self.master; CharacterMaster obj = charMaster; object obj2; if (obj == null) { obj2 = null; } else { MinionOwnership minionOwnership = obj.minionOwnership; if (minionOwnership == null) { obj2 = null; } else { CharacterMaster ownerMaster = minionOwnership.ownerMaster; obj2 = ((ownerMaster != null) ? ownerMaster.GetBody() : null); } } if (!Object.op_Implicit((Object)obj2)) { return; } ownerBody = charMaster.minionOwnership.ownerMaster.GetBody(); ownerName = ((Object)ownerBody).name.Replace("(Clone)", ""); bodiesLogged = true; } if (((ownerName.Contains("Demolisher") && ((Object)((Component)this).gameObject).name.Contains("_DManTurretlingBody")) || ((Object)((Component)this).gameObject).name.Contains("_DemoTurretlingBody")) && !(timeSinceLastRamble < timeBetweenRambles)) { if (SnowtimeToyboxMod.TurretlingGibberishChance.Value >= Run.instance.runRNG.RangeFloat(0f, 100f)) { Ramble(); CallRpcRamble(); } timeSinceLastRamble = 0f; } } private void Ramble() { Log.Debug("playings sound .,."); Util.PlaySound("Play_Demoman_Gibberish", ((Component)this).gameObject); } [ClientRpc] private void RpcRamble() { Ramble(); } private void UNetVersion() { } protected static void InvokeRpcRpcRamble(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcRamble called on server."); } else { ((TurretlingDrunkenRamblingHandler)(object)obj).RpcRamble(); } } public void CallRpcRamble() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcRamble called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcRamble); val.Write(((Component)this).GetComponent().netId); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcRamble"); } static TurretlingDrunkenRamblingHandler() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcRamble = 796071164; NetworkBehaviour.RegisterRpcDelegate(typeof(TurretlingDrunkenRamblingHandler), kRpcRpcRamble, new CmdDelegate(InvokeRpcRpcRamble)); NetworkCRC.RegisterBehaviour("TurretlingDrunkenRamblingHandler", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class TurretlingKillNormalTurrets : MonoBehaviour { public bool rareReplaceDemoman; public void OnEnable() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (((Object)((Component)this).gameObject).name.Contains("Turretling")) { rareReplaceDemoman = SnowtimeToyboxMod.TurretlingDemoChance.Value >= Run.instance.runRNG.RangeFloat(0f, 100f); if (rareReplaceDemoman) { GameObject val = Object.Instantiate(Content.DemoTurretlingBroken, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); val.GetComponent().cost = Run.instance.GetDifficultyScaledCost(val.GetComponent().cost); NetworkServer.Spawn(val); Object.Destroy((Object)(object)((Component)this).gameObject); } } else if (!((Object)((Component)this).gameObject).name.Contains("Turretling") && SnowtimeToyboxMod.TurretlingKillOriginalTurrets.Value) { GameObject val2 = Object.Instantiate(Content.FriendlyTurretTurretlingBroken, ((Component)this).gameObject.transform.position, ((Component)this).gameObject.transform.rotation); val2.GetComponent().cost = Run.instance.GetDifficultyScaledCost(val2.GetComponent().cost); NetworkServer.Spawn(val2); Object.Destroy((Object)(object)((Component)this).gameObject); } } } [RequireComponent(typeof(CharacterBody))] [RequireComponent(typeof(InputBankTest))] [RequireComponent(typeof(TeamComponent))] public class TurretlingMissileTracker : MonoBehaviour, ITargetTracker { public GameObject trackingPrefab; public float maxTrackingDistance = 40f; public float maxTrackingAngle = 20f; public float trackerUpdateFrequency = 10f; private HurtBox trackingTarget; private CharacterBody characterBody; private TeamComponent teamComponent; private InputBankTest inputBank; private float trackerUpdateStopwatch; private Indicator indicator; private readonly BullseyeSearch search = new BullseyeSearch(); private void Awake() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //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) if ((Object)(object)trackingPrefab == (Object)null) { trackingPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_Engi.EngiMissileTrackingIndicator_prefab).WaitForCompletion(); } indicator = new Indicator(((Component)this).gameObject, trackingPrefab); } private void Start() { characterBody = ((Component)this).GetComponent(); inputBank = ((Component)this).GetComponent(); teamComponent = ((Component)this).GetComponent(); } public HurtBox GetTrackingTarget() { return trackingTarget; } private void OnEnable() { indicator.active = true; } private void OnDisable() { indicator.active = false; } private void FixedUpdate() { MyFixedUpdate(Time.fixedDeltaTime); } private void MyFixedUpdate(float deltaTime) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) trackerUpdateStopwatch += deltaTime; if (trackerUpdateStopwatch >= 1f / trackerUpdateFrequency) { trackerUpdateStopwatch -= 1f / trackerUpdateFrequency; _ = trackingTarget; Ray aimRay = default(Ray); ((Ray)(ref aimRay))..ctor(inputBank.aimOrigin, inputBank.aimDirection); SearchForTarget(aimRay); indicator.targetTransform = (Object.op_Implicit((Object)(object)trackingTarget) ? ((Component)trackingTarget).transform : null); } } private void SearchForTarget(Ray aimRay) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0062: Unknown result type (might be due to invalid IL or missing references) search.teamMaskFilter = TeamMask.all; ((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamComponent.teamIndex); search.filterByLoS = true; search.searchOrigin = ((Ray)(ref aimRay)).origin; search.searchDirection = ((Ray)(ref aimRay)).direction; search.sortMode = (SortMode)1; search.maxDistanceFilter = maxTrackingDistance; search.maxAngleFilter = maxTrackingAngle; search.RefreshCandidates(); search.FilterOutGameObject(((Component)this).gameObject); trackingTarget = search.GetResults().FirstOrDefault(); } } [RequireComponent(typeof(CharacterMaster))] public class TurretlingRainbow : NetworkBehaviour { [SyncVar] private float turretlingHue; [SyncVar] private float turretlingSat; [SyncVar] private float turretlingShade; [SyncVar] public bool turretlingRainbow; [SyncVar] public bool DTRainbowActive; [SyncVar] private string steamid = ""; private bool applyTurretlingVisuals = true; private CharacterMaster turretlingPlayerMaster; private PlayerCharacterMasterController turretlingPlayer; private CharacterMaster master; private CharacterBody charBody; private string steamidToApply; public static List DTActiveTurretlings = new List(); public float myHue; public static Dictionary turretlingRecolors = new Dictionary { { "STEAM_1:1:146751517", "0.5,0,0,Snowtime" }, { "STEAM_1:0:615574887", "0.05,0,0,Shortcake" }, { "STEAM_1:1:60493073", "0,1,0,Acanthi" }, { "STEAM_1:1:174533492", "0.87,0.87,0,Bread" }, { "STEAM_1:0:64329810", "0.71,0.27,0.27,Illusive" }, { "STEAM_1:1:891275848", "0.85,0.45,0.8,Sentry" }, { "STEAM_1:1:502654116", "0.83,0,0,Anartoast" }, { "STEAM_1:0:131809264", "0.43,0.97,0,Lukas" }, { "STEAM_1:1:35743795", "0.9,0.5,0,PlNK" }, { "STEAM_1:0:24377756", "0.014,0.52,0.4,Saucy" }, { "STEAM_1:1:48521507", "0.014,0.52,0.4,Score" }, { "STEAM_1:0:502558120", "0.32,0.3,0.99,Green" }, { "STEAM_1:0:75897289", "0.5,0.3,0.99,Regi" }, { "STEAM_1:1:158283592", "0.0125,0.25,0.5,VCR" }, { "STEAM_1:1:59278323", "0.037,0.1,0.01,F4lx" }, { "STEAM_1:0:98120944", "0.6,0.27,0.27,Samuel" }, { "STEAM_1:1:33573234", "0.34,0.65,0.6,DTEE" } }; public float NetworkturretlingHue { get { return turretlingHue; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref turretlingHue, 1u); } } public float NetworkturretlingSat { get { return turretlingSat; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref turretlingSat, 2u); } } public float NetworkturretlingShade { get { return turretlingShade; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref turretlingShade, 4u); } } public bool NetworkturretlingRainbow { get { return turretlingRainbow; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref turretlingRainbow, 8u); } } public bool NetworkDTRainbowActive { get { return DTRainbowActive; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref DTRainbowActive, 16u); } } public string Networksteamid { get { return steamid; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref steamid, 32u); } } public void Start() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown if (((Object)((Component)this).gameObject).name.Contains("Broken")) { return; } master = ((Component)this).gameObject.GetComponent(); master.onBodyStart += MasterOnonBodyStart; master.onBodyDeath.AddListener(new UnityAction(MasterOnonBodyDeath)); if (NetworkServer.active) { NetworkturretlingHue = Run.instance.runRNG.RangeFloat(0f, 1f); NetworkturretlingSat = Run.instance.runRNG.RangeFloat(0f, 1f); NetworkturretlingShade = Run.instance.runRNG.RangeFloat(0f, 1f); if (!((Object)((Component)this).gameObject).name.Contains("_DT") && !((Object)((Component)this).gameObject).name.Contains("PlayerMaster") && !((Object)((Component)this).gameObject).name.Contains("_Holy") && !((Object)((Component)this).gameObject).name.Contains("_DMan")) { NetworkturretlingRainbow = SnowtimeToyboxMod.TurretlingRainbowChance.Value >= Run.instance.runRNG.RangeFloat(0f, 100f); } if (turretlingRainbow) { giveItems(takeRemove: true); } } } public void FixedUpdate() { //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0221: 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_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) if (steamid != "" && steamidToApply != "-1") { applyTurretlingVisuals = true; } if (!Object.op_Implicit((Object)(object)master.GetBody())) { return; } if (((Object)((Component)this).gameObject).name.StartsWith("_DT")) { if (DTRainbowActive && !turretlingRainbow) { applyTurretlingVisuals = true; NetworkturretlingRainbow = true; DTActiveTurretlings.Add(master.GetBody()); } else if (!DTRainbowActive && turretlingRainbow) { applyTurretlingVisuals = true; NetworkturretlingRainbow = false; DTActiveTurretlings.Remove(master.GetBody()); } } if (!applyTurretlingVisuals) { return; } if (((Object)((Component)this).gameObject).name.Contains("PlayerMaster") && !((Object)((Component)master.GetBody()).gameObject).name.Contains("Turretling")) { applyTurretlingVisuals = false; return; } if (NetworkServer.active && Object.op_Implicit((Object)(object)Run.instance) && !Object.op_Implicit((Object)(object)turretlingPlayerMaster)) { NetworkUserId id; PlatformID steamId; if (((Object)((Component)this).gameObject).name.Contains("_DT") || ((Object)((Component)this).gameObject).name.Contains("_Holy") || ((Object)((Component)this).gameObject).name.Contains("_SwarmTurretling") || ((Object)((Component)this).gameObject).name.Contains("_DMan")) { turretlingPlayerMaster = master.minionOwnership.ownerMaster; if (!Object.op_Implicit((Object)(object)turretlingPlayer)) { turretlingPlayer = turretlingPlayerMaster.playerCharacterMasterController; } if ((Object)(object)turretlingPlayer != (Object)null) { id = turretlingPlayer.networkUser.id; steamId = ((NetworkUserId)(ref id)).steamId; Networksteamid = ((PlatformID)(ref steamId)).ToSteamID(); } if (((Object)((Component)this).gameObject).name.Contains("Broken") && master.inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("RainbowizerPowerUp")) != 0) { master.inventory.RemoveItemPermanent(ItemCatalog.FindItemIndex("RainbowizerPowerUp"), master.inventory.GetItemCountEffective(Items.ScrapRed)); } } else if (((Object)((Component)this).gameObject).name.Contains("PlayerMaster")) { turretlingPlayerMaster = ((Component)this).gameObject.GetComponent(); Log.Debug("Player found possessing Turretling, defining SteamID directly."); if (!Object.op_Implicit((Object)(object)((Component)this).gameObject.GetComponent())) { return; } id = turretlingPlayerMaster.playerCharacterMasterController.networkUser.id; steamId = ((NetworkUserId)(ref id)).steamId; Networksteamid = ((PlatformID)(ref steamId)).ToSteamID(); Log.Debug("steam id !! " + steamid + " from player: " + ((Component)this).gameObject.GetComponent().GetDisplayName()); } if (((((Object)((Component)this).gameObject).name.Contains("_DT") && (Object)(object)turretlingPlayer != (Object)null) || (((Object)((Component)this).gameObject).name.Contains("_Holy") && !Utility.IsNullOrWhiteSpace(steamid)) || ((Object)((Component)this).gameObject).name.Contains("PlayerMaster") || ((Object)((Component)this).gameObject).name.Contains("_SwarmTurretling") || ((Object)((Component)this).gameObject).name.Contains("_DMan")) && turretlingRecolors.TryGetValue(steamid, out var value)) { string[] array = value.Split(","); NetworkturretlingHue = float.Parse(array[0]); NetworkturretlingSat = float.Parse(array[1]); NetworkturretlingShade = float.Parse(array[2]); } } if (Utility.IsNullOrWhiteSpace(steamidToApply) && !Utility.IsNullOrWhiteSpace(steamid) && turretlingRecolors.ContainsKey(steamid)) { ((Object)((Component)this).gameObject).name.Contains("PlayerMaster"); steamidToApply = steamid; applyTurretlingVisuals = true; } ApplyVisuals(); } public void ApplyVisuals() { if ((((Object)((Component)this).gameObject).name.Contains("PlayerMaster") && !((Object)((Component)master.GetBody()).gameObject).name.Contains("Turretling")) || !applyTurretlingVisuals) { return; } applyTurretlingVisuals = false; ((Object)((Component)this).gameObject).name.Contains("PlayerMaster"); if (!Object.op_Implicit((Object)(object)charBody)) { charBody = (((Object)((Component)this).gameObject).name.Contains("PlayerMaster") ? ((Component)((Component)this).gameObject.GetComponent().GetBody()).gameObject.GetComponent() : master.GetBody()); } if (!Object.op_Implicit((Object)(object)charBody)) { return; } ((Object)((Component)this).gameObject).name.Contains("PlayerMaster"); if (((Object)charBody).name.Contains("Broken")) { return; } Transform modelTransform = charBody.modelLocator._modelTransform; if (!Object.op_Implicit((Object)(object)((modelTransform != null) ? ((Component)modelTransform).gameObject : null))) { return; } Transform modelTransform2 = charBody.modelLocator._modelTransform; ChildLocator val = default(ChildLocator); Transform val2 = default(Transform); Transform val3 = default(Transform); Transform val4 = default(Transform); Animator val5 = default(Animator); Animator val6 = default(Animator); Animator val7 = default(Animator); if (modelTransform2 == null || !((Component)modelTransform2).gameObject.TryGetComponent(ref val) || (Object)(object)val == (Object)null || !val.TryFindChild("Turretling_Overlay", ref val2) || !val.TryFindChild("Turretling_Light", ref val3) || !val.TryFindChild("Turretling_RainbowFX", ref val4) || !((Component)val2).gameObject.TryGetComponent(ref val5) || !((Component)val3).gameObject.TryGetComponent(ref val6) || !((Component)val4).gameObject.TryGetComponent(ref val7)) { return; } Animator[] obj = new Animator[3] { val5, val6, val7 }; myHue = turretlingHue; Animator[] array = (Animator[])(object)obj; foreach (Animator obj2 in array) { obj2.SetFloat("hue", turretlingRainbow ? 0f : turretlingHue); obj2.SetFloat("sat", turretlingRainbow ? 0f : turretlingSat); obj2.SetFloat("shade", turretlingRainbow ? 0f : turretlingShade); obj2.SetBool("shift", turretlingRainbow); } if (!(steamidToApply != "-1") || !turretlingRecolors.TryGetValue(steamid, out var value)) { return; } string[] array2 = value.Split(","); if (array2.Length == 4) { string text = array2[^1].Trim(); if (Object.op_Implicit((Object)(object)charBody)) { ModelLocator modelLocator = charBody.modelLocator; if (modelLocator != null) { Transform modelTransform3 = modelLocator.modelTransform; ChildLocator val8 = default(ChildLocator); if (((modelTransform3 != null) ? new bool?(((Component)modelTransform3).gameObject.TryGetComponent(ref val8)) : null).GetValueOrDefault()) { Transform obj3 = val8.FindChild(text + "Halo"); if (obj3 != null) { ((Component)obj3).gameObject.SetActive(true); } Transform obj4 = val8.FindChild(text + "Unusual"); if (obj4 != null) { ((Component)obj4).gameObject.SetActive(true); } } } } } steamidToApply = "-1"; } public void giveItems(bool takeRemove) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)this).gameObject).name.Contains("PlayerMaster")) { return; } if (((Object)((Component)this).gameObject).name.Contains("_DT")) { if (takeRemove) { if (master.inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("RainbowizerPowerUp")) == 0) { master.inventory.GiveItemPermanent(ItemCatalog.FindItemIndex("RainbowizerPowerUp"), 1); } } else if (master.inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("RainbowizerPowerUp")) != 0) { master.inventory.RemoveItemPermanent(ItemCatalog.FindItemIndex("RainbowizerPowerUp"), master.inventory.GetItemCountEffective(ItemCatalog.FindItemIndex("RainbowizerPowerUp"))); } return; } try { string[] array = SnowtimeToyboxMod.TurretlingRainbowBonusItems.Value.Split(","); for (int i = 0; i < array.Length; i += 2) { if (takeRemove) { master.inventory.GiveItemPermanent(ItemCatalog.FindItemIndex(array[i]), int.Parse(array[i + 1])); } else { master.inventory.RemoveItemPermanent(ItemCatalog.FindItemIndex(array[i]), int.Parse(array[i + 1])); } } } catch (Exception data) { Log.Error("something bad happened when giving turretlings extra items!!"); Log.Error(data); } } private void MasterOnonBodyDeath() { //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_0149: Unknown result type (might be due to invalid IL or missing references) if (((Object)((Component)this).gameObject).name.Contains("PlayerMaster") || ((Object)((Component)this).gameObject).name.Contains("_DT") || ((Object)((Component)this).gameObject).name.Contains("Broken") || ((Object)((Component)this).gameObject).name.Contains("_Holy") || ((Object)((Component)this).gameObject).name.Contains("_SwarmTurretling") || ((Object)((Component)this).gameObject).name.Contains("_DMan")) { return; } int itemCountPermanent = master.inventory.GetItemCountPermanent(Items.ExtraLife); ChildLocator component = ((Component)master.GetBody().modelLocator.modelTransform).gameObject.GetComponent(); if (turretlingRainbow && itemCountPermanent != 0) { ((Component)component.FindChild("Turretling_RainbowFX")).gameObject.SetActive(false); } if (itemCountPermanent == 0 && Object.op_Implicit((Object)(object)master.GetBody()) && NetworkServer.active) { if (((Object)((Component)this).gameObject).name.Contains("Demo")) { GameObject val = Object.Instantiate(Content.DemoTurretlingBroken, master.GetBody().transform.position, master.GetBody().transform.rotation); val.GetComponent().cost = (int)((float)Run.instance.GetDifficultyScaledCost(val.GetComponent().cost) * SnowtimeToyboxMod.TurretlingReviveCostMult.Value); NetworkServer.Spawn(val); } else { GameObject val2 = Object.Instantiate(Content.FriendlyTurretTurretlingBroken, master.GetBody().transform.position, master.GetBody().transform.rotation); val2.GetComponent().cost = (int)((float)Run.instance.GetDifficultyScaledCost(val2.GetComponent().cost) * SnowtimeToyboxMod.TurretlingReviveCostMult.Value); NetworkServer.Spawn(val2); } } } public void MasterOnonBodyStart(CharacterBody body) { applyTurretlingVisuals = true; steamidToApply = ""; } public void DTRainbowize(bool enterExit) { NetworkDTRainbowActive = enterExit; giveItems(enterExit); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(turretlingHue); writer.Write(turretlingSat); writer.Write(turretlingShade); writer.Write(turretlingRainbow); writer.Write(DTRainbowActive); writer.Write(steamid); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(turretlingHue); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(turretlingSat); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 4u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(turretlingShade); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 8u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(turretlingRainbow); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 0x10u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(DTRainbowActive); } if ((((NetworkBehaviour)this).syncVarDirtyBits & 0x20u) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(steamid); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { turretlingHue = reader.ReadSingle(); turretlingSat = reader.ReadSingle(); turretlingShade = reader.ReadSingle(); turretlingRainbow = reader.ReadBoolean(); DTRainbowActive = reader.ReadBoolean(); steamid = reader.ReadString(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { turretlingHue = reader.ReadSingle(); } if (((uint)num & 2u) != 0) { turretlingSat = reader.ReadSingle(); } if (((uint)num & 4u) != 0) { turretlingShade = reader.ReadSingle(); } if (((uint)num & 8u) != 0) { turretlingRainbow = reader.ReadBoolean(); } if (((uint)num & 0x10u) != 0) { DTRainbowActive = reader.ReadBoolean(); } if (((uint)num & 0x20u) != 0) { steamid = reader.ReadString(); } } } } namespace SnowtimeToybox.Buffs { public abstract class BuffBase : BuffBase where T : BuffBase { public static T Instance { get; private set; } public static BuffIndex BuffIndex => Instance.Buff.buffIndex; public BuffBase() { if (Instance != null) { throw new InvalidOperationException("Singleton class \"" + typeof(T).Name + "\" inheriting ItemBase was instantiated twice"); } Instance = this as T; } } public abstract class BuffBase { public abstract BuffDef Buff { get; } public abstract void PostCreation(); public void Create() { ContentAddition.AddBuffDef(Buff); PostCreation(); } } public class AcanthiVampiricDesires : BuffBase { public override BuffDef Buff => AcanthiFriendlyTurret.AcanthiTurretBuff; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(VampiricLifeSteal); } private void VampiricLifeSteal(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0067: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (!((Object)(object)victim == (Object)null) && !((Object)(object)damageInfo.attacker == (Object)null)) { GameObject attacker = damageInfo.attacker; CharacterBody val = ((attacker != null) ? attacker.GetComponent() : null); if (!((Object)(object)val == (Object)null) && (Object)(object)val != (Object)null && val.HasBuff(AcanthiFriendlyTurret.AcanthiTurretBuff)) { float damage = damageInfo.damage; val.healthComponent.Heal(damage, damageInfo.procChainMask, true); } } } } public class BreadTurretBuff : BuffBase { public CharacterBody buffedSelf; public override BuffDef Buff => BreadFriendlyTurret.BreadTurretBuffFortune; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddBreadTurretBuff); } private void AddBreadTurretBuff(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buff)) { float baseDamage = sender.baseDamage; args.luckAdd += 1f; if (Object.op_Implicit((Object)(object)buffedSelf) && buffedSelf.HasBuff(AcanthiFriendlyTurret.AcanthiTurretBuff)) { args.damageTotalMult += baseDamage * 0.25f; } } } } public class BreadTurretBuffNearbyAllies : BuffBase { public override BuffDef Buff => BreadFriendlyTurret.BreadTurretBuffNearbyAllies; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddBreadTurretBuff); } private void AddBreadTurretBuff(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buff)) { args.attackSpeedMultAdd += 0.2f; args.barrierDecayMult *= 0.33f; } } } public class BreadTurretBuffPassively : BuffBase { public GameObject BreadGraceWard = BreadFriendlyTurret.FriendlyTurretBreadGraceWard; public GameObject BreadGraceWardInstance; public override BuffDef Buff => BreadFriendlyTurret.BreadTurretBuffPassive; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddBreadTurretBuffNearby); } private void AddBreadTurretBuffNearby(CharacterBody sender, StatHookEventArgs args) { sender.HasBuff(Buff); } } public class ShortcakeTurretBuff : BuffBase { public override BuffDef Buff => ShortcakeFriendlyTurret.ShortcakeTurretBuff; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(ShortcakeDamaged); } private void ShortcakeDamaged(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_007b: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ac: 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_00ec: 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_013a: 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_0152: 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_01a3: 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_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if ((Object)(object)damageInfo.attacker == (Object)null || (Object)(object)victim == (Object)null) { return; } CharacterBody val = ((victim != null) ? victim.GetComponent() : null); if ((Object)(object)val == (Object)null || ((Object)(object)val != (Object)null && !val.HasBuff(ShortcakeFriendlyTurret.ShortcakeTurretBuff))) { return; } int num = 999; float radius = 45f; bool isCrit = val.RollCrit(); float num2 = 3f * val.damage; TeamIndex teamIndex = val.teamComponent.teamIndex; HurtBox[] hurtBoxes = new SphereSearch { origin = damageInfo.position, radius = radius, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, queryTriggerInteraction = (QueryTriggerInteraction)0 }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.all).OrderCandidatesByDistance() .FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes(); for (int i = 0; i < Mathf.Min(num, hurtBoxes.Length) && !((Object)(object)hurtBoxes[i] == (Object)null); i++) { if (hurtBoxes[i].teamIndex != val.teamComponent.teamIndex) { SnowtimeOrbs snowtimeOrbs = new SnowtimeOrbs(); snowtimeOrbs.attacker = ((Component)val).gameObject; snowtimeOrbs.speed = 180f; snowtimeOrbs.snowtimeOrbType = SnowtimeOrbs.OrbTypes.ShortcakeRetaliate; snowtimeOrbs.damageValue = num2; snowtimeOrbs.isCrit = isCrit; ((Orb)snowtimeOrbs).origin = damageInfo.position; snowtimeOrbs.range = 45f; snowtimeOrbs.teamIndex = teamIndex; ((Orb)snowtimeOrbs).target = hurtBoxes[i]; OrbManager.instance.AddOrb((Orb)(object)snowtimeOrbs); } else if (!((Component)hurtBoxes[i].healthComponent).gameObject.GetComponent().baseNameToken.Contains("FRIENDLYTURRET_SHORTCAKE") && hurtBoxes[i].teamIndex == val.teamComponent.teamIndex) { SnowtimeOrbs snowtimeOrbs2 = new SnowtimeOrbs(); snowtimeOrbs2.attacker = ((Component)val).gameObject; snowtimeOrbs2.speed = 180f; snowtimeOrbs2.snowtimeOrbType = SnowtimeOrbs.OrbTypes.ShortcakeRetaliateFriendly; snowtimeOrbs2.procCoefficient = 0f; snowtimeOrbs2.damageValue = num2 * 0.16f; snowtimeOrbs2.isCrit = false; ((Orb)snowtimeOrbs2).origin = damageInfo.position; snowtimeOrbs2.range = 45f; snowtimeOrbs2.teamIndex = teamIndex; ((Orb)snowtimeOrbs2).target = hurtBoxes[i]; OrbManager.instance.AddOrb((Orb)(object)snowtimeOrbs2); } } } } public class AcanthiBleeding : BuffBase { public static ModdedDamageType Acanthi_ButHeresTheBleeder = DamageAPI.ReserveDamageType(); public DotDef AcanthiDot; public DotIndex AcanthiDotIndex; public override BuffDef Buff => AcanthiFriendlyTurret.AcanthiTurretDebuff; public override void PostCreation() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0064: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown AcanthiDot = new DotDef(); AcanthiDot.associatedBuff = Buff; AcanthiDot.interval = 0.2f; AcanthiDot.damageCoefficient = 0.25f; AcanthiDot.terminalTimedBuff = Buff; AcanthiDot.terminalTimedBuffDuration = 1f; AcanthiDot.damageColorIndex = (DamageColorIndex)8; AcanthiDotIndex = DotAPI.RegisterDotDef(AcanthiDot, (CustomDotBehaviour)null, (CustomDotVisual)null, (CustomDotDamageEvaluation)null); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(AcanthiApplyDebuff); } private void AcanthiApplyDebuff(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0089: 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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, damageInfo, victim); if (damageInfo == null || (Object)(object)victim == (Object)null || (Object)(object)damageInfo.attacker == (Object)null) { return; } CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent() : null); if ((Object)(object)val == (Object)null) { return; } CharacterMaster master = val.master; if ((Object)(object)master == (Object)null) { return; } bool flag = Util.CheckRoll(damageInfo.procCoefficient * 100f, master.luck, master); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && DamageAPI.HasModdedDamageType(damageInfo, Acanthi_ButHeresTheBleeder) && flag) { InflictDotInfo val2 = default(InflictDotInfo); val2.damageMultiplier = 1f; val2.totalDamage = damageInfo.attacker.GetComponent().damage; val2.duration = 3f; val2.victimObject = victim; val2.attackerObject = damageInfo.attacker; val2.preUpgradeDotIndex = AcanthiDotIndex; val2.dotIndex = AcanthiDotIndex; DotController.InflictDot(ref val2); if (val.HasBuff(BreadFriendlyTurret.BreadTurretBuffNearbyAllies)) { DotController.InflictDot(ref val2); } } } } public class BorboTurretDebuff : BuffBase { public override BuffDef Buff => BorboFriendlyTurret.BorboTurretDebuff; public override void PostCreation() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(AddBorboTurretDebuff); } private void AddBorboTurretDebuff(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buff)) { args.armorAdd += -120f; args.damageTotalMult *= 0.2f; args.jumpPowerTotalMult *= 0f; args.moveSpeedTotalMult *= 0.2f; } } } }