aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UMain.pas
diff options
context:
space:
mode:
authorHawkear <Hawkear@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-11 20:36:10 +0000
committerHawkear <Hawkear@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-01-11 20:36:10 +0000
commit859fcd3f6deff68206c3e26beba60b447042735d (patch)
tree9064c76aa13f168dbe62a219faed96c2a0913cbd /src/base/UMain.pas
parent5d89432a90a62ec10c5a142f614916120ec1d681 (diff)
downloadusdx-svn/Lua.tar.gz
usdx-svn/Lua.tar.xz
usdx-svn/Lua.zip
Added Script-dirsvn/Luagithub/svn/Lua
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/Lua@1556 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'src/base/UMain.pas')
-rw-r--r--src/base/UMain.pas6
1 files changed, 4 insertions, 2 deletions
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);