mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-22 15:30:19 +01:00
moved character_1 to character for overriding the default character
This commit is contained in:
parent
66043c3875
commit
e2e2927fe8
2
init.lua
2
init.lua
@ -7,7 +7,7 @@
|
||||
|
||||
skins = {}
|
||||
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
skins.default = "character_1"
|
||||
skins.default = "character"
|
||||
|
||||
dofile(skins.modpath.."/skin_meta_api.lua")
|
||||
dofile(skins.modpath.."/api.lua")
|
||||
|
@ -1,4 +1,4 @@
|
||||
For each skin in textures folder a metadata file can be applied with "txt" suffilx. See character_1.txt for skin character_1.png for reference.
|
||||
For each skin in textures folder a metadata file can be applied with "txt" suffilx. See character.txt for skin character.png for reference.
|
||||
The file contains:
|
||||
Skin name
|
||||
Author
|
||||
|
12
skinlist.lua
12
skinlist.lua
@ -6,9 +6,15 @@ for _, fn in pairs(skins_dir_list) do
|
||||
|
||||
local name, sort_id, assignment, is_preview
|
||||
if nameparts[1] == "character" then
|
||||
sort_id = tonumber(nameparts[2])+5000
|
||||
name = "character_"..nameparts[2]
|
||||
is_preview = (nameparts[3] == "preview")
|
||||
if tonumber(nameparts[2]) == nil then --default skin character.png
|
||||
sort_id = 5000
|
||||
name = "character"
|
||||
is_preview = (nameparts[2] == "preview")
|
||||
else
|
||||
sort_id = tonumber(nameparts[2])+5000
|
||||
name = "character_"..nameparts[2]
|
||||
is_preview = (nameparts[3] == "preview")
|
||||
end
|
||||
elseif nameparts[1] == "player" then
|
||||
assignment = "player:"..nameparts[2]
|
||||
name = "player_"..nameparts[2]
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 783 B After Width: | Height: | Size: 783 B |
Loading…
Reference in New Issue
Block a user