mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-01-03 13:30:20 +01:00
replace player_set_textures with new API (fallback to old API)
This commit is contained in:
parent
bfda7c49fd
commit
fe2acaaa1e
@ -6,6 +6,12 @@ local wd_cbox = {
|
|||||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- cache set_textures function (fallback to old version)
|
||||||
|
-- default.player_set_textures is deprecated and will be removed in future
|
||||||
|
local set_player_textures =
|
||||||
|
minetest.global_exists("player_api") and player_api.set_textures
|
||||||
|
or default.player_set_textures
|
||||||
|
|
||||||
homedecor.register("wardrobe", {
|
homedecor.register("wardrobe", {
|
||||||
mesh = "homedecor_bedroom_wardrobe.obj",
|
mesh = "homedecor_bedroom_wardrobe.obj",
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -55,7 +61,7 @@ homedecor.register("wardrobe", {
|
|||||||
armor:update_player_visuals(sender)
|
armor:update_player_visuals(sender)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
default.player_set_textures(sender, { "homedecor_clothes_"..skins[i]..".png" })
|
set_player_textures(sender, { "homedecor_clothes_"..skins[i]..".png" })
|
||||||
break
|
break
|
||||||
elseif fields["fe"..skins[i]] then
|
elseif fields["fe"..skins[i]] then
|
||||||
if armor_mod then
|
if armor_mod then
|
||||||
@ -63,7 +69,7 @@ homedecor.register("wardrobe", {
|
|||||||
armor:update_player_visuals(sender)
|
armor:update_player_visuals(sender)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
default.player_set_textures(sender, { skin = "homedecor_clothes_fe"..skins[i]..".png" })
|
set_player_textures(sender, { skin = "homedecor_clothes_fe"..skins[i]..".png" })
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user