diff --git a/Content.IntegrationTests/Tests/VendingMachineTest.cs b/Content.IntegrationTests/Tests/VendingMachineTest.cs new file mode 100644 index 0000000000..52c130610a --- /dev/null +++ b/Content.IntegrationTests/Tests/VendingMachineTest.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using Content.Shared.VendingMachines; +using NUnit.Framework; +using Robust.Shared.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Prototypes; + +namespace Content.IntegrationTests.Tests +{ + [TestFixture] + [TestOf(typeof(VendingMachineInventoryPrototype))] + public sealed class VendingMachineTest : ContentIntegrationTest + { + [Test] + public async Task Test() + { + var server = StartServerDummyTicker(); + + server.Assert(() => + { + 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.Name}"); + } + } + } + }); + + await server.WaitIdleAsync(); + } + } +} \ No newline at end of file diff --git a/Resources/Prototypes/VendingMachines/ammo.yml b/Resources/Prototypes/VendingMachines/ammo.yml index df8605b91a..adfeabab65 100644 --- a/Resources/Prototypes/VendingMachines/ammo.yml +++ b/Resources/Prototypes/VendingMachines/ammo.yml @@ -4,53 +4,31 @@ description: A generic ammunition vending machine. spriteName: ammo startingInventory: - box_32: 3 - box_32f: 3 - box_32hv: 3 - box_32p: 3 - box_32r: 3 + BoxClRifleBox: 3 + BoxClRifleBoxFlash: 3 + BoxClRifleBoxHV: 3 + BoxClRifleBoxPractice: 3 + BoxClRifleBoxRubber: 3 - box_357: 3 - box_357f: 3 - box_357hv: 3 - box_357p: 3 - box_357r: 3 + BoxLRifleBigBox: 3 + BoxLRifleBoxHV: 3 + BoxLRifleBoxPractice: 3 + BoxLRifleBoxRubber: 3 - box_44: 3 - box_44f: 3 - box_44hv: 3 - box_44p: 3 - box_44r: 3 + BoxMagnum: 3 + BoxMagnumFlash: 3 + BoxMagnumHV: 3 + BoxMagnumPractice: 3 + BoxMagnumRubber: 3 - box_45: 3 - box_45f: 3 - box_45p: 3 - box_45r: 3 - - box_50: 3 - box_50f: 3 - box_50p: 3 - box_50r: 3 - - box_10mm: 3 - box_10mmf: 3 - box_10mmhv: 3 - box_10mmp: 3 - box_10mmr: 3 - - box_24mm: 3 - - box_556mm: 3 - box_556mmp: 3 - - box_65mm: 3 - box_65mmr: 3 - - box_762mm: 3 - - box_9mm: 3 - box_9mmf: 3 - box_9mmhv: 3 - box_9mmp: 3 - box_9mmr: 3 + BoxPistolBox: 3 + BoxPistolBoxFlash: 3 + BoxPistolBoxHV: 3 + BoxPistolBoxPractice: 3 + BoxPistolBoxRubber: 3 + BoxSRifleBox: 3 + BoxSRifleBoxFlash: 3 + BoxSRifleBoxHV: 3 + BoxSRifleBoxPractice: 3 + BoxSRifleBoxRubber: 3 diff --git a/Resources/Prototypes/VendingMachines/cola.yml b/Resources/Prototypes/VendingMachines/cola.yml index 4c8232573d..ac7c298083 100644 --- a/Resources/Prototypes/VendingMachines/cola.yml +++ b/Resources/Prototypes/VendingMachines/cola.yml @@ -8,7 +8,7 @@ DrinkColaCan: 10 DrinkIceTeaCan: 10 DrinkLemonLimeCan: 10 - DrinkPurpleCan: 10 + DrinkGrapeCan: 10 DrinkSpaceMountainWindCan: 10 DrinkSpaceUpCan: 10 DrinkStarkistCan: 10