Content update for NetEntities (#18935)
This commit is contained in:
@@ -25,7 +25,7 @@ public partial class ArtifactSystem
|
||||
if (args.Length != 2)
|
||||
shell.WriteError("Argument length must be 2");
|
||||
|
||||
if (!EntityUid.TryParse(args[0], out var uid) || ! int.TryParse(args[1], out var id))
|
||||
if (!NetEntity.TryParse(args[0], out var uidNet) || !TryGetEntity(uidNet, out var uid) || !int.TryParse(args[1], out var id))
|
||||
return;
|
||||
|
||||
if (!TryComp<ArtifactComponent>(uid, out var artifact))
|
||||
@@ -33,13 +33,13 @@ public partial class ArtifactSystem
|
||||
|
||||
if (artifact.NodeTree.FirstOrDefault(n => n.Id == id) is { } node)
|
||||
{
|
||||
EnterNode(uid, ref node);
|
||||
EnterNode(uid.Value, ref node);
|
||||
}
|
||||
}
|
||||
|
||||
private CompletionResult ForceArtifactNodeCompletions(IConsoleShell shell, string[] args)
|
||||
{
|
||||
if (args.Length == 2 && EntityUid.TryParse(args[0], out var uid))
|
||||
if (args.Length == 2 && NetEntity.TryParse(args[0], out var uidNet) && TryGetEntity(uidNet, out var uid))
|
||||
{
|
||||
if (TryComp<ArtifactComponent>(uid, out var artifact))
|
||||
{
|
||||
@@ -56,13 +56,13 @@ public partial class ArtifactSystem
|
||||
if (args.Length != 1)
|
||||
shell.WriteError("Argument length must be 1");
|
||||
|
||||
if (!EntityUid.TryParse(args[0], out var uid))
|
||||
if (!NetEntity.TryParse(args[0], out var uidNet) || !TryGetEntity(uidNet, out var uid))
|
||||
return;
|
||||
|
||||
if (!TryComp<ArtifactComponent>(uid, out var artifact))
|
||||
return;
|
||||
|
||||
var pointSum = GetResearchPointValue(uid, artifact, true);
|
||||
shell.WriteLine($"Max point value for {ToPrettyString(uid)} with {artifact.NodeTree.Count} nodes: {pointSum}");
|
||||
var pointSum = GetResearchPointValue(uid.Value, artifact, true);
|
||||
shell.WriteLine($"Max point value for {ToPrettyString(uid.Value)} with {artifact.NodeTree.Count} nodes: {pointSum}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user