3 ---------------------------------------------------------------------------------------
5 ---------------------------------------------------------------------------------------
6 -- a better roof than the normal stairs; can be replaced by stairs:stair_wood
9 -- create the three basic roof parts plus receipes for them;
10 cottages
.register_roof
= function( name
, tiles
, basic_material
, homedecor_alternative
)
12 minetest
.register_node("cottages:roof_"..name
, {
13 description
= "Roof "..name
,
15 --tiles = {"default_tree.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","default_tree.png"},
18 paramtype2
= "facedir",
19 is_ground_content
= true,
20 groups
= {immortal
=1},
24 {-0.5, -0.5, -0.5, 0.5, 0, 0},
25 {-0.5, 0, 0, 0.5, 0.5, 0.5},
31 {-0.5, -0.5, -0.5, 0.5, 0, 0},
32 {-0.5, 0, 0, 0.5, 0.5, 0.5},
35 sounds
= default
.node_sound_wood_defaults()
38 -- a better roof than the normal stairs; this one is for usage directly on top of walls (it has the form of a stair)
39 minetest
.register_node("cottages:roof_connector_"..name
, {
40 description
= "Roof connector "..name
,
42 -- top, bottom, side1, side2, inner, outer
43 --tiles = {"default_tree.png","default_wood.png","default_tree.png","default_tree.png","default_wood.png","default_tree.png"},
44 --tiles = {"darkage_straw.png","default_wood.png","darkage_straw.png","darkage_straw.png","darkage_straw.png","darkage_straw.png"},
47 paramtype2
= "facedir",
48 is_ground_content
= true,
49 groups
= {immortal
=1},
53 {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
54 {-0.5, 0, 0, 0.5, 0.5, 0.5},
60 {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
61 {-0.5, 0, 0, 0.5, 0.5, 0.5},
64 sounds
= default
.node_sound_wood_defaults()
67 -- this one is the slab version of the above roof
68 minetest
.register_node("cottages:roof_flat_"..name
, {
69 description
= "Roof (flat) "..name
,
71 -- top, bottom, side1, side2, inner, outer
72 --tiles = {"default_tree.png","default_wood.png","default_tree.png","default_tree.png","default_wood.png","default_tree.png"},
73 -- this one is from all sides - except from the underside - of the given material
74 tiles
= { tiles
[1], tiles
[2], tiles
[1], tiles
[1], tiles
[1], tiles
[1] };
76 paramtype2
= "facedir",
77 is_ground_content
= true,
78 groups
= {immortal
=1},
82 {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
88 {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
91 sounds
= default
.node_sound_wood_defaults()
95 end -- of cottages.register_roof( name, tiles, basic_material )
100 ---------------------------------------------------------------------------------------
101 -- add the diffrent roof types
102 ---------------------------------------------------------------------------------------
103 cottages
.register_roof( 'black',
104 {"cottages_homedecor_shingles_asphalt.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_asphalt.png"},
105 'homedecor:shingles_asphalt', 'default:coal_lump');
106 cottages
.register_roof( 'red',
107 {"cottages_homedecor_shingles_terracotta.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_terracotta.png"},
108 'homedecor:shingles_terracotta', 'default:clay_brick');