mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2025-07-03 16:20:26 +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:
@ -88,7 +88,7 @@ local function safe_single_skin(skin)
|
||||
skin.license
|
||||
}
|
||||
|
||||
local name = "character_" .. skin.id
|
||||
local name = "character" .. skins.fsep .. skin.id
|
||||
|
||||
-- core.safe_file_write does not work here
|
||||
unsafe_file_write(
|
||||
@ -101,7 +101,7 @@ local function safe_single_skin(skin)
|
||||
core.decode_base64(skin.img)
|
||||
)
|
||||
fetch_url(preview_url:format(skin.id), function(preview)
|
||||
unsafe_file_write(skins_path .. name .. "_preview.png", preview)
|
||||
unsafe_file_write(skins_path .. name .. skins.fsep .. "preview.png", preview)
|
||||
end)
|
||||
core.log("action", ("%s: Completed skin %s"):format(_ID_, name))
|
||||
end
|
||||
|
Reference in New Issue
Block a user