added WSU.doallfiles, made core and modcompat use it
parent
5901a0e59a
commit
d74671b10c
|
@ -1,5 +1,3 @@
|
|||
export wbg_core = {}
|
||||
|
||||
for file in *minetest.get_dir_list minetest.get_modpath('wbg_core') .. "/scripts", false
|
||||
if file\sub(-4) == '.lua'
|
||||
dofile minetest.get_modpath('wbg_core') .. "/scripts/" .. file
|
||||
WSU.doallfiles minetest.get_modpath('wbg_core') .. "/scripts"
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
for file in *minetest.get_dir_list minetest.get_modpath('wbg_modcompat') .. "/scripts", false
|
||||
if file\sub(-4) == '.lua'
|
||||
dofile minetest.get_modpath('wbg_modcompat') .. "/scripts/" .. file
|
||||
WSU.doallfiles minetest.get_modpath('wbg_modcompat') .. "/scripts"
|
||||
|
|
|
@ -20,6 +20,7 @@ export WSU = {
|
|||
for k,v in pairs(list[name])
|
||||
params[k] = v
|
||||
return params
|
||||
|
||||
get_fn_ups: (fn)->
|
||||
ups = {}
|
||||
i=1
|
||||
|
@ -30,4 +31,9 @@ export WSU = {
|
|||
ups[n] = v
|
||||
i = i + 1
|
||||
return ups
|
||||
|
||||
doallfiles: (path)->
|
||||
for file in *minetest.get_dir_list path, false
|
||||
if file\sub(-4) == '.lua'
|
||||
dofile path .. "/" .. file
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue