mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-23 07:50:18 +01:00
revert texture name parsing change
This commit is contained in:
parent
ada930c099
commit
55dc55f2dd
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user