mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-25 17:00:16 +01:00
Merge branch 'master' into contentdb
This commit is contained in:
commit
af8212a1bd
@ -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