Add wardrobe block

master
Wuzzy 2021-08-03 18:26:53 +02:00
parent eb36437e06
commit e67335e3ef
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,7 @@
Hades Wardrobes
The wardrobe block allows players to change their skin.
License: MIT License
Textures by prestidigitator
Code by Wuzzy

View File

@ -0,0 +1,36 @@
local S = minetest.get_translator("hades_wardrobes")
minetest.register_node("hades_wardrobes:wardrobe", {
description = S("Wardrobe"),
_tt_help = S("Lets you change your clothes and body"),
is_ground_content = false,
paramtype2 = "facedir",
tiles = {
{name="default_wood.png", align_style="world"},
{name="default_wood.png", align_style="world"},
{name="default_wood.png", align_style="world"},
{name="default_wood.png", align_style="world"},
{name="default_wood.png", align_style="world"},
"wardrobe_wardrobe_front.png"
},
sounds = hades_sounds.node_sound_wood_defaults(),
groups = { choppy = 3, oddly_breakable_by_hand = 2, flammable = 3 },
on_rightclick = function(pos, node, player, itemstack, pointed_thing)
hades_skins.show_skin_editor(player)
return itemstack
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Wardrobe"))
end,
on_rotate = "simple",
})
minetest.register_craft({
output = "hades_wardrobes:wardrobe",
recipe = {
{"group:wood","group:wood","group:wood"},
{"group:wool","group:wool","group:wool"},
{"group:wood","group:wood","group:wood"},
},
})

View File

@ -0,0 +1,3 @@
name = hades_wardrobes
description = Adds a wardrobe node allowing players to change their skin
depends = hades_skins, hades_sounds

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B