Fixes the ability to unweld inside containers (#1360)
This commit is contained in:
@@ -357,12 +357,19 @@ namespace Content.Server.GameObjects.Components
|
|||||||
if (!CanWeldShut)
|
if (!CanWeldShut)
|
||||||
return false;
|
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))
|
if (!eventArgs.Using.TryGetComponent(out WelderComponent tool))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Welding, 1f))
|
if (!tool.UseTool(eventArgs.User, Owner, ToolQuality.Welding, 1f))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
IsWeldedShut ^= true;
|
IsWeldedShut ^= true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user