From 67ff4dbac1c93339454aac585055e8df0b663259 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Tue, 23 Sep 2014 22:58:11 -0400 Subject: [PATCH] Remove unnecessary conditionals - Game.modData.Manifest.LuaScripts is never null. - context.LoadLuaScripts will work properly even if the file collection is empty. --- OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs b/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs index fd304d4e83..9d3ebc2de6 100644 --- a/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs +++ b/OpenRA.Mods.RA/Scripting/LuaScriptInterface.cs @@ -63,9 +63,7 @@ namespace OpenRA.Mods.RA.Scripting context.RegisterType(typeof(int2), "int2", true); context.RegisterType(typeof(float2), "float2", true); - var sharedScripts = Game.modData.Manifest.LuaScripts ?? new string[0]; - if (sharedScripts.Any()) - context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), sharedScripts); + context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), Game.modData.Manifest.LuaScripts); AddMapActorGlobals();