using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared._EE.Flight; /// /// Adds an action that allows the user to become temporarily /// weightless at the cost of stamina and hand usage. /// [RegisterComponent, NetworkedComponent(), AutoGenerateComponentState] public sealed partial class FlightComponent : Component { [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string? ToggleAction = "ActionToggleFlight"; [DataField, AutoNetworkedField] public EntityUid? ToggleActionEntity; /// /// Is the user flying right now? /// [DataField, AutoNetworkedField] public bool IsCurrentlyFlying; /// /// Stamina drain per second when flying /// [DataField, AutoNetworkedField] public float StaminaDrainRate = 10.0f; /// /// DeltaV - Stamina cost when taking off. /// [DataField, AutoNetworkedField] public float InitialStaminaCost = 0f; /// /// DoAfter delay until the user becomes weightless. /// [DataField, AutoNetworkedField] public float ActivationDelay = 0.5f; /// /// Speed modifier while in flight /// [DataField, AutoNetworkedField] public float SpeedModifier = 2.0f; /// /// DeltaV - Friction modifier while in flight. Should be less than one so /// they have less control while flying. Also applies to friction with no inputs. /// [DataField, AutoNetworkedField] public float FrictionModifier = 1f; /// /// DeltaV - Acceleration modifer while in flight. /// [DataField, AutoNetworkedField] public float AccelerationModifer = 1.5f; /// /// Path to a sound specifier or collection for the noises made during flight /// [DataField] public SoundSpecifier FlapSound = new SoundCollectionSpecifier("WingFlaps"); /// /// Is the flight animated? /// [DataField] public bool IsAnimated = true; /// /// Does the animation animate a layer?. /// [DataField] public bool IsLayerAnimated; /// /// Which RSI layer path does this animate? /// [DataField] public string? Layer; /// /// Whats the speed of the shader? /// [DataField] public float ShaderSpeed = 6.0f; /// /// How much are the values in the shader's calculations multiplied by? /// [DataField] public float ShaderMultiplier = 0.02f; /// /// What is the offset on the shader? /// [DataField] public float ShaderOffset = 0.25f; /// /// What animation does the flight use? /// [DataField] public string AnimationKey = "default"; /// /// Time between sounds being played /// [DataField] public float FlapInterval = 1.0f; public float TimeUntilFlap; }