Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions src/ParkitectNexus.Data/Assets/Modding/ModCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ namespace ParkitectNexus.Data.Assets.Modding
{
public class ModCompiler : IModCompiler
{
/// <summary>
/// Assemblies provided by the mono runtime.
/// </summary>
private static readonly string[] SystemAssemblies =
{
"System", "System.Core", "System.Data", "System.Xml",
"System.Xml.Linq", "System.Data.DataSetExtensions", "System.Net.Http"
};

/// <summary>
/// References ignored during compilation.
/// </summary>
private static readonly string[] IgnoredAssemblies =
{
"Microsoft.CSharp"
};

private readonly ILogger _log;
private readonly IParkitect _parkitect;

Expand Down Expand Up @@ -270,27 +253,13 @@ private string ResolveAssembly(IModAsset[] dependencies, string assemblyName)

var dllName = $"{assemblyName}.dll";

if (SystemAssemblies.Contains(assemblyName))
return dllName;

if (IgnoredAssemblies.Contains(assemblyName))
return null;

// var modPath = Path.Combine(InstallationPath, BaseDir ?? "", dllName);
// if (File.Exists(Path.Combine(modPath)))
// return modPath;

var managedAssemblyNames =
Directory.GetFiles(_parkitect.Paths.DataManaged, "*.dll").Select(Path.GetFileName).ToArray();

if (managedAssemblyNames.Contains(dllName))
return Path.Combine(_parkitect.Paths.DataManaged, dllName);

// if (SystemAssemblies.Contains(assemblyName))
// return dllName;

return null;
//throw new Exception($"Failed to resolve referenced assembly '{assemblyName}'");
}
}
}