summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-01-06 14:09:54 -0500
committerAnthony Zhang <azhang9@gmail.com>2013-01-06 14:09:54 -0500
commit17579a6aa139d306780bcb2556b74dde667c0697 (patch)
tree51d3e0dab0913306b2d68aaf562883e1fb89c300
parentec07fc27d7ef76114fd977283c36a20afe26f13f (diff)
downloadmesecons-17579a6aa139d306780bcb2556b74dde667c0697.tar
mesecons-17579a6aa139d306780bcb2556b74dde667c0697.tar.gz
mesecons-17579a6aa139d306780bcb2556b74dde667c0697.tar.bz2
mesecons-17579a6aa139d306780bcb2556b74dde667c0697.tar.xz
mesecons-17579a6aa139d306780bcb2556b74dde667c0697.zip
Fix gates drop bug reported by kaeza and Kacey, avoid polluting the global namespace.
-rw-r--r--mesecons_gates/init.lua2
1 files changed, 2 insertions, 0 deletions
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}