Anchorable checks for ToolComponent in Valid method.
This commit is contained in:
@@ -47,6 +47,9 @@ namespace Content.Server.Construction.Components
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!utilizing.TryGetComponent(out ToolComponent? tool))
|
||||||
|
return false;
|
||||||
|
|
||||||
BaseAnchoredAttemptEvent attempt =
|
BaseAnchoredAttemptEvent attempt =
|
||||||
anchoring ? new AnchorAttemptEvent(user, utilizing) : new UnanchorAttemptEvent(user, utilizing);
|
anchoring ? new AnchorAttemptEvent(user, utilizing) : new UnanchorAttemptEvent(user, utilizing);
|
||||||
|
|
||||||
@@ -59,7 +62,7 @@ namespace Content.Server.Construction.Components
|
|||||||
if (attempt.Cancelled)
|
if (attempt.Cancelled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return await EntitySystem.Get<ToolSystem>().UseTool(utilizing.Uid, user.Uid, Owner.Uid, 0f, 0.5f + attempt.Delay, Tool);
|
return await EntitySystem.Get<ToolSystem>().UseTool(utilizing.Uid, user.Uid, Owner.Uid, 0f, 0.5f + attempt.Delay, Tool, toolComponent:tool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user