Compare commits

...

1 Commits

Author SHA1 Message Date
Oliver Brakmann
c271ce4e1d Fix opening the ScriptWrappers.lua file as read-write 2016-04-03 19:29:28 +02:00

View File

@@ -160,7 +160,7 @@ namespace OpenRA.Scripting
.ToArray();
runtime.Globals["GameDir"] = Platform.GameDir;
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open).ReadAllText(), "scriptwrapper.lua").Dispose();
runtime.DoBuffer(File.Open(Platform.ResolvePath(".", "lua", "scriptwrapper.lua"), FileMode.Open, FileAccess.Read).ReadAllText(), "scriptwrapper.lua").Dispose();
tick = (LuaFunction)runtime.Globals["Tick"];
// Register globals