using Content.Server.Tools.Systems; using Content.Shared.Tools; using Content.Shared.Tools.Components; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Tools.Components; /// /// Allows users to weld/unweld doors, crates and lockers. /// [RegisterComponent] [Access(typeof(WeldableSystem))] public sealed class WeldableComponent : SharedWeldableComponent { /// /// Tool quality for welding. /// [DataField("weldingQuality", customTypeSerializer: typeof(PrototypeIdSerializer))] [ViewVariables(VVAccess.ReadWrite)] public string WeldingQuality = "Welding"; /// /// Whether this entity can ever be welded shut. /// [DataField("weldable")] [ViewVariables(VVAccess.ReadWrite)] public bool Weldable = true; /// /// How much fuel does it take to weld/unweld entity. /// [DataField("fuel")] [ViewVariables(VVAccess.ReadWrite)] public float FuelConsumption = 1f; /// /// How much time does it take to weld/unweld entity. /// [DataField("time")] [ViewVariables(VVAccess.ReadWrite)] public TimeSpan WeldingTime = TimeSpan.FromSeconds(1f); /// /// Shown when welded entity is examined. /// [DataField("weldedExamineMessage")] [ViewVariables(VVAccess.ReadWrite)] public string? WeldedExamineMessage = "weldable-component-examine-is-welded"; /// /// Whether something is currently using a welder on this so DoAfter isn't spammed. /// [ViewVariables(VVAccess.ReadOnly)] public bool BeingWelded; /// /// Is this entity currently welded shut? /// [ViewVariables(VVAccess.ReadOnly)] public bool IsWelded; }