From 17579a6aa139d306780bcb2556b74dde667c0697 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Sun, 6 Jan 2013 14:09:54 -0500 Subject: [PATCH] Fix gates drop bug reported by kaeza and Kacey, avoid polluting the global namespace. --- mesecons_gates/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mesecons_gates/init.lua b/mesecons_gates/init.lua index dabefd5..f49da0b 100644 --- a/mesecons_gates/init.lua +++ b/mesecons_gates/init.lua @@ -98,6 +98,7 @@ gates = { {name = "and" , inputnumber = 2}, {name = "xor" , inputnumber = 2}} +local onoff, drop, nodename, description, groups for i, gate in ipairs(gates) do if gate.inputnumber == 1 then get_rules = gate_get_input_rules_oneinput @@ -114,6 +115,7 @@ for i, gate in ipairs(gates) do groups = {dig_immediate=2, not_in_creative_inventory=1} else onoff = "off" + drop = nil nodename = nodename.."_"..onoff description = gate.name.." Gate" groups = {dig_immediate=2}