diff options
author | Bardur Arantsson <bardur@scientician.net> | 2010-01-12 08:27:55 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2010-01-12 08:27:55 +0100 |
commit | e809d2fe548a0dad3c005fd3c7805446cefd138d (patch) | |
tree | a1a963aa9401614b26ce0c40887e6e6581aee00e /lib/core/xml.lua | |
parent | 7d264acf35b2899a16040690a1d248b2999617c9 (diff) |
Import Killerbunnies patch: Two new automatizer rules types <inventory> and /equipment> for checking whether an object is in your inventory (equipment respectively).
Diffstat (limited to 'lib/core/xml.lua')
-rw-r--r-- | lib/core/xml.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/core/xml.lua b/lib/core/xml.lua index f1188d51..14f0511f 100644 --- a/lib/core/xml.lua +++ b/lib/core/xml.lua @@ -173,6 +173,34 @@ function xml:english_xml(t, tab, not_flag) nextlevel = tab end children_not_flag = not nil + elseif t.label == "inventory" then + if not_flag then + xml.write(TERM_WHITE, tab) + xml.write(ecol, "Nothing in your ") + xml.write(bcol, "inventory") + xml.write(ecol, " matches the following:") + xml.write(TERM_WHITE, "\n") + else + xml.write(TERM_WHITE, tab) + xml.write(ecol, "Something in your ") + xml.write(bcol, "inventory") + xml.write(ecol, " matches the following:") + xml.write(TERM_WHITE, "\n") + end + elseif t.label == "equipment" then + if not_flag then + xml.write(TERM_WHITE, tab) + xml.write(ecol, "Nothing in your ") + xml.write(bcol, "equipment") + xml.write(ecol, " matches the following:") + xml.write(TERM_WHITE, "\n") + else + xml.write(TERM_WHITE, tab) + xml.write(ecol, "Something in your ") + xml.write(bcol, "equipment") + xml.write(ecol, " matches the following:") + xml.write(TERM_WHITE, "\n") + end elseif t.label == "comment" then xml.write(TERM_WHITE, tab) xml.write(TERM_WHITE, "(" .. t[1] .. ")") |