summaryrefslogtreecommitdiff
path: root/homedecor
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-03-06 17:01:02 -0500
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2019-03-06 17:01:02 -0500
commitb21c3d368077aa3a1c42ff1582cda6263c018585 (patch)
tree4053ef589ef5c5b99f0a87b567207e8c52cf4c76 /homedecor
parentec25fd83415d0ecb49f41295af3dc30f14850b2f (diff)
downloaddreambuilder_modpack-b21c3d368077aa3a1c42ff1582cda6263c018585.tar
dreambuilder_modpack-b21c3d368077aa3a1c42ff1582cda6263c018585.tar.gz
dreambuilder_modpack-b21c3d368077aa3a1c42ff1582cda6263c018585.tar.bz2
dreambuilder_modpack-b21c3d368077aa3a1c42ff1582cda6263c018585.tar.xz
dreambuilder_modpack-b21c3d368077aa3a1c42ff1582cda6263c018585.zip
updated cottages, areasprotector, bees, biome_lib, technic, facade,
farming redo, homedecor, maptools, mesecons, moreblocks, moreores, pipeworks, quartz, travelnet, unified_inventory, unifieddyes, xban2 delete the playeranim mod, not 5.0.0 compatible.
Diffstat (limited to 'homedecor')
-rw-r--r--homedecor/wardrobe.lua29
1 files changed, 15 insertions, 14 deletions
diff --git a/homedecor/wardrobe.lua b/homedecor/wardrobe.lua
index 8515555..6ce13f8 100644
--- a/homedecor/wardrobe.lua
+++ b/homedecor/wardrobe.lua
@@ -45,17 +45,16 @@ function homedecor.get_player_skin(player)
end
function homedecor.set_player_skin(player, skin, save)
- skin = skin or default_skin
if skinsdb_mod_path then
- skins.set_player_skin(player, skin)
+ skins.set_player_skin(player, skin or skins.default)
elseif armor_mod_path then -- if 3D_armor's installed, let it set the skin
- armor.textures[player:get_player_name()].skin = skin
+ armor.textures[player:get_player_name()].skin = skin or default_skin
armor:update_player_visuals(player)
else
- set_player_textures(player, { skin })
+ set_player_textures(player, { skin or default_skin})
end
- if save then
+ if save and not skinsdb_mod_path then
if skin == default_skin then
skin = "default"
player:set_attribute("homedecor:player_skin", "")
@@ -133,13 +132,15 @@ homedecor.register("wardrobe", {
minetest.register_alias("homedecor:wardrobe_bottom", "homedecor:wardrobe")
minetest.register_alias("homedecor:wardrobe_top", "air")
-minetest.register_on_joinplayer(function(player)
- local skin = player:get_attribute("homedecor:player_skin")
+if not skinsdb_mod_path then -- If not managed by skinsdb
+ minetest.register_on_joinplayer(function(player)
+ local skin = player:get_attribute("homedecor:player_skin")
- if skin and skin ~= "" then
- -- setting player skin on connect has no effect, so delay skin change
- minetest.after(1, function(player, skin)
- homedecor.set_player_skin(player, skin)
- end, player, skin)
- end
-end)
+ if skin and skin ~= "" then
+ -- setting player skin on connect has no effect, so delay skin change
+ minetest.after(1, function(player, skin)
+ homedecor.set_player_skin(player, skin)
+ end, player, skin)
+ end
+ end)
+end