Weldable cleanup (#19809)

This commit is contained in:
metalgearsloth
2023-09-05 00:07:01 +10:00
committed by GitHub
parent 88454b046a
commit db1ff07821
24 changed files with 159 additions and 210 deletions

View File

@@ -1,10 +1,39 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Tools.Components;
public abstract partial class SharedWeldableComponent : Component
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class WeldableComponent : Component
{
/// <summary>
/// Tool quality for welding.
/// </summary>
[DataField("weldingQuality", customTypeSerializer: typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
[ViewVariables(VVAccess.ReadWrite)]
public string WeldingQuality = "Welding";
/// <summary>
/// How much time does it take to weld/unweld entity.
/// </summary>
[DataField("time")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
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>
/// Is this entity currently welded shut?
/// </summary>
[DataField("isWelded"), AutoNetworkedField]
public bool IsWelded;
}
[Serializable, NetSerializable]