diff --git a/Content.IntegrationTests/Tests/Solutions/ReagentDispenserTest.cs b/Content.IntegrationTests/Tests/Solutions/ReagentDispenserTest.cs deleted file mode 100644 index f54d4f5799..0000000000 --- a/Content.IntegrationTests/Tests/Solutions/ReagentDispenserTest.cs +++ /dev/null @@ -1,32 +0,0 @@ -#nullable enable -using System.Threading.Tasks; -using Content.Shared.Chemistry.Dispenser; -using Content.Shared.Chemistry.Reagent; -using NUnit.Framework; -using Robust.Shared.Prototypes; - -namespace Content.IntegrationTests.Tests.Solutions -{ - [TestFixture] - public sealed class ReagentDispenserTest : ContentIntegrationTest - { - [Test] - public async Task TestReagentDispenserInventory() - { - var server = StartServer(); - await server.WaitIdleAsync(); - var protoManager = server.ResolveDependency(); - - await server.WaitAssertion(() => - { - foreach (var proto in protoManager.EnumeratePrototypes()) - { - foreach (var chem in proto.Inventory) - { - Assert.That(protoManager.HasIndex(chem), $"Unable to find chem {chem} in ReagentDispenserInventory {proto.ID}"); - } - } - }); - } - } -} diff --git a/Content.IntegrationTests/Tests/StorageFillTest.cs b/Content.IntegrationTests/Tests/StorageFillTest.cs index aec54366b5..d0d22a2e57 100644 --- a/Content.IntegrationTests/Tests/StorageFillTest.cs +++ b/Content.IntegrationTests/Tests/StorageFillTest.cs @@ -24,16 +24,8 @@ namespace Content.IntegrationTests.Tests foreach (var entry in storage.Contents) { - var id = entry.PrototypeId; - - if (id == null) - { - continue; - } - - Assert.That(protoManager.HasIndex(id), $"Unable to find StorageFill prototype of {id} in prototype {proto.ID}"); - Assert.That(entry.Amount > 0, $"Specified invalid amount of {entry.Amount} for prototype {proto.ID}"); - Assert.That(entry.SpawnProbability > 0, $"Specified invalid probability of {entry.SpawnProbability} for prototype {proto.ID}"); + Assert.That(entry.Amount, Is.GreaterThan(0), $"Specified invalid amount of {entry.Amount} for prototype {proto.ID}"); + Assert.That(entry.SpawnProbability, Is.GreaterThan(0), $"Specified invalid probability of {entry.SpawnProbability} for prototype {proto.ID}"); } } }); diff --git a/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs b/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs index 16d6ae4369..c28f268202 100644 --- a/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs +++ b/Content.Shared/Chemistry/Dispenser/ReagentDispenserInventoryPrototype.cs @@ -1,22 +1,24 @@ using System; using System.Collections.Generic; +using Content.Shared.Chemistry.Reagent; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.ViewVariables; namespace Content.Shared.Chemistry.Dispenser { /// /// Is simply a list of reagents defined in yaml. This can then be set as a - /// s pack value (also in yaml), + /// s pack value (also in yaml), /// to define which reagents it's able to dispense. Based off of how vending /// machines define their inventory. /// [Serializable, NetSerializable, Prototype("reagentDispenserInventory")] public class ReagentDispenserInventoryPrototype : IPrototype { - [DataField("inventory")] + [DataField("inventory", customTypeSerializer: typeof(PrototypeIdListSerializer))] private List _inventory = new(); [ViewVariables]