Skip to content

Commit 3e5f3f2

Browse files
committedMay 23, 2016
Vessels: Improve code style
1 parent d8daee7 commit 3e5f3f2

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed
 

‎mods/vessels/init.lua

+30-31
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
-- See README.txt for licensing and other information.
33

44
local vessels_shelf_formspec =
5-
"size[8,7;]"..
6-
default.gui_bg..
7-
default.gui_bg_img..
8-
default.gui_slots..
9-
"list[context;vessels;0,0.3;8,2;]"..
10-
"list[current_player;main;0,2.85;8,1;]"..
11-
"list[current_player;main;0,4.08;8,3;8]"..
12-
"listring[context;vessels]"..
13-
"listring[current_player;main]"..
14-
default.get_hotbar_bg(0,2.85)
5+
"size[8,7;]" ..
6+
default.gui_bg ..
7+
default.gui_bg_img ..
8+
default.gui_slots ..
9+
"list[context;vessels;0,0.3;8,2;]" ..
10+
"list[current_player;main;0,2.85;8,1;]" ..
11+
"list[current_player;main;0,4.08;8,3;8]" ..
12+
"listring[context;vessels]" ..
13+
"listring[current_player;main]" ..
14+
default.get_hotbar_bg(0, 2.85)
1515

1616
minetest.register_node("vessels:shelf", {
17-
description = "Vessels shelf",
17+
description = "Vessels Shelf",
1818
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
1919
"default_wood.png", "vessels_shelf.png", "vessels_shelf.png"},
2020
paramtype2 = "facedir",
2121
is_ground_content = false,
22-
groups = {choppy=3,oddly_breakable_by_hand=2,flammable=3},
22+
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2323
sounds = default.node_sound_wood_defaults(),
2424

2525
on_construct = function(pos)
@@ -53,18 +53,18 @@ minetest.register_node("vessels:shelf", {
5353
on_blast = function(pos)
5454
local drops = {}
5555
default.get_inventory_drops(pos, "vessels", drops)
56-
drops[#drops+1] = "vessels:shelf"
56+
drops[#drops + 1] = "vessels:shelf"
5757
minetest.remove_node(pos)
5858
return drops
5959
end,
6060
})
6161

6262
minetest.register_craft({
63-
output = 'vessels:shelf',
63+
output = "vessels:shelf",
6464
recipe = {
65-
{'group:wood', 'group:wood', 'group:wood'},
66-
{'group:vessel', 'group:vessel', 'group:vessel'},
67-
{'group:wood', 'group:wood', 'group:wood'},
65+
{"group:wood", "group:wood", "group:wood"},
66+
{"group:vessel", "group:vessel", "group:vessel"},
67+
{"group:wood", "group:wood", "group:wood"},
6868
}
6969
})
7070

@@ -81,16 +81,16 @@ minetest.register_node("vessels:glass_bottle", {
8181
type = "fixed",
8282
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
8383
},
84-
groups = {vessel=1,dig_immediate=3,attached_node=1},
84+
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
8585
sounds = default.node_sound_glass_defaults(),
8686
})
8787

8888
minetest.register_craft( {
8989
output = "vessels:glass_bottle 10",
9090
recipe = {
91-
{ "default:glass", "", "default:glass" },
92-
{ "default:glass", "", "default:glass" },
93-
{ "", "default:glass", "" }
91+
{"default:glass", "", "default:glass"},
92+
{"default:glass", "", "default:glass"},
93+
{"", "default:glass", ""}
9494
}
9595
})
9696

@@ -107,16 +107,16 @@ minetest.register_node("vessels:drinking_glass", {
107107
type = "fixed",
108108
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
109109
},
110-
groups = {vessel=1,dig_immediate=3,attached_node=1},
110+
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
111111
sounds = default.node_sound_glass_defaults(),
112112
})
113113

114114
minetest.register_craft( {
115115
output = "vessels:drinking_glass 14",
116116
recipe = {
117-
{ "default:glass", "", "default:glass" },
118-
{ "default:glass", "", "default:glass" },
119-
{ "default:glass", "default:glass", "default:glass" }
117+
{"default:glass", "", "default:glass"},
118+
{"default:glass", "", "default:glass"},
119+
{"default:glass", "default:glass", "default:glass"}
120120
}
121121
})
122122

@@ -133,21 +133,21 @@ minetest.register_node("vessels:steel_bottle", {
133133
type = "fixed",
134134
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
135135
},
136-
groups = {vessel=1,dig_immediate=3,attached_node=1},
136+
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
137137
sounds = default.node_sound_defaults(),
138138
})
139139

140140
minetest.register_craft( {
141141
output = "vessels:steel_bottle 5",
142142
recipe = {
143-
{ "default:steel_ingot", "", "default:steel_ingot" },
144-
{ "default:steel_ingot", "", "default:steel_ingot" },
145-
{ "", "default:steel_ingot", "" }
143+
{"default:steel_ingot", "", "default:steel_ingot"},
144+
{"default:steel_ingot", "", "default:steel_ingot"},
145+
{"", "default:steel_ingot", ""}
146146
}
147147
})
148148

149149

150-
-- Make sure we can recycle them
150+
-- Glass and steel recycling
151151

152152
minetest.register_craftitem("vessels:glass_fragments", {
153153
description = "Pile of Glass Fragments",
@@ -183,4 +183,3 @@ minetest.register_craft( {
183183
output = "default:steel_ingot",
184184
recipe = "vessels:steel_bottle",
185185
})
186-

0 commit comments

Comments
 (0)
Please sign in to comment.