using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.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 On; /// /// Stamina drain per second when flying /// [DataField, AutoNetworkedField] public float StaminaDrainRate = 6.0f; /// /// DoAfter delay until the user becomes weightless. /// [DataField, AutoNetworkedField] public float ActivationDelay = 1.0f; /// /// Speed modifier while in flight /// [DataField, AutoNetworkedField] public float SpeedModifier = 2.0f; /// /// Does the flier need hands free? /// [DataField] public bool NeedsHands = true; /// /// 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.01f; /// /// 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; }