Inline TryGetComponent completely
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.Cuffs.Components;
|
||||
using Content.Shared.Alert;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
@@ -14,7 +16,7 @@ namespace Content.Server.Alert.Click
|
||||
{
|
||||
public void AlertClicked(ClickAlertEventArgs args)
|
||||
{
|
||||
if (args.Player.TryGetComponent(out CuffableComponent? cuffableComponent))
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(args.Player.Uid, out CuffableComponent? cuffableComponent))
|
||||
{
|
||||
cuffableComponent.TryUncuff(args.Player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user