using System.Numerics; using System.Threading; using Content.Shared.DoAfter; using Robust.Shared.Audio; using Robust.Shared.Containers; using Content.Shared.Whitelist; // Frontier namespace Content.Server.Mech.Equipment.Components; /// /// A piece of mech equipment that grabs entities and stores them /// inside of a container so large objects can be moved. /// [RegisterComponent] public sealed partial class MechGrabberComponent : Component { /// /// The change in energy after each grab. /// [DataField("grabEnergyDelta")] public float GrabEnergyDelta = -30; /// /// How long does it take to grab something? /// [DataField("grabDelay")] public float GrabDelay = 2.5f; /// /// The offset from the mech when an item is dropped. /// This is here for things like lockers and vendors /// [DataField("depositOffset")] public Vector2 DepositOffset = new(0, -1); /// /// The maximum amount of items that can be fit in this grabber /// [DataField("maxContents")] public int MaxContents = 10; /// /// The sound played when a mech is grabbing something /// [DataField("grabSound")] public SoundSpecifier GrabSound = new SoundPathSpecifier("/Audio/Mecha/sound_mecha_hydraulic.ogg"); public EntityUid? AudioStream; [ViewVariables(VVAccess.ReadWrite)] public Container ItemContainer = default!; [DataField, ViewVariables(VVAccess.ReadOnly)] public DoAfterId? DoAfter; /// /// Frontier - If any entities on the blacklist then UnanchorOnHit won't work on anything else. /// [DataField] public EntityWhitelist? Blacklist; // Horizon Mech start /// /// is it possible to grab a mob? /// [DataField] public bool GrabMobs = false; /// /// is it slow mob's metabolism? /// [DataField] public bool SlowMetabolism = false; /// /// Time that takes to escape the grabber /// [DataField("baseResistTime")] public float BaseResistTime = 5f; // Horizon Mech end }