Eluna tweak load order. You can now freely use require() on any script. all lua files are loaded alphabetically (path is taken into account) and the extensions folder is loaded first always

This commit is contained in:
Rochet2
2014-07-02 00:44:54 +03:00
parent 6b01113a70
commit 637ee5fff9
3 changed files with 76 additions and 26 deletions

10
extensions/_Misc.lua Normal file
View File

@@ -0,0 +1,10 @@
--
-- Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/>
-- This program is free software licensed under GPL version 3
-- Please see the included DOCS/LICENSE.md for more information
--
-- Set correct require paths
package.path = package.path.."lua_scripts\\?;lua_scripts\\?.dll;lua_scripts\\?.lua"
-- Randomize random
math.randomseed(tonumber(tostring(os.time()):reverse():sub(1,6)))