Content arch (#20107)

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
This commit is contained in:
metalgearsloth
2023-11-23 14:34:37 +11:00
committed by GitHub
parent 7d2e8c7087
commit 93bd9972f1
33 changed files with 331 additions and 109 deletions

View File

@@ -162,7 +162,7 @@ public sealed class PrototypeSaveTest
}
// An entity may also remove components on init -> check no components are missing.
foreach (var (compType, comp) in prototype.Components)
foreach (var compType in prototype.Components.Keys)
{
Assert.That(compNames, Does.Contain(compType), $"Prototype {prototype.ID} removes component {compType} on spawn.");
}
@@ -208,7 +208,7 @@ public sealed class PrototypeSaveTest
Assert.Fail($"Uninitialized entities should not be saving entity Uids. Component: {WritingComponent}. Prototype: {Prototype.ID}");
}
return new ValueDataNode(value.ToString());
return new ValueDataNode(value.Id.ToString());
}
EntityUid ITypeReader<EntityUid, ValueDataNode>.Read(ISerializationManager serializationManager,
@@ -217,7 +217,7 @@ public sealed class PrototypeSaveTest
SerializationHookContext hookCtx,
ISerializationContext? context, ISerializationManager.InstantiationDelegate<EntityUid>? instanceProvider)
{
return EntityUid.Parse(node.Value);
return EntityUid.Parse(node.Value, "0");
}
}
}