Files
tbd-station-14/Content.Server/Tools/Components/WeldableComponent.cs
Vera Aguilera Puerto c5f7c61041 Fix some friend access violations by allowing others access. (#8594)
Rename Friend attribute to Access attribute.
Updates submodule to v0.21.0.0 as well.
2022-06-07 11:30:27 +02:00

62 lines
1.9 KiB
C#

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