From b81d2d8333244257ffec442e521d891544b4ea10 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 21 Jan 2016 17:31:34 +0000 Subject: [PATCH] Fix incorrect ModFiles.Open(resolved path). --- OpenRA.Game/Scripting/ScriptContext.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Scripting/ScriptContext.cs b/OpenRA.Game/Scripting/ScriptContext.cs index ac79840cff..f030df4dfe 100644 --- a/OpenRA.Game/Scripting/ScriptContext.cs +++ b/OpenRA.Game/Scripting/ScriptContext.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Reflection; using Eluant; @@ -158,7 +159,7 @@ namespace OpenRA.Scripting .ToArray(); 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"]; // Register globals