mudgangster

Log | Files | Refs

commit 5ba9d1a5d0c2ab89f63a1541d75e5ed69417e343
parent 86af94233061ace853b0630bdf6fc1c2410c2546
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Thu,  6 Sep 2018 16:23:36 +0300

mud.os

Diffstat:
src/lua/main.lua | 1+
src/lua/script.lua | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lua/main.lua b/src/lua/main.lua @@ -1,5 +1,6 @@ mud = { connected = false, + os = package.config:sub( 1, 1 ) == "\\" and "windows" or "linux" } table.unpack = table.unpack or unpack diff --git a/src/lua/script.lua b/src/lua/script.lua @@ -2,7 +2,7 @@ local lfs = require( "lfs" ) local serialize = require( "serialize" ) local ScriptsDir -if package.config:sub( 1, 1 ) == "\\" then +if mud.os == "windows" then ScriptsDir = os.getenv( "APPDATA" ) .. "\\Mud Gangster\\scripts" else ScriptsDir = os.getenv( "HOME" ) .. "/.mudgangster/scripts"