moved character_1 to character for overriding the default character

This commit is contained in:
Alexander Weber 2017-07-24 17:39:16 +02:00
parent 66043c3875
commit e2e2927fe8
6 changed files with 11 additions and 5 deletions

View File

@ -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")

View File

@ -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

View File

@ -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]

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 783 B

After

Width:  |  Height:  |  Size: 783 B