Weldable cleanup (#19809)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Tools.Systems;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Tools.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
[Access(typeof(WeldableSystem))]
|
||||
public sealed partial class LayerChangeOnWeldComponent : Component
|
||||
{
|
||||
[DataField("unWeldedLayer")]
|
||||
[ViewVariables]
|
||||
public CollisionGroup UnWeldedLayer = CollisionGroup.AirlockLayer;
|
||||
|
||||
[DataField("weldedLayer")]
|
||||
[ViewVariables]
|
||||
public CollisionGroup WeldedLayer = CollisionGroup.WallLayer;
|
||||
}
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user