From 859fcd3f6deff68206c3e26beba60b447042735d Mon Sep 17 00:00:00 2001 From: Hawkear Date: Sun, 11 Jan 2009 20:36:10 +0000 Subject: Added Script-dir git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/Lua@1556 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UMain.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/base/UMain.pas b/src/base/UMain.pas index 0f9daa6e..2da1ca39 100644 --- a/src/base/UMain.pas +++ b/src/base/UMain.pas @@ -106,6 +106,7 @@ var FontPath: string; ResourcesPath: string; PlayListPath: string; + ScriptPath: string; Done: Boolean; // FIXME: ConversionFileName should not be global @@ -475,9 +476,9 @@ begin done := not Display.Draw; // FIXME remove this when the Partymode works - if FileExists('main.lua') then + if FileExists(ScriptPath + 'main.lua') then begin - if 0 <> luaL_dofile(Lua, 'main.lua') then + if 0 <> luaL_dofile(Lua, PAnsiChar(ScriptPath + 'main.lua')) then begin Log.LogError(lua_tostring(Lua,-1)); end; @@ -1190,6 +1191,7 @@ begin FindPath(VisualsPath, Platform.GetGameSharedPath + 'visuals', false); FindPath(FontPath, Platform.GetGameSharedPath + 'fonts', false); FindPath(ResourcesPath, Platform.GetGameSharedPath + 'resources', false); + FindPath(ScriptPath, Platform.GetGameSharedPath + 'scripts', false); // Playlists are not shared as we need one directory to write too FindPath(PlaylistPath, Platform.GetGameUserPath + 'playlists', true); -- cgit v1.2.3