Compare commits
2 commits
18a36e169a
...
f50fe9e35b
Author | SHA1 | Date | |
---|---|---|---|
f50fe9e35b | |||
c7c2ccc664 |
4 changed files with 7 additions and 6 deletions
2
etc/api
2
etc/api
|
@ -1 +1 @@
|
|||
Subproject commit 30f7203c5fe69e875dbd29a4da9fe0c5ab1ddc9b
|
||||
Subproject commit 4dec8003ed89e5a05ee992448747096f72ce718b
|
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'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local config = require 'config'
|
||||
local config = require 'config'
|
||||
|
||||
local Core = {
|
||||
config = config,
|
||||
|
@ -14,8 +14,9 @@ function Core:load(what)
|
|||
|
||||
print(('Loading %s (%d / %d) %s...'):format(what:sub(0, -2), i, s, v))
|
||||
-- Lint
|
||||
if pcall(require, 'src.'.. what ..'.'.. v) then
|
||||
local a=require('src.'.. what ..'.'.. v)
|
||||
local e, a = pcall(require, 'src.'.. what ..'.'.. v)
|
||||
print(e, a)
|
||||
if e then
|
||||
if what == 'events' then self.api:on(v, a)
|
||||
elseif what == 'cmds' then self.cmds[v] = a
|
||||
elseif what == 'parts' then a(self)
|
||||
|
|
2
start.sh
2
start.sh
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd $(dirname $0)
|
||||
lua5.3 init.lua
|
||||
luajit init.lua || lua5.3 init.lua
|
||||
|
|
Loading…
Reference in a new issue