Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
add alias to homedecor:wardrobe
Browse files Browse the repository at this point in the history
  • Loading branch information
Crabman77 committed Jan 20, 2017
1 parent 4e0b1ea commit 06a1153
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mods/homedecor_modpack/homedecor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ dofile(modpath.."/cobweb.lua")
dofile(modpath.."/books.lua")
dofile(modpath.."/exterior.lua")
dofile(modpath.."/trash_cans.lua")
-- dofile(modpath.."/wardrobe.lua") --MFF crabman(30/07/2015) disabled wardrobe, duplicate with u_skin
dofile(modpath.."/wardrobe.lua")

dofile(modpath.."/crafts.lua")

Expand Down
11 changes: 8 additions & 3 deletions mods/homedecor_modpack/homedecor/wardrobe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ local wd_cbox = {
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }
}


--MFF crabman(30/07/2015) disabled wardrobe, duplicate with u_skin
minetest.register_alias("homedecor:wardrobe", "air")

--[[
homedecor.register("wardrobe", {
mesh = "homedecor_bedroom_wardrobe.obj",
tiles = {
Expand Down Expand Up @@ -48,15 +53,15 @@ homedecor.register("wardrobe", {
local armor_mod = minetest.get_modpath("3d_armor")
for i = 1,5 do
if fields[skins[i]] then
if fields[skins[i] ] then
if armor_mod then -- if 3D_armor's installed, let it set the skin
armor.textures[playerName].skin = "homedecor_clothes_"..skins[i]..".png"
armor:update_player_visuals(sender)
break
end
default.player_set_textures(sender, { "homedecor_clothes_"..skins[i]..".png" })
break
elseif fields["fe"..skins[i]] then
elseif fields["fe"..skins[i] ] then
if armor_mod then
armor.textures[playerName].skin = "homedecor_clothes_fe"..skins[i]..".png"
armor:update_player_visuals(sender)
Expand All @@ -68,6 +73,6 @@ homedecor.register("wardrobe", {
end
end
})

--]]
minetest.register_alias("homedecor:wardrobe_bottom", "homedecor:wardrobe")
minetest.register_alias("homedecor:wardrobe_top", "air")

0 comments on commit 06a1153

Please sign in to comment.