Fix incorrect ModFiles.Open(resolved path).
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Eluant;
|
using Eluant;
|
||||||
@@ -158,7 +159,7 @@ namespace OpenRA.Scripting
|
|||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
runtime.Globals["GameDir"] = Platform.GameDir;
|
runtime.Globals["GameDir"] = Platform.GameDir;
|
||||||
runtime.DoBuffer(Game.ModData.ModFiles.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua")).ReadAllText(), "scriptwrapper.lua").Dispose();
|
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open).ReadAllText(), "scriptwrapper.lua").Dispose();
|
||||||
tick = (LuaFunction)runtime.Globals["Tick"];
|
tick = (LuaFunction)runtime.Globals["Tick"];
|
||||||
|
|
||||||
// Register globals
|
// Register globals
|
||||||
|
|||||||
Reference in New Issue
Block a user