From 09199895acfc58c1fe04757173749fb052a2402b Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 4 May 2010 20:08:52 +0200 Subject: Make it possible to create "inventory" and "equipment" rules from the user interface. Thanks to morchant for the fix. --- lib/core/auto.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/auto.lua b/lib/core/auto.lua index ba613664..b758db52 100644 --- a/lib/core/auto.lua +++ b/lib/core/auto.lua @@ -810,9 +810,11 @@ end function auto_aux:add_child(sel) -- and contain only one match if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "not") and auto_aux.rule[1] then return end + if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "equipment") and auto_aux.rule[1] then return end + if (auto_aux.rule.label == "rule" or auto_aux.rule.label == "inventory") and auto_aux.rule[1] then return end -- Only and can contain - if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or" and auto_aux.rule.label ~= "not" then return end + if auto_aux.rule.label ~= "rule" and auto_aux.rule.label ~= "and" and auto_aux.rule.label ~= "or" and auto_aux.rule.label ~= "not" and auto_aux.rule.label ~= "equipment" and auto_aux.rule.label ~= "inventory" then return end -- get it local r = auto_aux.types_desc[sel][3]() -- cgit v1.2.3