Fixes the ability to unweld inside containers (#1360)

This commit is contained in:
Alex S
2020-07-19 16:32:04 -04:00
committed by GitHub
parent cbad5edca4
commit 2c0abe3f70

View File

@@ -357,12 +357,19 @@ namespace Content.Server.GameObjects.Components
if (!CanWeldShut)
return false;
if (_contents.Contains(eventArgs.User))
{
Owner.PopupMessage(eventArgs.User, Loc.GetString("It's too Cramped!"));
return false;
}
if (!eventArgs.Using.TryGetComponent(out WelderComponent tool))
return false;
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Welding, 1f))
return false;
IsWeldedShut ^= true;
return true;
}