mtinfo/textures.lua
NatureFreshMilk 8e5d15ca5f modules
2020-01-06 13:31:18 +01:00

17 lines
559 B
Lua

local count = 0
for _, modname in ipairs(minetest.get_modnames()) do
local modpath = minetest.get_modpath(modname)
local destination_path = mtinfo.basepath .. "/textures"
minetest.mkdir(destination_path)
if modpath then
local texturepath = modpath .. "/textures"
local dir_list = minetest.get_dir_list(texturepath)
for _, filename in pairs(dir_list) do
count = count + 1
mtinfo.copyfile(texturepath .. "/" .. filename, destination_path .. "/" .. filename)
end
end
end
print("[mtinfo] exported " .. count .. " textures")