Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Content.Shared.Nutrition.Components
|
||||
/// Indicates that the entity can be thrown on a kitchen spike for butchering.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class ButcherableComponent : Component
|
||||
public sealed partial class ButcherableComponent : Component
|
||||
{
|
||||
[DataField("spawned", required: true)]
|
||||
public List<EntitySpawnEntry> SpawnedEntities = new();
|
||||
|
||||
@@ -5,13 +5,13 @@ namespace Content.Shared.Nutrition.Components
|
||||
{
|
||||
[Access(typeof(SharedCreamPieSystem))]
|
||||
[RegisterComponent]
|
||||
public sealed class CreamPieComponent : Component
|
||||
public sealed partial class CreamPieComponent : Component
|
||||
{
|
||||
[DataField("paralyzeTime")]
|
||||
public float ParalyzeTime { get; } = 1f;
|
||||
public float ParalyzeTime { get; private set; } = 1f;
|
||||
|
||||
[DataField("sound")]
|
||||
public SoundSpecifier Sound { get; } = new SoundCollectionSpecifier("desecration");
|
||||
public SoundSpecifier Sound { get; private set; } = new SoundCollectionSpecifier("desecration");
|
||||
|
||||
[ViewVariables]
|
||||
public bool Splatted { get; set; } = false;
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Content.Shared.Nutrition.Components
|
||||
{
|
||||
[Access(typeof(SharedCreamPieSystem))]
|
||||
[RegisterComponent]
|
||||
public sealed class CreamPiedComponent : Component
|
||||
public sealed partial class CreamPiedComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
public bool CreamPied { get; set; } = false;
|
||||
|
||||
@@ -9,7 +9,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Generic;
|
||||
namespace Content.Shared.Nutrition.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(HungerSystem))]
|
||||
public sealed class HungerComponent : Component
|
||||
public sealed partial class HungerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The current hunger amount of the entity
|
||||
|
||||
@@ -5,16 +5,16 @@ using Robust.Shared.GameStates;
|
||||
namespace Content.Shared.Nutrition.Components
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class SmokableComponent : Component
|
||||
public sealed partial class SmokableComponent : Component
|
||||
{
|
||||
[DataField("solution")]
|
||||
public string Solution { get; } = "smokable";
|
||||
public string Solution { get; private set; } = "smokable";
|
||||
|
||||
/// <summary>
|
||||
/// Solution inhale amount per second.
|
||||
/// </summary>
|
||||
[DataField("inhaleAmount")]
|
||||
public FixedPoint2 InhaleAmount { get; } = FixedPoint2.New(0.05f);
|
||||
public FixedPoint2 InhaleAmount { get; private set; } = FixedPoint2.New(0.05f);
|
||||
|
||||
[DataField("state")]
|
||||
public SmokableState State { get; set; } = SmokableState.Unlit;
|
||||
|
||||
Reference in New Issue
Block a user