fixed dependency issues, removed table.lua, removed filesystem as a core dependency
This commit is contained in:
parent
e5c1fc90b3
commit
7e5cace034
13
init.lua
13
init.lua
@ -1,10 +1,10 @@
|
||||
mtul = {
|
||||
binary = {}, --provided entirely by modlib.
|
||||
utils = {}, --provided entirely by modlib.
|
||||
tbl = {}, --modified by libs.modlib, source.
|
||||
mtul = mtul or {
|
||||
loaded_modules = {}
|
||||
}
|
||||
|
||||
--initialize namespace vars if not present.
|
||||
mtul.binary = mtul.binary or {}
|
||||
mtul.utils = mtul.utils or {}
|
||||
mtul.loaded_modules.filesystem = true
|
||||
--optionally allow user to overset local math with mtul while still keeping core funcs & consts.
|
||||
mtul.math = {}
|
||||
for i, v in pairs(math) do
|
||||
@ -12,8 +12,7 @@ for i, v in pairs(math) do
|
||||
end
|
||||
|
||||
--run files. These will directly modify the mtul sub tables.
|
||||
mtul.path = minetest.get_modpath("mtul_core")
|
||||
mtul.path = minetest.get_modpath("mtul_filesystem")
|
||||
dofile(mtul.path.."/modlib/binary.lua")
|
||||
dofile(mtul.path.."/modlib/table.lua")
|
||||
dofile(mtul.path.."/modlib/mod_utils.lua")
|
||||
dofile(mtul.path.."/modlib/mod_utils_media.lua")
|
||||
|
8
mod.conf
8
mod.conf
@ -1,4 +1,4 @@
|
||||
name = mtul_core
|
||||
title = MTUL core
|
||||
description = integrates various dependancies, implements some universal math features.
|
||||
author = FatalError42O, Appgurue
|
||||
name = mtul_filesystem
|
||||
title = MTUL filesystem
|
||||
description = adds dependencies for binary file reading, as well as other file utilities.
|
||||
author = FatalError42O, (coded by Appgurue)
|
@ -1,18 +0,0 @@
|
||||
|
||||
--adds a list to the end of another list without ovewriting data.
|
||||
function mtul.tbl.append(table, other_table)
|
||||
local length = #table
|
||||
for index, value in ipairs(other_table) do
|
||||
table[length + index] = value
|
||||
end
|
||||
return table
|
||||
end
|
||||
|
||||
--this... I guess lists keys by their order??? I have no idea, depended on by b3d standalone.
|
||||
function mtul.tbl.keys(table)
|
||||
local keys = {}
|
||||
for key, _ in pairs(table) do
|
||||
keys[#keys + 1] = key
|
||||
end
|
||||
return keys
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user