Files
RobustToolbox/Robust.Shared/ContentPack/ModLoaderExt.cs
Pieter-Jan Briers a41f64f30e sandboxing (#1408)
2020-11-26 23:37:31 +01:00

20 lines
567 B
C#

using System;
namespace Robust.Shared.ContentPack
{
public static class ModLoaderExt
{
public static bool IsContentType(this IModLoader modLoader, Type type)
{
// It should be noted that this method is circumventable IF content could inherit Type.
// it cannot, luckily.
return modLoader.IsContentAssembly(type.Assembly);
}
public static bool IsContentTypeAccessAllowed(this IModLoader modLoader, Type type)
{
return modLoader.IsContentType(type);
}
}
}