mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Remove obsolete usages of *Variant prototype manager functions
Replaced with *Kind
This commit is contained in:
@@ -107,7 +107,7 @@ namespace Robust.Server.ViewVariables
|
||||
|
||||
// We don't blindly send any prototypes, we ONLY send prototypes for valid, registered variants.
|
||||
if (typeof(IPrototype).IsAssignableFrom(valType)
|
||||
&& IoCManager.Resolve<IPrototypeManager>().TryGetVariantFrom(valType, out var variant))
|
||||
&& IoCManager.Resolve<IPrototypeManager>().TryGetKindFrom(valType, out var variant))
|
||||
{
|
||||
return new ViewVariablesBlobMembers.PrototypeReferenceToken()
|
||||
{
|
||||
@@ -161,7 +161,7 @@ namespace Robust.Server.ViewVariables
|
||||
{
|
||||
var protoMan = IoCManager.Resolve<IPrototypeManager>();
|
||||
|
||||
if (protoMan.TryGetVariantFrom(type, out var variant))
|
||||
if (protoMan.TryGetKindFrom(type, out var variant))
|
||||
return new ViewVariablesBlobMembers.PrototypeReferenceToken()
|
||||
{
|
||||
ID = null, Variant = variant, Stringified = PrettyPrint.PrintUserFacing(null),
|
||||
|
||||
@@ -152,7 +152,7 @@ public sealed partial class DataRecordTest : SerializationTest
|
||||
var prototypes = IoCManager.Resolve<IPrototypeManager>();
|
||||
prototypes.Initialize();
|
||||
|
||||
Assert.That(prototypes.HasVariant("emptyTestPrototypeRecord"), Is.True);
|
||||
Assert.That(prototypes.HasKind("emptyTestPrototypeRecord"), Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user