From bf07ed78c764226c1f31e709e95a356fc27b7a22 Mon Sep 17 00:00:00 2001 From: deltanedas <@deltanedas:kde.org> Date: Mon, 10 Feb 2025 16:13:27 +0000 Subject: [PATCH] edit RE test to use packs move RE test stuff into research test --- .../Tests/ResearchTest.cs | 18 +++++ .../Tests/_DV/ReverseEngineeringTest.cs | 66 ------------------- .../en-US/_DV/research/technologies.ftl | 9 ++- .../Locale/en-US/research/technologies.ftl | 2 +- .../VendingMachines/Inventories/ammo.yml | 9 ++- .../Catalog/Fills/Boxes/ammunition.yml | 13 ---- .../Markers/Spawners/Random/boxes.yml | 4 +- .../Weapons/Guns/Ammunition/Boxes/shotgun.yml | 8 +++ 8 files changed, 40 insertions(+), 89 deletions(-) delete mode 100644 Content.IntegrationTests/Tests/_DV/ReverseEngineeringTest.cs create mode 100644 Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Ammunition/Boxes/shotgun.yml diff --git a/Content.IntegrationTests/Tests/ResearchTest.cs b/Content.IntegrationTests/Tests/ResearchTest.cs index 4661a1ea9e..80d09517fb 100644 --- a/Content.IntegrationTests/Tests/ResearchTest.cs +++ b/Content.IntegrationTests/Tests/ResearchTest.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Content.Shared.Lathe; using Content.Shared.Research.Prototypes; +using Content.Shared.ReverseEngineering; // DeltaV using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; @@ -92,6 +93,23 @@ public sealed class ResearchTest } } + // Begin DeltaV Additions: Check RE recipes too + foreach (var proto in allEnts) + { + if (proto.Abstract) + continue; + + if (!proto.TryGetComponent(out var rev)) + continue; + + foreach (var recipe in rev.Recipes) + { + unlockedTechs.Add(recipe); + Assert.That(latheTechs, Does.Contain(recipe), $"Reverse engineered recipe \"{recipe}\" cannot be unlocked on any lathe."); + } + } + // End DeltaV Additions + // now check that every dynamic recipe a lathe lists can be unlocked foreach (var recipe in latheTechs) { diff --git a/Content.IntegrationTests/Tests/_DV/ReverseEngineeringTest.cs b/Content.IntegrationTests/Tests/_DV/ReverseEngineeringTest.cs deleted file mode 100644 index dd189d16b0..0000000000 --- a/Content.IntegrationTests/Tests/_DV/ReverseEngineeringTest.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Collections.Generic; -using Content.Shared.Lathe; -using Content.Shared.ReverseEngineering; -using Robust.Shared.Prototypes; - -namespace Content.IntegrationTests.Tests._DV; - -[TestFixture] -public sealed class ReverseEngineeringTest -{ - [Test] - public async Task AllReverseEngineeredPrintableTest() - { - await using var pair = await PoolManager.GetServerClient(); - var server = pair.Server; - - var protoManager = server.ResolveDependency(); - - await server.WaitAssertion(() => - { - var lathes = new List(); - var reverseEngineered = new HashSet(); - foreach (var proto in protoManager.EnumeratePrototypes()) - { - if (proto.Abstract) - continue; - - if (pair.IsTestPrototype(proto)) - continue; - - if (proto.TryGetComponent(out var lathe)) - lathes.Add(lathe); - - if (!proto.TryGetComponent(out var rev)) - continue; - - foreach (var recipe in rev.Recipes) - { - reverseEngineered.Add(recipe); - } - } - - var latheRecipes = new HashSet(); - foreach (var lathe in lathes) - { - if (lathe.DynamicRecipes == null) - continue; - - foreach (var recipe in lathe.DynamicRecipes) - { - latheRecipes.Add(recipe); - } - } - - Assert.Multiple(() => - { - foreach (var recipe in reverseEngineered) - { - Assert.That(latheRecipes, Does.Contain(recipe), $"Reverse engineered recipe \"{recipe}\" cannot be unlocked on any lathe."); - } - }); - }); - - await pair.CleanReturnAsync(); - } -} diff --git a/Resources/Locale/en-US/_DV/research/technologies.ftl b/Resources/Locale/en-US/_DV/research/technologies.ftl index aa0e121ef5..ee2fe5d234 100644 --- a/Resources/Locale/en-US/_DV/research/technologies.ftl +++ b/Resources/Locale/en-US/_DV/research/technologies.ftl @@ -1,9 +1,14 @@ +# Industrial research-technology-aerial-extraction = Aerial Extraction +# Civilian +research-technology-syringe-gun = Syringe Gun + +# Arsenal research-technology-exotic-ammunition = Exotic Ammunition research-technology-energy-gun = Energy Guns research-technology-energy-gun-advance = Advanced Energy Manipulation +research-technology-experimental-salvage-weaponry = Experimental Salvage Weaponry research-technology-advance-laser = Advanced Laser Manipulation -research-technology-robust-melee = Robust Melee -research-technology-syringe-gun = Syringe Gun research-technology-ionized-cryogenic-emission-equipment = Ionized Cryogenic Emission Equipment +research-technology-robust-melee = Robust Melee diff --git a/Resources/Locale/en-US/research/technologies.ftl b/Resources/Locale/en-US/research/technologies.ftl index 91a803da6e..0b0970ec08 100644 --- a/Resources/Locale/en-US/research/technologies.ftl +++ b/Resources/Locale/en-US/research/technologies.ftl @@ -22,6 +22,7 @@ research-technology-portable-fission = Portable Fission research-technology-space-scanning = Space Scanning research-technology-excavation = Mass Excavation +research-technology-salvage-weapons = Salvage Weapons research-technology-draconic-munitions = Draconic Munitions research-technology-uranium-munitions = Uranium Munitions research-technology-explosive-technology = Explosive Technology @@ -31,7 +32,6 @@ research-technology-nonlethal-ammunition = Nonlethal Ammunition research-technology-practice-ammunition = Practice Ammunition research-technology-concentrated-laser-weaponry = Concentrated Laser Weaponry research-technology-wave-particle-harnessing = Wave Particle Harnessing -research-technology-experimental-salvage-weaponry = Experimental Salvage Weaponry research-technology-advanced-riot-control = Advanced Riot Control research-technology-portable-microfusion-weaponry = Portable Microfusion Weaponry research-technology-experimental-battery-ammo = Experimental Battery Ammo diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/ammo.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/ammo.yml index 4080dbaead..065474e813 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/ammo.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/ammo.yml @@ -3,15 +3,14 @@ startingInventory: MagazineBoxCaselessRifle: 3 MagazineBoxCaselessRiflePractice: 3 - MagazineBoxCaselessRifleRubber: 3 MagazineBoxLightRifleBig: 3 MagazineBoxLightRiflePractice: 3 - MagazineBoxLightRifleRubber: 3 + MagazineBoxLightRifleRubber: 3 # DeltaV MagazineBoxMagnum: 3 MagazineBoxMagnumPractice: 3 - MagazineBoxMagnumRubber: 3 + MagazineBoxMagnumRubber: 3 # DeltaV # DeltaV - .38 special ammo - Add various .38 special ammo to ammovend MagazineBoxSpecial: 3 @@ -21,8 +20,8 @@ MagazineBoxPistol: 3 MagazineBoxPistolPractice: 3 - MagazineBoxPistolRubber: 3 + MagazineBoxPistolRubber: 3 # DeltaV MagazineBoxRifle: 3 MagazineBoxRiflePractice: 3 - MagazineBoxRifleRubber: 3 + MagazineBoxRifleRubber: 3 # DeltaV diff --git a/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/ammunition.yml b/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/ammunition.yml index ceb1f1b152..6d17dcd683 100644 --- a/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/ammunition.yml +++ b/Resources/Prototypes/Nyanotrasen/Catalog/Fills/Boxes/ammunition.yml @@ -1,16 +1,3 @@ -- type: entity - name: box of soulbreaker cartridges - parent: BaseAmmoProvider - id: BoxShellSoulbreaker - description: A box full of anti-psionic soulbreaker cartridges, designed for riot shotguns. - components: - - type: BallisticAmmoProvider - proto: ShellSoulbreaker - capacity: 12 - - type: Sprite - layers: - - state: boxwide - - state: shellslug - type: entity name: box of .45 magnum Universal magazines diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/boxes.yml b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/boxes.yml index 364fae8811..ab23464fae 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/boxes.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Markers/Spawners/Random/boxes.yml @@ -23,8 +23,8 @@ - type: Sprite layers: - state: red - - sprite: Objects/Storage/boxes.rsi - state: shellslug + - sprite: Objects/Weapons/Guns/Ammunition/Boxes/shotgun.rsi + state: mag-slug-1 - type: EntityTableSpawner table: !type:NestedSelector tableId: AmmoBoxTable diff --git a/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Ammunition/Boxes/shotgun.yml b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Ammunition/Boxes/shotgun.yml new file mode 100644 index 0000000000..d535ac07eb --- /dev/null +++ b/Resources/Prototypes/_DV/Entities/Objects/Weapons/Guns/Ammunition/Boxes/shotgun.yml @@ -0,0 +1,8 @@ +- type: entity + parent: BoxShotgunSlug + id: BoxShellSoulbreaker + name: shell box (soulbreaker) + description: A box full of anti-psionic soulbreaker cartridges, designed for riot shotguns. + components: + - type: BallisticAmmoProvider + proto: ShellSoulbreaker