Prevent Glass duplication in lathes (#9954)

* lathes have been handled ;)

* Update LatheSystem.cs
This commit is contained in:
Nemanja
2022-07-24 07:37:29 -04:00
committed by GitHub
parent 1013ba7dfc
commit 54fcdb70f0

View File

@@ -122,6 +122,10 @@ namespace Content.Server.Lathe
/// </summary>
private void OnInteractUsing(EntityUid uid, LatheComponent component, InteractUsingEvent args)
{
if (args.Handled)
return;
args.Handled = true;
if (!TryComp<MaterialStorageComponent>(uid, out var storage)
|| !TryComp<MaterialComponent>(args.Used, out var material)
|| component.LatheWhitelist?.IsValid(args.Used) == false)