Update trivial components to use auto comp states (#20539)

This commit is contained in:
DrSmugleaf
2023-09-28 16:20:29 -07:00
committed by GitHub
parent 14cfe44ece
commit a44fa86b68
158 changed files with 806 additions and 2866 deletions

View File

@@ -1,29 +1,17 @@
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Electrocution
{
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedElectrocutionSystem))]
[RegisterComponent, NetworkedComponent]
public sealed partial class InsulatedComponent : Component
{
// Technically, people could cheat and figure out which budget insulated gloves are gud and which ones are bad.
// We might want to rethink this a little bit.
/// <summary>
/// Siemens coefficient. Zero means completely insulated.
/// </summary>
[DataField("coefficient")]
public float SiemensCoefficient { get; set; } = 0f;
}
// Technically, people could cheat and figure out which budget insulated gloves are gud and which ones are bad.
// We might want to rethink this a little bit.
[NetSerializable, Serializable]
public sealed class InsulatedComponentState : ComponentState
{
public float SiemensCoefficient { get; private set; }
public InsulatedComponentState(float siemensCoefficient)
{
SiemensCoefficient = siemensCoefficient;
}
[DataField, AutoNetworkedField]
public float Coefficient { get; set; } = 0f;
}
}