luajit support
This commit is contained in:
parent
18a36e169a
commit
c7c2ccc664
3 changed files with 6 additions and 5 deletions
2
init.lua
2
init.lua
|
@ -1,3 +1,3 @@
|
||||||
package.path = 'etc/?.lua;etc/?/init.lua;' .. package.path
|
package.path = 'etc/?.lua;etc/?/init.lua;?.lua;?/init.lua;' .. package.path
|
||||||
|
|
||||||
require 'src.parts.core'
|
require 'src.parts.core'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
local config = require 'config'
|
local config = require 'config'
|
||||||
|
|
||||||
local Core = {
|
local Core = {
|
||||||
config = config,
|
config = config,
|
||||||
|
@ -14,8 +14,9 @@ function Core:load(what)
|
||||||
|
|
||||||
print(('Loading %s (%d / %d) %s...'):format(what:sub(0, -2), i, s, v))
|
print(('Loading %s (%d / %d) %s...'):format(what:sub(0, -2), i, s, v))
|
||||||
-- Lint
|
-- Lint
|
||||||
if pcall(require, 'src.'.. what ..'.'.. v) then
|
local e, a = pcall(require, 'src.'.. what ..'.'.. v)
|
||||||
local a=require('src.'.. what ..'.'.. v)
|
print(e, a)
|
||||||
|
if e then
|
||||||
if what == 'events' then self.api:on(v, a)
|
if what == 'events' then self.api:on(v, a)
|
||||||
elseif what == 'cmds' then self.cmds[v] = a
|
elseif what == 'cmds' then self.cmds[v] = a
|
||||||
elseif what == 'parts' then a(self)
|
elseif what == 'parts' then a(self)
|
||||||
|
|
2
start.sh
2
start.sh
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
lua5.3 init.lua
|
luajit init.lua || lua5.3 init.lua
|
||||||
|
|
Loading…
Reference in a new issue