edit RE test to use packs
move RE test stuff into research test
This commit is contained in:
parent
099dd285fb
commit
bf07ed78c7
|
|
@ -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<ReverseEngineeringComponent>(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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<IPrototypeManager>();
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
var lathes = new List<LatheComponent>();
|
||||
var reverseEngineered = new HashSet<string>();
|
||||
foreach (var proto in protoManager.EnumeratePrototypes<EntityPrototype>())
|
||||
{
|
||||
if (proto.Abstract)
|
||||
continue;
|
||||
|
||||
if (pair.IsTestPrototype(proto))
|
||||
continue;
|
||||
|
||||
if (proto.TryGetComponent<LatheComponent>(out var lathe))
|
||||
lathes.Add(lathe);
|
||||
|
||||
if (!proto.TryGetComponent<ReverseEngineeringComponent>(out var rev))
|
||||
continue;
|
||||
|
||||
foreach (var recipe in rev.Recipes)
|
||||
{
|
||||
reverseEngineered.Add(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
var latheRecipes = new HashSet<string>();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue