mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Revert "Add ICloneable support to ComponentNetworkGenerator (#5656)"
This reverts commit e14537074e.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user