Power-reading multitool (#5046)
* AMEPartComponent: Switch to ToolSystem.HasQuality because this bugs me. * Multitool can read power when you examine a cable with the multitool held. * Multitool power reading: Condense storage information * power-sensing multitool: Fix ToolSystem ref. * Power-reading multitools: Fix misuse of GetComponent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Hands.Components;
|
||||
using Content.Server.Tools.Components;
|
||||
using Content.Server.Tools;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Sound;
|
||||
@@ -42,7 +42,7 @@ namespace Content.Server.AME.Components
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!args.Using.TryGetComponent<ToolComponent>(out var tool) || !tool.Qualities.Contains(_qualityNeeded))
|
||||
if (!EntitySystem.Get<ToolSystem>().HasQuality(args.Using.Uid, _qualityNeeded))
|
||||
return false;
|
||||
|
||||
if (!_mapManager.TryGetGrid(args.ClickLocation.GetGridId(_serverEntityManager), out var mapGrid))
|
||||
|
||||
Reference in New Issue
Block a user