kill machine parts + migrate machine part spawners to salvage loot spawner (#23752)

* kill machine parts

* guidebook and artifact effect

* worst test ive ever seen in my life

* nuke test
This commit is contained in:
Emisse
2024-01-08 16:24:36 -07:00
committed by GitHub
parent e0e4d769ae
commit df1d8c36e5
10 changed files with 36 additions and 406 deletions

View File

@@ -56,34 +56,5 @@ public sealed class MachineConstruction : InteractionTest
await Interact(Bin1, Bin1, Bin1, Manipulator1, Glass, Screw);
AssertPrototype("Autolathe");
}
[Test]
public async Task UpgradeLathe()
{
// Partially deconstruct a protolathe.
await SpawnTarget(Protolathe);
var serverTarget = SEntMan.GetEntity(Target!.Value);
// Initially has all quality-1 parts.
foreach (var part in SConstruction.GetAllParts(serverTarget))
{
Assert.That(part.Rating, Is.EqualTo(1));
}
// Partially deconstruct lathe
await Interact(Screw, Pry, Pry);
AssertPrototype(MachineFrame);
// Reconstruct with better parts.
await Interact(ProtolatheBoard, Bin4, Bin4, Manipulator4, Manipulator4, Beaker, Beaker);
await Interact(Screw);
AssertPrototype(Protolathe);
// Query now returns higher quality parts.
foreach (var part in SConstruction.GetAllParts(SEntMan.GetEntity(Target!.Value)))
{
Assert.That(part.Rating, Is.EqualTo(4));
}
}
}

View File

@@ -1,4 +1,3 @@
namespace Content.IntegrationTests.Tests.Interaction;
// This partial class contains various constant prototype IDs common to interaction tests.
@@ -28,12 +27,8 @@ public abstract partial class InteractionTest
// Parts
protected const string Bin1 = "MatterBinStockPart";
protected const string Bin4 = "BluespaceMatterBinStockPart";
protected const string Cap1 = "CapacitorStockPart";
protected const string Cap4 = "QuadraticCapacitorStockPart";
protected const string Manipulator1 = "MicroManipulatorStockPart";
protected const string Manipulator4 = "FemtoManipulatorStockPart";
protected const string Battery1 = "PowerCellSmall";
protected const string Battery4 = "PowerCellHyper";
}