From 7ff04ee3338c49cebc25184437fcc48c34eabde3 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 4 Apr 2010 12:57:54 +1200 Subject: [PATCH] add ALL namespaces found in mod dlls - no more stupid assumption --- OpenRA.Game/Game.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 0219b7fe72..46a0af0fd4 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -78,10 +78,12 @@ namespace OpenRA foreach (var a in m.Assemblies) { var failures = new List(); - if (Verifier.IsSafe(Path.GetFullPath(a), failures)) - asms.Add(Pair.New( - Assembly.LoadFile(Path.GetFullPath(a)), - Path.GetFileNameWithoutExtension(a))); + var fullpath = Path.GetFullPath(a); + if (Verifier.IsSafe(fullpath, failures)) + { + var asm = Assembly.LoadFile(fullpath); + asms.AddRange(asm.GetNamespaces().Select(ns => Pair.New(asm, ns))); + } else { Log.Write("Assembly `{0}` cannot be verified. Failures:", a);