1
0
mirror of https://github.com/Sokomine/cottages.git synced 2025-07-15 06:00:26 +02:00

stylua fixes

This commit is contained in:
flux
2023-01-22 19:36:23 -08:00
parent b58368ea6a
commit 0157649fa5
50 changed files with 945 additions and 980 deletions

View File

@ -8,19 +8,19 @@ function cottages.roof.register_roof(name, material, tiles)
tiles = tiles,
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0 },
{ -0.5, 0, 0, 0.5, 0.5, 0.5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0 },
{ -0.5, 0, 0, 0.5, 0.5, 0.5 },
},
},
is_ground_content = false,
@ -33,19 +33,19 @@ function cottages.roof.register_roof(name, material, tiles)
tiles = tiles,
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{ -0.5, 0, 0, 0.5, 0.5, 0.5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
{ -0.5, 0, 0, 0.5, 0.5, 0.5 },
},
},
is_ground_content = false,
@ -57,20 +57,20 @@ function cottages.roof.register_roof(name, material, tiles)
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
-- this one is from all sides - except from the underside - of the given material
tiles = {tiles[1], tiles[2], tiles[1], tiles[1], tiles[1], tiles[1]},
tiles = { tiles[1], tiles[2], tiles[1], tiles[1], tiles[1], tiles[1] },
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{ -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
},
},
is_ground_content = false,
@ -79,33 +79,32 @@ function cottages.roof.register_roof(name, material, tiles)
minetest.register_craft({
output = "cottages:roof_" .. name .. " 6",
recipe = {
{"", "", material},
{"", material, ""},
{material, "", ""}
}
{ "", "", material },
{ "", material, "" },
{ material, "", "" },
},
})
minetest.register_craft({
output = "cottages:roof_connector_" .. name,
recipe = {
{"cottages:roof_" .. name},
{ci.wood},
}
{ "cottages:roof_" .. name },
{ ci.wood },
},
})
minetest.register_craft({
output = "cottages:roof_flat_" .. name .. " 2",
recipe = {
{"cottages:roof_" .. name, "cottages:roof_" .. name},
}
{ "cottages:roof_" .. name, "cottages:roof_" .. name },
},
})
-- convert flat roofs back to normal roofs
minetest.register_craft({
output = "cottages:roof_" .. name,
recipe = {
{"cottages:roof_flat_" .. name, "cottages:roof_flat_" .. name}
}
{ "cottages:roof_flat_" .. name, "cottages:roof_flat_" .. name },
},
})
end -- of cottages.register_roof( name, tiles, basic_material )

View File

@ -2,12 +2,10 @@ local ci = cottages.craftitems
minetest.register_craft({
output = "cottages:reet",
recipe = {{ci.papyrus, ci.papyrus},
{ci.papyrus, ci.papyrus},
},
recipe = { { ci.papyrus, ci.papyrus }, { ci.papyrus, ci.papyrus } },
})
minetest.register_craft({
output = "cottages:slate_vertical",
recipe = {{ci.stone, ci.wood}}
recipe = { { ci.stone, ci.wood } },
})

View File

@ -5,82 +5,93 @@ if cottages.settings.roof.use_farming_straw_stairs then
minetest.register_alias("cottages:roof_straw", "stairs:stair_straw")
minetest.register_alias("cottages:roof_connector_straw", "stairs:stair_straw")
minetest.register_alias("cottages:roof_flat_straw", "stairs:slab_straw")
else
cottages.roof.register_roof(
"straw",
"cottages:straw_mat",
{cottages.textures.straw, cottages.textures.straw,
cottages.textures.straw, cottages.textures.straw,
cottages.textures.straw, cottages.textures.straw}
)
cottages.roof.register_roof("straw", "cottages:straw_mat", {
cottages.textures.straw,
cottages.textures.straw,
cottages.textures.straw,
cottages.textures.straw,
cottages.textures.straw,
cottages.textures.straw,
})
end
cottages.roof.register_roof(
"reet",
ci.papyrus,
{"cottages_reet.png", "cottages_reet.png",
"cottages_reet.png", "cottages_reet.png",
"cottages_reet.png", "cottages_reet.png"}
)
cottages.roof.register_roof("reet", ci.papyrus, {
"cottages_reet.png",
"cottages_reet.png",
"cottages_reet.png",
"cottages_reet.png",
"cottages_reet.png",
"cottages_reet.png",
})
cottages.roof.register_roof(
"wood",
ci.wood,
{cottages.textures.roof_wood, cottages.textures.roof_sides,
cottages.textures.roof_sides, cottages.textures.roof_sides,
cottages.textures.roof_sides, cottages.textures.roof_wood}
)
cottages.roof.register_roof("wood", ci.wood, {
cottages.textures.roof_wood,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_wood,
})
cottages.roof.register_roof(
"black",
ci.coal_lump,
{"cottages_homedecor_shingles_asphalt.png", cottages.textures.roof_sides,
cottages.textures.roof_sides, cottages.textures.roof_sides,
cottages.textures.roof_sides, "cottages_homedecor_shingles_asphalt.png"}
)
cottages.roof.register_roof("black", ci.coal_lump, {
"cottages_homedecor_shingles_asphalt.png",
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
"cottages_homedecor_shingles_asphalt.png",
})
cottages.roof.register_roof(
"red",
ci.clay_brick,
{"cottages_homedecor_shingles_terracotta.png", cottages.textures.roof_sides,
cottages.textures.roof_sides, cottages.textures.roof_sides,
cottages.textures.roof_sides, "cottages_homedecor_shingles_terracotta.png"}
)
cottages.roof.register_roof("red", ci.clay_brick, {
"cottages_homedecor_shingles_terracotta.png",
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
"cottages_homedecor_shingles_terracotta.png",
})
cottages.roof.register_roof(
"brown",
ci.dirt,
{"cottages_homedecor_shingles_wood.png", cottages.textures.roof_sides,
cottages.textures.roof_sides, cottages.textures.roof_sides,
cottages.textures.roof_sides, "cottages_homedecor_shingles_wood.png"}
)
cottages.roof.register_roof("brown", ci.dirt, {
"cottages_homedecor_shingles_wood.png",
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
cottages.textures.roof_sides,
"cottages_homedecor_shingles_wood.png",
})
cottages.roof.register_roof(
"slate",
ci.stone,
{"cottages_slate.png", cottages.textures.roof_sides,
"cottages_slate.png", "cottages_slate.png",
cottages.textures.roof_sides, "cottages_slate.png"}
)
cottages.roof.register_roof("slate", ci.stone, {
"cottages_slate.png",
cottages.textures.roof_sides,
"cottages_slate.png",
"cottages_slate.png",
cottages.textures.roof_sides,
"cottages_slate.png",
})
--------
minetest.register_node("cottages:reet", {
description = S("Reed for thatching"),
tiles = {"cottages_reet.png"},
groups = {hay = 3, snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3},
tiles = { "cottages_reet.png" },
groups = { hay = 3, snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3 },
sounds = cottages.sounds.leaves,
is_ground_content = false,
})
minetest.register_node("cottages:slate_vertical", {
description = S("Vertical Slate"),
tiles = {"cottages_slate.png", cottages.textures.roof_sides,
"cottages_slate.png", "cottages_slate.png",
cottages.textures.roof_sides, "cottages_slate.png"},
tiles = {
"cottages_slate.png",
cottages.textures.roof_sides,
"cottages_slate.png",
"cottages_slate.png",
cottages.textures.roof_sides,
"cottages_slate.png",
},
paramtype2 = "facedir",
groups = {cracky = 2, stone = 1},
groups = { cracky = 2, stone = 1 },
sounds = cottages.sounds.stone,
is_ground_content = false,
})