We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7415036 commit c2e3d7cCopy full SHA for c2e3d7c
mesecons_delayer/init.lua
@@ -47,7 +47,8 @@ elseif i == 2 then delaytime = 0.3
47
elseif i == 3 then delaytime = 0.5
48
elseif i == 4 then delaytime = 1.0 end
49
50
-boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
+local boxes = {
51
+ { -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
52
53
{ -2/16, -7/16, -4/16, 2/16, -26/64, -3/16 }, -- the jeweled "on" indicator
54
{ -3/16, -7/16, -3/16, 3/16, -26/64, -2/16 },
@@ -57,7 +58,8 @@ boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
57
58
59
{ -6/16, -7/16, -6/16, -4/16, -27/64, -4/16 }, -- the timer indicator
60
{ -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs
- { 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }}
61
+ { 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }
62
+}
63
64
minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), {
65
description = "Delayer",
mesecons_extrawires/crossover.lua
@@ -1,4 +1,4 @@
1
-function crossover_get_rules(node)
+local function crossover_get_rules(node)
2
return {
3
{--first wire
4
{x=-1,y=0,z=0},
mesecons_gates/init.lua
@@ -54,7 +54,7 @@ local function update_gate(pos, node, link, newstate)
end
55
56
-function register_gate(name, inputnumber, assess, recipe)
+local function register_gate(name, inputnumber, assess, recipe)
local get_inputrules = inputnumber == 2 and gate_get_input_rules_twoinputs or
gate_get_input_rules_oneinput
local description = "Mesecons Logic Gate: "..name
mesecons_insulated/init.lua
-function insulated_wire_get_rules(node)
+local function insulated_wire_get_rules(node)
local rules = {{x = 1, y = 0, z = 0},
{x =-1, y = 0, z = 0}}
if node.param2 == 1 or node.param2 == 3 then
mesecons_lamp/init.lua
@@ -2,7 +2,7 @@
-- A lamp is "is an electrical device used to create artificial light" (wikipedia)
-- guess what?
5
-mesecon_lamp_box = {
+local mesecon_lamp_box = {
6
type = "wallmounted",
7
wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125},
8
wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
mesecons_pistons/init.lua
@@ -1,52 +1,55 @@
-- Get mesecon rules of pistons
-piston_rules =
-{{x=0, y=0, z=1}, --everything apart from z- (pusher side)
+local piston_rules = {
+ {x=0, y=0, z=1}, --everything apart from z- (pusher side)
{x=1, y=0, z=0},
{x=-1, y=0, z=0},
{x=1, y=1, z=0},
{x=1, y=-1, z=0},
{x=-1, y=1, z=0},
9
{x=-1, y=-1, z=0},
10
{x=0, y=1, z=1},
11
- {x=0, y=-1, z=1}}
+ {x=0, y=-1, z=1}
12
13
-local piston_up_rules =
14
-{{x=0, y=0, z=-1}, --everything apart from y+ (pusher side)
+local piston_up_rules = {
15
+ {x=0, y=0, z=-1}, --everything apart from y+ (pusher side)
16
17
18
{x=0, y=0, z=1},
19
20
21
{x=0, y=-1, z=1},
- {x=0, y=-1, z=-1}}
22
+ {x=0, y=-1, z=-1}
23
24
-local piston_down_rules =
-{{x=0, y=0, z=-1}, --everything apart from y- (pusher side)
25
+local piston_down_rules = {
26
+ {x=0, y=0, z=-1}, --everything apart from y- (pusher side)
27
28
29
30
31
32
- {x=0, y=1, z=-1}}
33
+ {x=0, y=1, z=-1}
34
35
-local piston_get_rules = function (node)
36
+local function piston_get_rules(node)
37
local rules = piston_rules
38
for i = 1, node.param2 do
39
rules = mesecon.rotate_rules_left(rules)
40
41
return rules
42
43
-piston_facedir_direction = function (node)
44
+local function piston_facedir_direction(node)
45
local rules = {{x = 0, y = 0, z = -1}}
46
return rules[1]
-piston_get_direction = function(dir, node)
+local function piston_get_direction(dir, node)
if type(dir) == "function" then
return dir(node)
else
mesecons_pressureplates/init.lua
@@ -8,7 +8,7 @@ local pp_box_on = {
fixed = { -7/16, -8/16, -7/16, 7/16, -7.5/16, 7/16 },
}
-pp_on_timer = function (pos, elapsed)
+local function pp_on_timer(pos, elapsed)
local node = minetest.get_node(pos)
local basename = minetest.registered_nodes[node.name].pressureplate_basename
mesecons_wires/init.lua
@@ -140,7 +140,7 @@ nid_inc = function (nid)
140
return i <= 8
141
142
143
-register_wires = function()
+local function register_wires()
144
local nid = {}
145
while true do
146
-- Create group specifiction and nodeid string (see note above for details)
Thank you 😌 !
1 commit comments
Jeija commentedon Jan 15, 2017
Thank you 😌 !