mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2025-07-02 15:50:27 +02:00
Adds a filename split seperator setting that lets you choose between old style `_` and `.` because dot is the only char that isn´t allowed in playername but in texturenames. Default value is `_` to keep it compatible with older versions, while `.` offers a solution to fix #54.
This commit is contained in:
@ -2,7 +2,7 @@ local skins_dir_list = minetest.get_dir_list(skins.modpath.."/textures")
|
||||
|
||||
for _, fn in pairs(skins_dir_list) do
|
||||
local name, sort_id, is_preview, playername
|
||||
local nameparts = string.gsub(fn, "[.]", "_"):split("_")
|
||||
local nameparts = string.gsub(fn, "[.]", skins.fsep):split(skins.fsep)
|
||||
|
||||
-- check allowed prefix and file extension
|
||||
if (nameparts[1] == 'player' or nameparts[1] == 'character') and
|
||||
|
Reference in New Issue
Block a user