fix skins.set_player_skin call with skin name parameter

this fix the homedecor_wardrobe compatibility
This commit is contained in:
Alexander Weber 2022-02-15 14:29:45 +01:00
parent c51905d44b
commit cf712e5b54

View File

@ -34,7 +34,7 @@ function skins.assign_player_skin(player, skin)
else
return false
end
return true
return true, skin_obj
end
-- update visuals
@ -53,11 +53,11 @@ end
-- Assign and update - should be used on selection externally
function skins.set_player_skin(player, skin)
local success = skins.assign_player_skin(player, skin)
local success, skin_obj = skins.assign_player_skin(player, skin)
if success then
skins.get_player_skin(player):set_skin(player)
skins.update_player_skin(player)
minetest.log("action", player:get_player_name().." set skin to "..skin:get_meta("name"))
minetest.log("action", player:get_player_name().." set skin to "..skin_obj:get_meta("name"))
end
return success
end