aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-12 07:39:24 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-11-12 07:39:24 +0300
commit3d54477c089168c7ec788d0e26c4276a4c24f96d (patch)
tree1ca6bca6afe0b7c82cd168b837e70da1724714b8
parent8793465132dea466edd62309bd35bfd62a6583e5 (diff)
downloadglass_stained-3d54477c089168c7ec788d0e26c4276a4c24f96d.zip
glass_stained-3d54477c089168c7ec788d0e26c4276a4c24f96d.tar.gz
glass_stained-3d54477c089168c7ec788d0e26c4276a4c24f96d.tar.bz2
formatting cleanupHEADmaster
-rw-r--r--init.lua246
1 files changed, 138 insertions, 108 deletions
diff --git a/init.lua b/init.lua
index 3425fa1..5fe1955 100644
--- a/init.lua
+++ b/init.lua
@@ -1,8 +1,10 @@
local default_yield = 3
local node_list = {
+
-- GLASS PANES-----------------------------------------------------
- { name = "glass_normal",
+ {
+ name = "glass_normal",
description = "Normal Glass",
tiles = {"default_glass.png"},
recipe = {
@@ -12,7 +14,8 @@ local node_list = {
},
yield = 8,
},
- { name = "obsidian_glass_normal",
+ {
+ name = "obsidian_glass_normal",
description = "Normal Obsidian Glass",
tiles = {"default_obsidian_glass.png"},
recipe = {
@@ -24,7 +27,8 @@ local node_list = {
},
-- STEEL BARS -----------------------------------------------------
- { name = "steel_bars_normal",
+ {
+ name = "steel_bars_normal",
description = "Normal Steel Bars",
tiles = {"xpanes_bar.png"},
recipe = {
@@ -34,7 +38,8 @@ local node_list = {
},
yield = 8,
},
- { name = "steel_bars_fancy",
+ {
+ name = "steel_bars_fancy",
description = "Fancy Steel Bars",
tiles = {"xpanes_bar_fancy.png"},
recipe = {
@@ -47,172 +52,196 @@ local node_list = {
},
-- STAINED GLASS --------------------------------------------------
- { name = "glass_number_one",
+ {
+ name = "glass_number_one",
description = "Stained Glass Type 1",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_one.png",
- "glass_number_one.png"},
+ "glass_number_one.png"
+ },
recipe = {
- {"dye:blue","dye:blue","dye:blue",},
- {"dye:blue","default:glass","dye:blue",},
- {"dye:blue","dye:blue","dye:blue",},
+ {"dye:blue", "dye:blue", "dye:blue"},
+ {"dye:blue", "default:glass", "dye:blue"},
+ {"dye:blue", "dye:blue", "dye:blue"},
},
},
- { name = "glass_number_two",
+ {
+ name = "glass_number_two",
description = "Stained Glass Type 2",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_two.png",
- "glass_number_two.png"},
+ "glass_number_two.png"
+ },
recipe = {
- {"dye:white","dye:blue","dye:white",},
- {"dye:red","default:glass","dye:red",},
- {"dye:white","dye:blue","dye:white",},
+ {"dye:white", "dye:blue", "dye:white"},
+ {"dye:red", "default:glass", "dye:red"},
+ {"dye:white", "dye:blue", "dye:white"},
},
},
- { name = "glass_number_three",
+ {
+ name = "glass_number_three",
description = "Stained Glass Type 3",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_three.png",
- "glass_number_three.png"},
+ "glass_number_three.png"
+ },
recipe = {
- {"dye:blue","dye:yellow","dye:blue",},
- {"dye:blue","default:glass","dye:blue",},
- {"dye:blue","dye:yellow","dye:blue",},
+ {"dye:blue", "dye:yellow", "dye:blue"},
+ {"dye:blue", "default:glass", "dye:blue"},
+ {"dye:blue", "dye:yellow", "dye:blue"},
},
},
- { name = "glass_number_four",
+ {
+ name = "glass_number_four",
description = "Stained Glass Type 4",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_four.png",
- "glass_number_four.png"},
+ "glass_number_four.png"
+ },
recipe = {
- {"dye:red","dye:yellow","dye:red",},
- {"dye:red","default:glass","dye:red",},
- {"dye:red","dye:yellow","dye:red",},
+ {"dye:red", "dye:yellow", "dye:red"},
+ {"dye:red", "default:glass", "dye:red"},
+ {"dye:red", "dye:yellow", "dye:red"},
},
},
- { name = "glass_number_five",
+ {
+ name = "glass_number_five",
description = "Stained Glass Type 5",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_five.png",
- "glass_number_five.png"},
+ "glass_number_five.png"
+ },
recipe = {
- {"dye:red","dye:violet","dye:blue",},
- {"dye:violet","default:glass","dye:violet",},
- {"dye:blue","dye:violet","dye:red",},
+ {"dye:red", "dye:violet", "dye:blue"},
+ {"dye:violet", "default:glass", "dye:violet"},
+ {"dye:blue", "dye:violet", "dye:red"},
},
},
- { name = "glass_number_six",
+ {
+ name = "glass_number_six",
description = "Stained Glass Type 6",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_six.png",
- "glass_number_six.png"},
+ "glass_number_six.png"
+ },
recipe = {
- {"dye:blue","dye:violet","dye:blue",},
- {"dye:violet","default:glass","dye:violet",},
- {"dye:blue","dye:violet","dye:blue",},
+ {"dye:blue", "dye:violet", "dye:blue"},
+ {"dye:violet", "default:glass", "dye:violet"},
+ {"dye:blue", "dye:violet", "dye:blue"},
},
},
- { name = "glass_number_seven",
+ {
+ name = "glass_number_seven",
description = "Stained Glass Type 7",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_seven.png",
- "glass_number_seven.png"},
+ "glass_number_seven.png"
+ },
recipe = {
- {"dye:violet","dye:blue","dye:violet",},
- {"dye:red","default:glass","dye:red",},
- {"dye:violet","dye:blue","dye:violet",},
+ {"dye:violet", "dye:blue", "dye:violet"},
+ {"dye:red", "default:glass", "dye:red"},
+ {"dye:violet", "dye:blue", "dye:violet"},
},
},
- { name = "glass_number_eight",
+ {
+ name = "glass_number_eight",
description = "Stained Glass Type 8",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_eight.png",
- "glass_number_eight.png"},
+ "glass_number_eight.png"
+ },
recipe = {
- {"dye:yellow","dye:green","dye:yellow",},
- {"dye:blue","default:glass","dye:blue",},
- {"dye:yellow","dye:green","dye:yellow",},
+ {"dye:yellow", "dye:green", "dye:yellow"},
+ {"dye:blue", "default:glass", "dye:blue"},
+ {"dye:yellow", "dye:green", "dye:yellow"},
},
},
- { name = "glass_number_nine",
+ {
+ name = "glass_number_nine",
description = "Stained Glass Type 9",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_nine.png",
- "glass_number_nine.png"},
+ "glass_number_nine.png"
+ },
recipe = {
- {"dye:blue","dye:yellow","dye:blue",},
- {"dye:red","default:glass","dye:red",},
- {"dye:blue","dye:yellow","dye:blue",},
+ {"dye:blue", "dye:yellow", "dye:blue"},
+ {"dye:red", "default:glass", "dye:red"},
+ {"dye:blue", "dye:yellow", "dye:blue"},
},
},
- { name = "glass_number_ten",
+ {
+ name = "glass_number_ten",
description = "Stained Glass Type 10",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_ten.png",
- "glass_number_ten.png"},
+ "glass_number_ten.png"
+ },
recipe = {
- {"dye:green","dye:yellow","dye:green",},
- {"dye:cyan","default:glass","dye:cyan",},
- {"dye:green","dye:yellow","dye:green",},
+ {"dye:green", "dye:yellow", "dye:green"},
+ {"dye:cyan", "default:glass", "dye:cyan"},
+ {"dye:green", "dye:yellow", "dye:green"},
},
},
- { name = "glass_number_eleven",
+ {
+ name = "glass_number_eleven",
description = "Stained Glass Type 11",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_eleven.png",
- "glass_number_eleven.png"},
+ "glass_number_eleven.png"
+ },
recipe = {
- {"dye:blue","dye:green","dye:blue",},
- {"dye:green","default:glass","dye:green",},
- {"dye:blue","dye:green","dye:blue",},
+ {"dye:blue", "dye:green", "dye:blue"},
+ {"dye:green", "default:glass", "dye:green"},
+ {"dye:blue", "dye:green", "dye:blue"},
},
},
- { name = "glass_number_twelve",
+ {
+ name = "glass_number_twelve",
description = "Stained Glass Type 12",
tiles = {"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"default_glass_detail.png",
"glass_number_twelve.png",
- "glass_number_twelve.png"},
+ "glass_number_twelve.png"
+ },
recipe = {
- {"dye:yellow","dye:cyan","dye:yellow",},
- {"dye:cyan","default:glass","dye:cyan",},
- {"dye:yellow","dye:cyan","dye:yellow",},
+ {"dye:yellow", "dye:cyan", "dye:yellow"},
+ {"dye:cyan", "default:glass", "dye:cyan"},
+ {"dye:yellow", "dye:cyan", "dye:yellow"},
},
},
@@ -221,7 +250,6 @@ local node_list = {
for _,node in ipairs(node_list) do
-- Single 1x1 node
-
minetest.register_node("glass_stained:" .. node.name, {
description = node.description,
drawtype = "nodebox",
@@ -245,18 +273,19 @@ for _,node in ipairs(node_list) do
use_texture_alpha = true,
})
-
- minetest.register_craft({output = "glass_stained:" .. node.name .. " " .. (node.yield or default_yield),
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. " " .. (node.yield or default_yield),
recipe = node.recipe
})
+
-- It might be necessary to skip the multiple nodes (e.g. for top-only panes)
if node.no_derivatives then
goto eol
end
- -- Double pane: top is decorative and can noclip through some slopes and such
+ -- Double pane: top is decorative and can noclip through some slopes and such
minetest.register_node("glass_stained:" .. node.name .. "_double", {
description = node.description .. " Double",
drawtype = "nodebox",
@@ -280,23 +309,26 @@ for _,node in ipairs(node_list) do
use_texture_alpha = true,
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. "_double",
- recipe ={
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. "_double",
+ recipe = {
{"glass_stained:" .. node.name},
{"glass_stained:" .. node.name},
},
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. " 2",
- type = "shapeless",
- recipe ={ "glass_stained:" .. node.name .. "_double" }
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. " 2",
+ type = "shapeless",
+ recipe = { "glass_stained:" .. node.name .. "_double" }
})
- -- backwards compatible
- minetest.register_alias("glass_stained:" .. node.name .. "_top", "glass_stained:" .. node.name .. "_double")
+ -- Backwards compatibility
+ minetest.register_alias("glass_stained:" .. node.name .. "_top",
+ "glass_stained:" .. node.name .. "_double")
- -- Triple pane: top and right part are decorative
+ -- Triple pane: top and right part are decorative
minetest.register_node("glass_stained:" .. node.name .. "_triple", {
description = node.description .. " Triple",
drawtype = "nodebox",
@@ -304,7 +336,6 @@ for _,node in ipairs(node_list) do
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
-
node_box = {
type = "fixed",
fixed = {{-0.5, -0.5, 0, 0.5, 1.5, 0},
@@ -314,26 +345,26 @@ for _,node in ipairs(node_list) do
type = "fixed",
fixed = {{-0.5, -0.5, -0.25, 0.5, 0.5, 0.25}},
},
-
groups = { cracky = 3 },
use_texture_alpha = true,
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. "_triple",
- recipe ={
- {"glass_stained:" .. node.name,""},
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,},
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. "_triple",
+ recipe = {
+ {"glass_stained:" .. node.name, ""},
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name,},
},
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. " 3",
- type = "shapeless",
- recipe ={ "glass_stained:" .. node.name .. "_triple" }
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. " 3",
+ type = "shapeless",
+ recipe = { "glass_stained:" .. node.name .. "_triple" }
})
-- Quadruple pane: all parts save for bottom left are decorative
-
minetest.register_node("glass_stained:" .. node.name .. "_quadruple", {
description = node.description .. " Quadruple",
drawtype = "nodebox",
@@ -341,7 +372,6 @@ for _,node in ipairs(node_list) do
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
-
node_box = {
type = "fixed",
fixed = {{-0.5, -0.5, 0, 1.5, 1.5, 0}},
@@ -350,26 +380,26 @@ for _,node in ipairs(node_list) do
type = "fixed",
fixed = {{-0.5, -0.5, -0.25, 0.5, 0.5, 0.25}},
},
-
groups = { cracky = 3 },
use_texture_alpha = true,
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. "_quadruple",
- recipe ={
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,},
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,},
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. "_quadruple",
+ recipe = {
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name,},
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name,},
},
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. " 4",
- type = "shapeless",
- recipe ={ "glass_stained:" .. node.name .. "_quadruple" }
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. " 4",
+ type = "shapeless",
+ recipe = { "glass_stained:" .. node.name .. "_quadruple" }
})
-- Noncuple pane: 3x3, all parts save for the center are decorative
-
minetest.register_node("glass_stained:" .. node.name .. "_noncuple", {
description = node.description .. " Noncuple",
drawtype = "nodebox",
@@ -377,7 +407,6 @@ for _,node in ipairs(node_list) do
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
-
node_box = {
type = "fixed",
fixed = {{-1.5, -1.5, 0, 1.5, 1.5, 0}},
@@ -386,22 +415,23 @@ for _,node in ipairs(node_list) do
type = "fixed",
fixed = {{-0.5, -0.5, -0.25, 0.5, 0.5, 0.25}},
},
-
groups = { cracky = 3 },
use_texture_alpha = true,
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. "_noncuple",
- recipe ={
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,"glass_stained:" .. node.name},
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,"glass_stained:" .. node.name},
- {"glass_stained:" .. node.name,"glass_stained:" .. node.name,"glass_stained:" .. node.name},
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. "_noncuple",
+ recipe = {
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name, "glass_stained:" .. node.name},
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name, "glass_stained:" .. node.name},
+ {"glass_stained:" .. node.name, "glass_stained:" .. node.name, "glass_stained:" .. node.name},
},
})
- minetest.register_craft({output = "glass_stained:" .. node.name .. " 9",
- type = "shapeless",
- recipe ={ "glass_stained:" .. node.name .. "_noncuple" }
+ minetest.register_craft({
+ output = "glass_stained:" .. node.name .. " 9",
+ type = "shapeless",
+ recipe = { "glass_stained:" .. node.name .. "_noncuple" }
})
@@ -412,10 +442,10 @@ end
-- A properly connecting xpanes alternative
xpanes.register_pane("bar_top", {
description = "Iron bar fancy top",
- textures = {"xpanes_bar_fancy.png","xpanes_bar_fancy.png","default_glass_detail.png"},
+ textures = {"xpanes_bar_fancy.png", "xpanes_bar_fancy.png", "default_glass_detail.png"},
inventory_image = "xpanes_bar_fancy.png",
wield_image = "xpanes_bar_fancy.png",
- groups = {cracky=2},
+ groups = { cracky = 2 },
sounds = default.node_sound_metal_defaults(),
recipe = {
{"", "default:steel_ingot", ""},