diff --git a/Content.IntegrationTests/Tests/ResearchTest.cs b/Content.IntegrationTests/Tests/ResearchTest.cs new file mode 100644 index 0000000000..7462af4daa --- /dev/null +++ b/Content.IntegrationTests/Tests/ResearchTest.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Content.Shared.Lathe; +using Content.Shared.Research.Prototypes; +using NUnit.Framework; +using Robust.Shared.Prototypes; + +namespace Content.IntegrationTests.Tests; + +[TestFixture] +public sealed class ResearchTest +{ + [Test] + public async Task AllTechPrintableTest() + { + await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings {NoClient = true}); + var server = pairTracker.Pair.Server; + + var protoManager = server.ResolveDependency(); + + await server.WaitAssertion(() => + { + var allEnts = protoManager.EnumeratePrototypes(); + var allLathes = new HashSet(); + foreach (var proto in allEnts) + { + if (proto.Abstract) + continue; + + if (!proto.TryGetComponent(out var lathe)) + continue; + allLathes.Add(lathe); + } + + var latheTechs = new HashSet(); + foreach (var lathe in allLathes) + { + if (lathe.DynamicRecipes == null) + continue; + + foreach (var recipe in lathe.DynamicRecipes) + { + if (!latheTechs.Contains(recipe)) + latheTechs.Add(recipe); + } + } + + foreach (var tech in protoManager.EnumeratePrototypes()) + { + foreach (var recipe in tech.UnlockedRecipes) + { + Assert.That(latheTechs, Does.Contain(recipe), $"Recipe \"{recipe}\" cannot be unlocked on any lathes."); + } + } + }); + + await pairTracker.CleanReturnAsync(); + } +} diff --git a/Resources/Locale/en-US/prototypes/catalog/research/technologies.ftl b/Resources/Locale/en-US/prototypes/catalog/research/technologies.ftl index aca0ea08ad..dbe34733b5 100644 --- a/Resources/Locale/en-US/prototypes/catalog/research/technologies.ftl +++ b/Resources/Locale/en-US/prototypes/catalog/research/technologies.ftl @@ -38,7 +38,7 @@ technologies-industrial-engineering = Industrial engineering technologies-industrial-engineering-description = A refresher course on modern engineering technology. technologies-rapid-upgrade = Rapid upgrade -technologies-rapid-upgrade-description = The ability to quickly upgrade the station like never before. +technologies-rapid-upgrade-description = The ability to quickly improve the station like never before. technologies-material-sheet-printing = Material sheet printing technologies-material-sheet-printing-description = Print those sheets! diff --git a/Resources/Prototypes/Catalog/Research/technologies.yml b/Resources/Prototypes/Catalog/Research/technologies.yml index f6c1c3b0e3..ebdbf76959 100644 --- a/Resources/Prototypes/Catalog/Research/technologies.yml +++ b/Resources/Prototypes/Catalog/Research/technologies.yml @@ -357,8 +357,6 @@ - ElectromagneticTheory - IndustrialEngineering unlockedRecipes: - - RCD - - RCDAmmo - PowerDrill - SMESMachineCircuitboard - PowerComputerCircuitboard @@ -390,10 +388,12 @@ icon: sprite: Objects/Specific/Research/rped.rsi state: icon - requiredPoints: 7500 + requiredPoints: 10000 requiredTechnologies: - ElectricalEngineering unlockedRecipes: + - RCD + - RCDAmmo - RPED - type: technology diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index 46e62deac9..5c23fdcbab 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -267,6 +267,14 @@ - type: StaticPrice price: 100 +- type: entity + id: RCDEmpty + parent: RCD + suffix: Empty + components: + - type: RCD + ammo: 0 + - type: entity name: RCD Ammo parent: BaseItem diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 464e9a83f8..73632991c4 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -171,6 +171,7 @@ - MiningDrill - ConveyorBeltAssembly - AppraisalTool + - RCD - RCDAmmo - HydroponicsToolScythe - HydroponicsToolHatchet diff --git a/Resources/Prototypes/Recipes/Lathes/tools.yml b/Resources/Prototypes/Recipes/Lathes/tools.yml index edd007dc6e..e701ade164 100644 --- a/Resources/Prototypes/Recipes/Lathes/tools.yml +++ b/Resources/Prototypes/Recipes/Lathes/tools.yml @@ -115,7 +115,7 @@ icon: sprite: Objects/Tools/rcd.rsi state: icon - result: RCD + result: RCDEmpty completetime: 4 materials: Steel: 1000