Serv3 rework content changes (#7145)

This commit is contained in:
Paul Ritter
2022-04-03 02:01:22 +02:00
committed by GitHub
parent 6b01ab17a6
commit 2ff40d5a1f
133 changed files with 476 additions and 324 deletions

View File

@@ -259,7 +259,7 @@ namespace Content.IntegrationTests
if (client.Options?.ExtraPrototypes is { } extra)
{
prototypes.LoadString(extra, true);
prototypes.Resync();
prototypes.ResolveResults();
}
});
@@ -306,7 +306,7 @@ namespace Content.IntegrationTests
if (server.Options?.ExtraPrototypes is { } extra)
{
prototypes.LoadString(extra, true);
prototypes.Resync();
prototypes.ResolveResults();
}
});

View File

@@ -40,6 +40,12 @@ namespace Content.IntegrationTests.Tests.Body
normalBodyTemperature: 310.15
thermalRegulationTemperatureThreshold: 25
- type: Respirator
damage:
types:
Asphyxiation: 1.5
damageRecovery:
types:
Asphyxiation: -1.5
";
[Test]

View File

@@ -21,7 +21,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
public void DeserializeNullTest()
{
var node = new ValueDataNode("null");
var unit = Serialization.ReadValue<FixedPoint2?>(node);
var unit = Serialization.Read<FixedPoint2?>(node);
Assert.That(unit, Is.Null);
}
@@ -30,7 +30,7 @@ namespace Content.IntegrationTests.Tests.Chemistry
public void DeserializeNullDefinitionTest()
{
var node = new MappingDataNode().Add("unit", "null");
var definition = Serialization.ReadValueOrThrow<FixedPoint2TestDefinition>(node);
var definition = Serialization.Read<FixedPoint2TestDefinition>(node);
Assert.That(definition.Unit, Is.Null);
}

View File

@@ -78,6 +78,9 @@ namespace Content.IntegrationTests.Tests.Disposal
id: HumanDummy
components:
- type: Body
template: HumanoidTemplate
preset: HumanPreset
centerSlot: torso
- type: MobState
- type: Damageable
damageContainer: Biological

View File

@@ -24,7 +24,7 @@ namespace Content.IntegrationTests.Tests
{
foreach (var proto in prototypeManager.EnumeratePrototypes<EntityPrototype>())
{
if (proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
if (proto.NoSpawn || proto.Abstract || !proto.Components.ContainsKey("Sprite")) continue;
Assert.DoesNotThrow(() =>
{

View File

@@ -69,7 +69,7 @@ namespace Content.IntegrationTests.Tests
//Generate list of non-abstract prototypes to test
foreach (var prototype in prototypeMan.EnumeratePrototypes<EntityPrototype>())
{
if (prototype.Abstract)
if (prototype.NoSpawn || prototype.Abstract)
{
continue;
}