ToolSystem UseTool doesn't log missing components, slight cleanup for things using tools.

This commit is contained in:
Vera Aguilera Puerto
2021-10-07 23:08:16 +02:00
parent 6b73b89617
commit 0b57420d6e
4 changed files with 3 additions and 9 deletions

View File

@@ -39,7 +39,8 @@ namespace Content.Server.Tools
float doAfterDelay, IEnumerable<string> toolQualitiesNeeded, Func<bool>? doAfterCheck = null,
ToolComponent? toolComponent = null)
{
if (!Resolve(tool, ref toolComponent))
// No logging here, after all that'd mean the caller would need to check if the component is there or not.
if (!Resolve(tool, ref toolComponent, false))
return false;
if (!toolComponent.Qualities.ContainsAll(toolQualitiesNeeded) || !_actionBlockerSystem.CanInteract(user))