From 5cf765b2f19ef9bf443178e26787fe16233b3f4c Mon Sep 17 00:00:00 2001 From: ShadowNinja <shadowninja@minetest.net> Date: Tue, 17 Dec 2013 19:56:37 +0100 Subject: [PATCH] Localize most variables --- technic/machines/other/constructor.lua | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/technic/machines/other/constructor.lua b/technic/machines/other/constructor.lua index f4f541f..1210c5b 100644 --- a/technic/machines/other/constructor.lua +++ b/technic/machines/other/constructor.lua @@ -21,7 +21,7 @@ }) -mk1_on = function(pos, node) +local function mk1_on(pos, node) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local pos1={} @@ -41,7 +41,7 @@ end end -mk1_off = function(pos, node) +local function mk1_off(pos, node) if node.name == "technic:constructor_mk1_on" then technic.swap_node(pos,"technic:constructor_mk1_off") nodeupdate(pos) @@ -97,7 +97,7 @@ --Constructor Mk2 -mk2_on = function(pos, node) +local function mk2_on(pos, node) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() local pos1={} @@ -123,7 +123,7 @@ end end -mk2_off = function(pos, node) +local function mk2_off(pos, node) if node.name == "technic:constructor_mk2_on" then technic.swap_node(pos,"technic:constructor_mk2_off") nodeupdate(pos) @@ -181,7 +181,7 @@ -- Constructor Mk3 -mk3_on = function(pos, node) +local function mk3_on(pos, node) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() @@ -225,7 +225,7 @@ end end -mk3_off = function(pos, node) +local function mk3_off(pos, node) if node.name == "technic:constructor_mk3_on" then technic.swap_node(pos,"technic:constructor_mk3_off") nodeupdate(pos) @@ -289,7 +289,7 @@ }) -deploy_node =function (inv, slot_name, pos1, node1, node) +local function deploy_node(inv, slot_name, pos1, node1, node) if node1.name == "air" then if not inv:is_empty(slot_name) then stack1=inv:get_list(slot_name) -- Gitblit v1.8.0