Reindent code.

This commit is contained in:
sys4-fr 2018-09-29 16:52:01 +02:00
parent 5385fde565
commit 98fc60bf76

134
init.lua
View File

@ -4,12 +4,15 @@
columnia = {}
-- The Blueprint
minetest.register_craftitem("columnia:blueprint", {
minetest.register_craftitem(
"columnia:blueprint",
{
description = "Column Blueprint",
inventory_image = "columnia_blueprint.png",
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:blueprint',
recipe = {
{'default:paper', 'group:stick', 'default:paper'},
@ -19,7 +22,9 @@ minetest.register_craft({
})
-- Bracket
minetest.register_node("columnia:bracket", {
minetest.register_node(
"columnia:bracket",
{
description = 'Bracket (Column)',
tiles = {"columnia_rusty.png",},
drawtype = "nodebox",
@ -41,7 +46,8 @@ minetest.register_node("columnia:bracket", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:bracket 4',
recipe = {
{"default:steel_ingot", "columnia:blueprint", ""},
@ -52,7 +58,9 @@ minetest.register_craft({
})
-- Lamp
minetest.register_node("columnia:lamp_ceiling", {
minetest.register_node(
"columnia:lamp_ceiling",
{
description = "Ceiling Lamp (Column)",
drawtype = "nodebox",
paramtype = "light",
@ -76,7 +84,8 @@ minetest.register_node("columnia:lamp_ceiling", {
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:lamp_ceiling 4',
recipe = {
{"columnia:blueprint", "default:steel_ingot", ""},
@ -88,7 +97,9 @@ minetest.register_craft({
-- Rusty_Block
minetest.register_node("columnia:rusty_block", {
minetest.register_node(
"columnia:rusty_block",
{
description = "Rusty Block",
tiles = {"columnia_rusty_block.png"},
is_ground_content = true,
@ -96,7 +107,8 @@ minetest.register_node("columnia:rusty_block", {
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:rusty_block 8',
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
@ -109,7 +121,9 @@ minetest.register_craft({
-- Now the Column
-- Node will be called columnia:column_mid_<subname>
function columnia.register_column_mid(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_mid_" .. subname, {
minetest.register_node(
":columnia:column_mid_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -157,12 +171,15 @@ function columnia.register_column_mid(subname, recipeitem, groups, images, descr
})
-- for replace ABM
minetest.register_node(":columnia:column_mid_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_mid_" .. subname.."upside_down",
{
replace_name = "columnia:column_mid_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_mid_' .. subname .. ' 2',
recipe = {
{"", recipeitem, ""},
@ -173,10 +190,11 @@ function columnia.register_column_mid(subname, recipeitem, groups, images, descr
})
end
-- Node will be called columnia:column_top_<subname>
function columnia.register_column_top(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_top_" .. subname, {
minetest.register_node(
":columnia:column_top_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -226,12 +244,15 @@ function columnia.register_column_top(subname, recipeitem, groups, images, descr
})
-- for replace ABM
minetest.register_node(":columnia:column_top_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_top_" .. subname.."upside_down",
{
replace_name = "columnia:column_top_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_top_' .. subname .. ' 4',
recipe = {
{recipeitem, recipeitem, recipeitem},
@ -244,7 +265,9 @@ end
-- Node will be called columnia:column_bottom_<subname>
function columnia.register_column_bottom(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_bottom_" .. subname, {
minetest.register_node(
":columnia:column_bottom_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -294,12 +317,15 @@ function columnia.register_column_bottom(subname, recipeitem, groups, images, de
})
-- for replace ABM
minetest.register_node(":columnia:column_bottom_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_bottom_" .. subname.."upside_down",
{
replace_name = "columnia:column_bottom_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_bottom_' .. subname .. ' 4',
recipe = {
{"", "columnia:blueprint", ""},
@ -311,7 +337,9 @@ function columnia.register_column_bottom(subname, recipeitem, groups, images, de
end
-- Node will be called columnia:column_crosslink<subname>
function columnia.register_column_crosslink(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_crosslink_" .. subname, {
minetest.register_node(
":columnia:column_crosslink_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -362,12 +390,15 @@ function columnia.register_column_crosslink(subname, recipeitem, groups, images,
})
-- for replace ABM
minetest.register_node(":columnia:column_crosslink_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_crosslink_" .. subname.."upside_down",
{
replace_name = "columnia:column_crosslink_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_crosslink_' .. subname .. ' 4',
recipe = {
{"", recipeitem, ""},
@ -380,7 +411,9 @@ end
-- Node will be called columnia:column_link<subname>
function columnia.register_column_link(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_link_" .. subname, {
minetest.register_node(
":columnia:column_link_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -428,12 +461,15 @@ function columnia.register_column_link(subname, recipeitem, groups, images, desc
})
-- for replace ABM
minetest.register_node(":columnia:column_link_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_link_" .. subname.."upside_down",
{
replace_name = "columnia:column_link_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_link_' .. subname .. ' 2',
recipe = {
{recipeitem, "columnia:blueprint", recipeitem},
@ -446,7 +482,9 @@ end
-- Node will be called columnia:column_linkdown<subname>
function columnia.register_column_linkdown(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":columnia:column_linkdown_" .. subname, {
minetest.register_node(
":columnia:column_linkdown_" .. subname,
{
description = description,
drawtype = "nodebox",
tiles = images,
@ -497,12 +535,15 @@ function columnia.register_column_linkdown(subname, recipeitem, groups, images,
})
-- for replace ABM
minetest.register_node(":columnia:column_linkdown_" .. subname.."upside_down", {
minetest.register_node(
":columnia:column_linkdown_" .. subname.."upside_down",
{
replace_name = "columnia:column_linkdown_" .. subname,
groups = {slabs_replace=1},
})
minetest.register_craft({
minetest.register_craft(
{
output = 'columnia:column_linkdown_' .. subname .. ' 3',
recipe = {
{recipeitem, "columnia:blueprint", recipeitem},
@ -524,7 +565,8 @@ function columnia.register_column_ia(subname, recipeitem, groups, images, desc_c
columnia.register_column_linkdown(subname, recipeitem, groups, images, desc_column_linkdown, sounds)
end
columnia.register_column_ia("rusty_block", "columnia:rusty_block",
columnia.register_column_ia(
"rusty_block", "columnia:rusty_block",
{cracky=3},
{"columnia_rusty_block.png"},
"Rusty Column",
@ -536,7 +578,8 @@ columnia.register_column_ia("rusty_block", "columnia:rusty_block",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("stone", "default:stone",
columnia.register_column_ia(
"stone", "default:stone",
{cracky=3},
{"default_stone.png"},
"Stone Column",
@ -548,7 +591,8 @@ columnia.register_column_ia("stone", "default:stone",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("stonebrick", "default:stonebrick",
columnia.register_column_ia(
"stonebrick", "default:stonebrick",
{cracky=3},
{"default_stone_brick.png"},
"Stone Brick Column",
@ -560,7 +604,8 @@ columnia.register_column_ia("stonebrick", "default:stonebrick",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("desert_stonebrick", "default:desert_stonebrick",
columnia.register_column_ia(
"desert_stonebrick", "default:desert_stonebrick",
{cracky=3},
{"default_desert_stone_brick.png"},
"Desert Stone Brick Column",
@ -572,7 +617,8 @@ columnia.register_column_ia("desert_stonebrick", "default:desert_stonebrick",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("desert_stone", "default:desert_stone",
columnia.register_column_ia(
"desert_stone", "default:desert_stone",
{cracky=3},
{"default_desert_stone.png"},
"Desert Stone Column",
@ -584,7 +630,8 @@ columnia.register_column_ia("desert_stone", "default:desert_stone",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("cobble", "default:cobble",
columnia.register_column_ia(
"cobble", "default:cobble",
{cracky=3},
{"default_cobble.png"},
"Cobble Column",
@ -596,7 +643,8 @@ columnia.register_column_ia("cobble", "default:cobble",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("brick", "default:brick",
columnia.register_column_ia(
"brick", "default:brick",
{cracky=3},
{"default_brick.png"},
"Brick Column",
@ -608,7 +656,8 @@ columnia.register_column_ia("brick", "default:brick",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("sandstone", "default:sandstone",
columnia.register_column_ia(
"sandstone", "default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
"Sandstone Column",
@ -620,7 +669,8 @@ columnia.register_column_ia("sandstone", "default:sandstone",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("sandstonebrick", "default:sandstonebrick",
columnia.register_column_ia(
"sandstonebrick", "default:sandstonebrick",
{crumbly=2,cracky=2},
{"default_sandstone_brick.png"},
"Sandstone Brick Column",
@ -632,7 +682,8 @@ columnia.register_column_ia("sandstonebrick", "default:sandstonebrick",
default.node_sound_stone_defaults()
)
columnia.register_column_ia("wood", "default:wood",
columnia.register_column_ia(
"wood", "default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{"default_wood.png"},
"Wooden Column",
@ -643,7 +694,8 @@ columnia.register_column_ia("wood", "default:wood",
"Wooden Column Linkdown",
default.node_sound_wood_defaults())
columnia.register_column_ia("junglewood", "default:junglewood",
columnia.register_column_ia(
"junglewood", "default:junglewood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{"default_junglewood.png"},
"Junglewood Column",
@ -654,7 +706,8 @@ columnia.register_column_ia("junglewood", "default:junglewood",
"Junglewood Column Linkdown",
default.node_sound_wood_defaults())
columnia.register_column_ia("pinewood", "default:pine_wood",
columnia.register_column_ia(
"pinewood", "default:pine_wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{"default_pine_wood.png"},
"Pinewood Column",
@ -681,7 +734,8 @@ if core.get_modpath( 'moretrees' ) then
}
for _,t in pairs( morewood ) do
print('register: '.. t.name)
columnia.register_column_ia( t.name, 'moretrees:' .. t.name ..'_planks',
columnia.register_column_ia(
t.name, 'moretrees:' .. t.name ..'_planks',
{snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{ 'moretrees_' .. t.name .. '_wood.png' },
t.description .. ' Column',