diff --git a/Content.IntegrationTests/Tests/VendingMachineTest.cs b/Content.IntegrationTests/Tests/VendingMachineTest.cs deleted file mode 100644 index 3d3b263305..0000000000 --- a/Content.IntegrationTests/Tests/VendingMachineTest.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Threading.Tasks; -using Content.Shared.VendingMachines; -using NUnit.Framework; -using Robust.Shared.IoC; -using Robust.Shared.Prototypes; - -namespace Content.IntegrationTests.Tests -{ - [TestFixture] - [TestOf(typeof(VendingMachineInventoryPrototype))] - public sealed class VendingMachineTest - { - [Test] - public async Task Test() - { - await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true}); - var server = pairTracker.Pair.Server; - - await server.WaitAssertion(() => - { - var prototypeManager = IoCManager.Resolve(); - foreach (var vendorProto in prototypeManager.EnumeratePrototypes()) - { - foreach (var (item, _) in vendorProto.StartingInventory) - { - try - { - prototypeManager.Index(item); - } - catch (UnknownPrototypeException) - { - throw new UnknownPrototypeException($"Unknown prototype {item} on vending inventory {vendorProto.ID}"); - } - } - } - }); - - await pairTracker.CleanReturnAsync(); - } - } -} diff --git a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs index 790f365cc5..2945374f87 100644 --- a/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs +++ b/Content.Shared/VendingMachines/VendingMachineInventoryPrototype.cs @@ -1,5 +1,6 @@ using Robust.Shared.Prototypes; using Robust.Shared.Serialization; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.VendingMachines { @@ -10,13 +11,13 @@ namespace Content.Shared.VendingMachines [IdDataField] public string ID { get; } = default!; - [DataField("startingInventory")] + [DataField("startingInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] public Dictionary StartingInventory { get; } = new(); - [DataField("emaggedInventory")] + [DataField("emaggedInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] public Dictionary? EmaggedInventory { get; } - [DataField("contrabandInventory")] + [DataField("contrabandInventory", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] public Dictionary? ContrabandInventory { get; } } }