Inline TryGetComponent completely, for real
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using Content.Server.Buckle.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 BuckleComponent? buckle))
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(args.Player.Uid, out BuckleComponent? buckle))
|
||||
{
|
||||
buckle.TryUnbuckle(args.Player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user