This commit is contained in:
epCode 2021-02-25 12:27:14 -08:00
parent 44d3f25767
commit 8f2a588059
4 changed files with 38 additions and 0 deletions

View File

@ -369,6 +369,33 @@ mcl_player.player_register_model("mcl_armor_character.b3d", {
}, },
}) })
mcl_player.player_register_model("mcl_armor_character_female.b3d", {
animation_speed = 30,
textures = {
armor.default_skin..".png",
"blank.png",
"blank.png",
},
animations = {
stand = {x=0, y=79},
lay = {x=162, y=166},
walk = {x=168, y=187},
mine = {x=189, y=198},
walk_mine = {x=200, y=219},
sit = {x=81, y=160},
sneak_stand = {x=222, y=302},
sneak_mine = {x=346, y=365},
sneak_walk = {x=304, y=323},
sneak_walk_mine = {x=325, y=344},
swim_walk = {x=368, y=387},
swim_walk_mine = {x=389, y=408},
swim_stand = {x=434, y=434},
swim_mine = {x=411, y=430},
run_walk = {x=440, y=459},
run_walk_mine = {x=461, y=480},
},
})
-- Register Callbacks -- Register Callbacks
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_on_player_receive_fields(function(player, formname, fields)

View File

@ -62,6 +62,7 @@ while true do
mcl_skins.meta[skin] = { mcl_skins.meta[skin] = {
name = data and data.name or "", name = data and data.name or "",
author = data and data.author or "", author = data and data.author or "",
gender = data and data.gender or "",
} }
if id > 0 then if id > 0 then
@ -93,8 +94,16 @@ mcl_skins.set_player_skin = function(player, skin_id)
elseif skin_id == 0 then elseif skin_id == 0 then
skin = "character" skin = "character"
preview = "player" preview = "player"
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
else else
skin = "mcl_skins_character_" .. tostring(skin_id) skin = "mcl_skins_character_" .. tostring(skin_id)
local meta = mcl_skins.meta[skin]
minetest.chat_send_all(meta.gender)
if meta.gender == "female" then
mcl_player.player_set_model(player, "mcl_armor_character_female.b3d")
else
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
end
if mcl_skins.has_preview[skin_id] then if mcl_skins.has_preview[skin_id] then
preview = "mcl_skins_player_" .. tostring(skin_id) preview = "mcl_skins_player_" .. tostring(skin_id)
else else

View File

@ -1,2 +1,3 @@
name = "Steve", name = "Steve",
author = "%TEXTURE_PACK_AUTHOR%", author = "%TEXTURE_PACK_AUTHOR%",
gender = "male",

View File

@ -1,2 +1,3 @@
name = "Alex", name = "Alex",
author = "%TEXTURE_PACK_AUTHOR%", author = "%TEXTURE_PACK_AUTHOR%",
gender = "female",