Remove unnecessary conditionals
- Game.modData.Manifest.LuaScripts is never null. - context.LoadLuaScripts will work properly even if the file collection is empty.
This commit is contained in:
@@ -63,9 +63,7 @@ namespace OpenRA.Mods.RA.Scripting
|
|||||||
context.RegisterType(typeof(int2), "int2", true);
|
context.RegisterType(typeof(int2), "int2", true);
|
||||||
context.RegisterType(typeof(float2), "float2", true);
|
context.RegisterType(typeof(float2), "float2", true);
|
||||||
|
|
||||||
var sharedScripts = Game.modData.Manifest.LuaScripts ?? new string[0];
|
context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), Game.modData.Manifest.LuaScripts);
|
||||||
if (sharedScripts.Any())
|
|
||||||
context.LoadLuaScripts(f => GlobalFileSystem.Open(f).ReadAllText(), sharedScripts);
|
|
||||||
|
|
||||||
AddMapActorGlobals();
|
AddMapActorGlobals();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user