Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -9,7 +9,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
|
||||
namespace Content.Shared.VendingMachines
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class VendingMachineComponent : Component
|
||||
public sealed partial class VendingMachineComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// PrototypeID for the vending machine's inventory, see <see cref="VendingMachineInventoryPrototype"/>
|
||||
@@ -246,7 +246,7 @@ namespace Content.Shared.VendingMachines
|
||||
StatusKey,
|
||||
}
|
||||
|
||||
public sealed class VendingMachineSelfDispenseEvent : InstantActionEvent
|
||||
public sealed partial class VendingMachineSelfDispenseEvent : InstantActionEvent
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
@@ -9,15 +9,15 @@ namespace Content.Shared.VendingMachines
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField("startingInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<uint, EntityPrototype>))]
|
||||
public Dictionary<string, uint> StartingInventory { get; } = new();
|
||||
public Dictionary<string, uint> StartingInventory { get; private set; } = new();
|
||||
|
||||
[DataField("emaggedInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<uint, EntityPrototype>))]
|
||||
public Dictionary<string, uint>? EmaggedInventory { get; }
|
||||
public Dictionary<string, uint>? EmaggedInventory { get; private set; }
|
||||
|
||||
[DataField("contrabandInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer<uint, EntityPrototype>))]
|
||||
public Dictionary<string, uint>? ContrabandInventory { get; }
|
||||
public Dictionary<string, uint>? ContrabandInventory { get; private set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.VendingMachines;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedVendingMachineSystem))]
|
||||
public sealed class VendingMachineRestockComponent : Component
|
||||
public sealed partial class VendingMachineRestockComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The time (in seconds) that it takes to restock a machine.
|
||||
@@ -47,6 +47,6 @@ public sealed class VendingMachineRestockComponent : Component
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class RestockDoAfterEvent : SimpleDoAfterEvent
|
||||
public sealed partial class RestockDoAfterEvent : SimpleDoAfterEvent
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user