revert texture name parsing change

This commit is contained in:
Alexander Weber 2020-02-12 08:09:17 +01:00
parent ada930c099
commit 55dc55f2dd

View File

@ -2,11 +2,7 @@ local skins_dir_list = minetest.get_dir_list(skins.modpath.."/textures")
for _, fn in pairs(skins_dir_list) do for _, fn in pairs(skins_dir_list) do
local name, sort_id, assignment, is_preview, playername local name, sort_id, assignment, is_preview, playername
local nameparts = { local nameparts = string.gsub(fn, "[.]", "_"):split("_")
fn:match("^%w+"),
fn:gsub("^%w+_", ""):gsub("%.%w+$", ""),
fn:match("%w+$"),
}
-- check allowed prefix and file extension -- check allowed prefix and file extension
if (nameparts[1] == 'player' or nameparts[1] == 'character') and if (nameparts[1] == 'player' or nameparts[1] == 'character') and