Fix AnchorableSystem resolve warnings

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 11:49:31 +01:00
parent 36e1d0707a
commit 222541f1a2

View File

@@ -26,7 +26,11 @@ namespace Content.Server.Construction
private async void OnInteractUsing(EntityUid uid, AnchorableComponent anchorable, InteractUsingEvent args)
{
args.Handled = await TryToggleAnchor(uid, args.User.Uid, args.Used.Uid, anchorable);
// If the used entity doesn't have a tool, return early.
if (!EntityManager.TryGetComponent(args.Used.Uid, out ToolComponent? usedTool))
return;
args.Handled = await TryToggleAnchor(uid, args.User.Uid, args.Used.Uid, anchorable, usingTool:usedTool);
}
/// <summary>