diff options
author | Bardur Arantsson <bardur@scientician.net> | 2010-05-04 20:08:52 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2010-05-04 20:08:52 +0200 |
commit | 09199895acfc58c1fe04757173749fb052a2402b (patch) | |
tree | 33054deafba93d4000d3b3db9c75496a68aacbbb /lib | |
parent | f0237b2a4190f8ec8e2ced8e488e5bfaa40af50f (diff) |
Make it possible to create "inventory" and "equipment" rules from the user interface. Thanks to morchant for the fix.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/auto.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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) -- <rule> and <not> 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> and <or> 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]() |