Add some more prototype serializers (#5934)
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Tabletop
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class TabletopChessSetup : TabletopSetup
|
||||
{
|
||||
[DataField("boardPrototype")]
|
||||
[DataField("boardPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ChessBoardPrototype { get; } = "ChessBoardTabletop";
|
||||
|
||||
// TODO: Un-hardcode the rest of entity prototype IDs, probably.
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Tabletop
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class TabletopParchisSetup : TabletopSetup
|
||||
{
|
||||
[DataField("boardPrototype")]
|
||||
[DataField("boardPrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string ParchisBoardPrototype { get; } = "ParchisBoardTabletop";
|
||||
|
||||
[DataField("redPiecePrototype")]
|
||||
[DataField("redPiecePrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string RedPiecePrototype { get; } = "RedTabletopPiece";
|
||||
|
||||
[DataField("greenPiecePrototype")]
|
||||
[DataField("greenPiecePrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string GreenPiecePrototype { get; } = "GreenTabletopPiece";
|
||||
|
||||
[DataField("yellowPiecePrototype")]
|
||||
[DataField("yellowPiecePrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string YellowPiecePrototype { get; } = "YellowTabletopPiece";
|
||||
|
||||
[DataField("bluePiecePrototype")]
|
||||
[DataField("bluePiecePrototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string BluePiecePrototype { get; } = "BlueTabletopPiece";
|
||||
|
||||
public override void SetupTabletop(TabletopSession session, IEntityManager entityManager)
|
||||
|
||||
Reference in New Issue
Block a user