Initial commit
This commit is contained in:
commit
9caec04417
|
@ -0,0 +1,3 @@
|
|||
This mod is used to put custom skins in MineClone2 0.84 or greater.
|
||||
|
||||
Place PNG skin files in the textures folder. If the skin should be used with the slim-armed player mesh, include a complimentary file in the `meta` directory. The file in the meta directory should have the same name as the texture with the file extension changed to `.txt`. Add the line to the file `gender="female",`.
|
|
@ -0,0 +1,24 @@
|
|||
if not mcl_skins or not mcl_skins.register_simple_skin then return end
|
||||
local mod_path = minetest.get_modpath("mcl_custom_skins")
|
||||
local textures = minetest.get_dir_list(mod_path .. "/textures")
|
||||
table.sort(textures)
|
||||
for i, texture in pairs(textures) do
|
||||
if texture:find(".png$") then
|
||||
local f = io.open(mod_path .. "/meta/" .. texture:gsub("png$", "txt"))
|
||||
local slim_arms
|
||||
if f then
|
||||
local data = f:read("*all")
|
||||
if data then
|
||||
data = minetest.deserialize("return {" .. data .. "}")
|
||||
if data then
|
||||
slim_arms = data.gender == "female"
|
||||
end
|
||||
end
|
||||
f:close()
|
||||
end
|
||||
mcl_skins.register_simple_skin({
|
||||
texture = texture,
|
||||
slim_arms = slim_arms,
|
||||
})
|
||||
end
|
||||
end
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -0,0 +1,2 @@
|
|||
*
|
||||
!.gitignore
|
Loading…
Reference in New Issue