Inline TryGetComponent completely
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Collections.Generic;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
@@ -31,9 +32,9 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
if (!args.CanAccess || !args.CanInteract || !component.CanChangeTransferAmount)
|
||||
return;
|
||||
|
||||
if (!args.User.TryGetComponent<ActorComponent>(out var actor))
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<ActorComponent?>(args.User.Uid, out var actor))
|
||||
return;
|
||||
|
||||
|
||||
// Custom transfer verb
|
||||
Verb custom = new();
|
||||
custom.Text = Loc.GetString("comp-solution-transfer-verb-custom-amount");
|
||||
@@ -61,7 +62,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
// we want to sort by size, not alphabetically by the verb text.
|
||||
verb.Priority = priority;
|
||||
priority--;
|
||||
|
||||
|
||||
args.Verbs.Add(verb);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user