using RoR2; using RoR2.Projectile; using UnityEngine.Networking; namespace EntityStates.Engi.EngiBubbleShield; public class Undeployed : EntityState { private ProjectileStickOnImpact projectileStickOnImpact; public override void OnEnter() { base.OnEnter(); ProjectileController component = GetComponent(); projectileStickOnImpact = GetComponent(); if (!NetworkServer.active || !component.owner) { return; } CharacterBody component2 = component.owner.GetComponent(); if ((bool)component2) { CharacterMaster master = component2.master; if ((bool)master) { master.AddDeployable(GetComponent(), DeployableSlot.EngiBubbleShield); } } } public override void FixedUpdate() { base.FixedUpdate(); if (projectileStickOnImpact.stuck && NetworkServer.active) { SetNextState(); } } protected virtual void SetNextState() { outer.SetNextState(new Deployed()); } }