From: Tayrtahn Date: Mon, 29 Jan 2024 23:04:52 +0000 (-0500) Subject: Fix welder status always being "not lit" (#24705) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=e101d078fe2aa128428de6dc67c8bb31f94dc18e;p=space-station-14.git Fix welder status always being "not lit" (#24705) * Fix not finding ItemToggleComponent * Simplified --- diff --git a/Content.Client/Tools/UI/WelderStatusControl.cs b/Content.Client/Tools/UI/WelderStatusControl.cs index f1c5999453..af81a28f62 100644 --- a/Content.Client/Tools/UI/WelderStatusControl.cs +++ b/Content.Client/Tools/UI/WelderStatusControl.cs @@ -17,11 +17,11 @@ public sealed class WelderStatusControl : Control private readonly ItemToggleComponent? _toggleComponent; private readonly RichTextLabel _label; - public WelderStatusControl(WelderComponent parent, EntityUid? uid = null) + public WelderStatusControl(Entity parent) { _parent = parent; _entMan = IoCManager.Resolve(); - if (_entMan.TryGetComponent(uid, out var itemToggle)) + if (_entMan.TryGetComponent(parent, out var itemToggle)) _toggleComponent = itemToggle; _label = new RichTextLabel { StyleClasses = { StyleNano.StyleClassItemStatus } }; AddChild(_label);