1
0
mirror of https://github.com/Sokomine/cottages.git synced 2025-07-10 11:50:23 +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

@ -1,26 +1,25 @@
minetest.register_craft({
output = "cottages:hay_mat 9",
recipe = {
{"cottages:hay"},
{ "cottages:hay" },
},
})
minetest.register_craft({
output = "cottages:hay",
recipe = {
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
{ "cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat" },
{ "cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat" },
{ "cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat" },
},
})
minetest.register_craft({
output = "cottages:hay",
recipe = {{"cottages:hay_bale"}},
recipe = { { "cottages:hay_bale" } },
})
minetest.register_craft({
output = "cottages:hay_bale",
recipe = {{"cottages:hay"}},
recipe = { { "cottages:hay" } },
})

View File

@ -1,3 +1,2 @@
cottages.dofile("modules", "hay", "nodes")
cottages.dofile("modules", "hay", "crafts")

View File

@ -5,29 +5,29 @@ minetest.register_node("cottages:hay_mat", {
paramtype2 = "leveled",
description = S("Some hay"),
tiles = {
cottages.textures.straw .. "^[multiply:#88BB88"
cottages.textures.straw .. "^[multiply:#88BB88",
},
groups = {hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3},
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
is_ground_content = false,
node_box = {
type = "leveled", --"fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
}
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
},
},
-- make sure a placed hay block looks halfway reasonable
after_place_node = function(pos, placer, itemstack, pointed_thing)
minetest.swap_node(pos, {name = "cottages:hay_mat", param2 = math.random(2, 25)})
minetest.swap_node(pos, { name = "cottages:hay_mat", param2 = math.random(2, 25) })
end,
})
-- hay block, similar to straw block
minetest.register_node("cottages:hay", {
description = S("Hay"),
tiles = {cottages.textures.straw .. "^[multiply:#88BB88"},
groups = {hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = { cottages.textures.straw .. "^[multiply:#88BB88" },
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
sounds = cottages.sounds.leaves,
is_ground_content = false,
})
@ -36,22 +36,22 @@ minetest.register_node("cottages:hay", {
minetest.register_node("cottages:hay_bale", {
drawtype = "nodebox",
description = S("Hay bale"),
tiles = {"cottages_darkage_straw_bale.png^[multiply:#88BB88"},
tiles = { "cottages_darkage_straw_bale.png^[multiply:#88BB88" },
paramtype = "light",
groups = {hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3},
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable = 3 },
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
node_box = {
type = "fixed",
fixed = {
{-0.45, -0.5, -0.45, 0.45, 0.45, 0.45},
}
{ -0.45, -0.5, -0.45, 0.45, 0.45, 0.45 },
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.45, -0.5, -0.45, 0.45, 0.45, 0.45},
}
{ -0.45, -0.5, -0.45, 0.45, 0.45, 0.45 },
},
},
is_ground_content = false,
})