mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2024-12-23 07:50:18 +01:00
fix skins.set_player_skin call with skin name parameter
this fix the homedecor_wardrobe compatibility
This commit is contained in:
parent
c51905d44b
commit
cf712e5b54
6
api.lua
6
api.lua
@ -34,7 +34,7 @@ function skins.assign_player_skin(player, skin)
|
|||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true, skin_obj
|
||||||
end
|
end
|
||||||
|
|
||||||
-- update visuals
|
-- update visuals
|
||||||
@ -53,11 +53,11 @@ end
|
|||||||
|
|
||||||
-- Assign and update - should be used on selection externally
|
-- Assign and update - should be used on selection externally
|
||||||
function skins.set_player_skin(player, skin)
|
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
|
if success then
|
||||||
skins.get_player_skin(player):set_skin(player)
|
skins.get_player_skin(player):set_skin(player)
|
||||||
skins.update_player_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
|
end
|
||||||
return success
|
return success
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user