Fix gates drop bug reported by kaeza and Kacey, avoid polluting the global namespace.

This commit is contained in:
Anthony Zhang 2013-01-06 14:09:54 -05:00
parent ec07fc27d7
commit 17579a6aa1
1 changed files with 2 additions and 0 deletions

View File

@ -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}