Prevent Glass duplication in lathes (#9954)
* lathes have been handled ;) * Update LatheSystem.cs
This commit is contained in:
@@ -122,6 +122,10 @@ namespace Content.Server.Lathe
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnInteractUsing(EntityUid uid, LatheComponent component, InteractUsingEvent args)
|
private void OnInteractUsing(EntityUid uid, LatheComponent component, InteractUsingEvent args)
|
||||||
{
|
{
|
||||||
|
if (args.Handled)
|
||||||
|
return;
|
||||||
|
args.Handled = true;
|
||||||
|
|
||||||
if (!TryComp<MaterialStorageComponent>(uid, out var storage)
|
if (!TryComp<MaterialStorageComponent>(uid, out var storage)
|
||||||
|| !TryComp<MaterialComponent>(args.Used, out var material)
|
|| !TryComp<MaterialComponent>(args.Used, out var material)
|
||||||
|| component.LatheWhitelist?.IsValid(args.Used) == false)
|
|| component.LatheWhitelist?.IsValid(args.Used) == false)
|
||||||
|
|||||||
Reference in New Issue
Block a user