[antum_overrides] Use namespace variables "antum.overrides.modname" &

"antum.overrides.modpath".
This commit is contained in:
AntumDeluge 2016-08-29 17:46:45 -07:00
parent 23a8b10a35
commit a35fc1e560
3 changed files with 3 additions and 16 deletions

View File

@ -37,14 +37,7 @@ antum.clearCraftRecipe = function(r)
})
end
local craftdir = antum_overrides_path .. "/crafting"
local overrideModCrafts = function(modname)
if minetest.get_modpath(modname) then
dofile(craftdir .. "/" .. modname .. ".lua")
end
end
local craftdir = antum.overrides.modpath .. "/crafting"
local modoverrides = {
"coloredwood",
@ -56,6 +49,6 @@ local modoverrides = {
for I in pairs(modoverrides) do
local modname = modoverrides[I]
if minetest.get_modpath(modname) then
overrideModCrafts(modname)
dofile(craftdir .. "/" .. modname .. ".lua")
end
end

View File

@ -27,8 +27,6 @@
antum.overrides = {}
antum.overrides.modname = minetest.get_current_modname()
antum.overrides.modpath = minetest.get_modpath(antum.overrides.modname)
antum_overrides_path = modpath
antum.overrides_path = modpath
dofile(modpath .. "/crafting.lua")
dofile(modpath .. "/items.lua")

View File

@ -25,11 +25,7 @@
--]]
local itemsdir = antum_overrides_path .. "/items"
local overrideModItems = function(modname)
end
local itemsdir = antum.overrides.modpath .. "/items"
local modoverrides = {
"creatures",