From 9b3e0ad045b42090b63e3d3dd4d98bfb60810782 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Thu, 20 Feb 2025 14:19:50 +1100 Subject: [PATCH] Revert "Add ICloneable support to ComponentNetworkGenerator (#5656)" This reverts commit e14537074e9d50196bd4ddc5c312887d3da0450c. --- .../ComponentNetworkGenerator.cs | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/Robust.Shared.CompNetworkGenerator/ComponentNetworkGenerator.cs b/Robust.Shared.CompNetworkGenerator/ComponentNetworkGenerator.cs index 27862aaf0..b19ab4a25 100644 --- a/Robust.Shared.CompNetworkGenerator/ComponentNetworkGenerator.cs +++ b/Robust.Shared.CompNetworkGenerator/ComponentNetworkGenerator.cs @@ -746,17 +746,7 @@ public partial class {componentName}{deltaInterface} private static bool IsCloneType(ITypeSymbol type) { - if (type is not INamedTypeSymbol named) - { - return false; - } - - if (ImplementsInterface(named, nameof(ICloneable))) - { - return true; - } - - if (!named.IsGenericType) + if (type is not INamedTypeSymbol named || !named.IsGenericType) { return false; } @@ -768,18 +758,5 @@ public partial class {componentName}{deltaInterface} _ => false }; } - - private static bool ImplementsInterface(ITypeSymbol type, string interfaceName) - { - foreach (var interfaceType in type.AllInterfaces) - { - if (interfaceType.ToDisplayString().Contains(interfaceName)) - { - return true; - } - } - - return false; - } } }