mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-23 07:50:18 +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 = {}
|
||||||
skins.modpath = minetest.get_modpath(minetest.get_current_modname())
|
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.."/skin_meta_api.lua")
|
||||||
dofile(skins.modpath.."/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:
|
The file contains:
|
||||||
Skin name
|
Skin name
|
||||||
Author
|
Author
|
||||||
|
@ -6,9 +6,15 @@ for _, fn in pairs(skins_dir_list) do
|
|||||||
|
|
||||||
local name, sort_id, assignment, is_preview
|
local name, sort_id, assignment, is_preview
|
||||||
if nameparts[1] == "character" then
|
if nameparts[1] == "character" then
|
||||||
|
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
|
sort_id = tonumber(nameparts[2])+5000
|
||||||
name = "character_"..nameparts[2]
|
name = "character_"..nameparts[2]
|
||||||
is_preview = (nameparts[3] == "preview")
|
is_preview = (nameparts[3] == "preview")
|
||||||
|
end
|
||||||
elseif nameparts[1] == "player" then
|
elseif nameparts[1] == "player" then
|
||||||
assignment = "player:"..nameparts[2]
|
assignment = "player:"..nameparts[2]
|
||||||
name = "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