From df395b943547ccddcef189457c4517b9cccc5efb Mon Sep 17 00:00:00 2001 From: bhespiritu Date: Wed, 8 Jul 2020 05:46:54 -0400 Subject: [PATCH] Fixed Welding Tool Not Updating (#1314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Welding Tool Not Updating - Added in the ISolutionChange interface so that it dirties the entity any time the amount of welding fuel changes. This applies whether it's lit or unlit. - I also removed some redundant code. * Update Content.Server/GameObjects/Components/Interactable/WelderComponent.cs Co-authored-by: VĂ­ctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> --- .../Components/Interactable/WelderComponent.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs index bf55f988fa..8be75e5e18 100644 --- a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs @@ -24,7 +24,7 @@ namespace Content.Server.GameObjects.Components.Interactable [RegisterComponent] [ComponentReference(typeof(ToolComponent))] [ComponentReference(typeof(IToolComponent))] - public class WelderComponent : ToolComponent, IExamine, IUse, ISuicideAct + public class WelderComponent : ToolComponent, IExamine, IUse, ISuicideAct, ISolutionChange { #pragma warning disable 649 [Dependency] private IEntitySystemManager _entitySystemManager; @@ -193,7 +193,6 @@ namespace Content.Server.GameObjects.Components.Interactable if (Fuel == 0) ToggleWelderStatus(); - Dirty(); } public SuicideKind Suicide(IEntity victim, IChatManager chat) @@ -207,5 +206,10 @@ namespace Content.Server.GameObjects.Components.Interactable chat.EntityMe(victim, Loc.GetString("bashes {0:themselves} with the {1}!", victim, Owner.Name)); return SuicideKind.Brute; } + + public void SolutionChanged(SolutionChangeEventArgs eventArgs) + { + Dirty(); + } } }