Created
October 24, 2020 08:43
-
-
Save zigdon/5fd90dada4ff9d67251eb8d34fb6505b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
me = components.me_interface | |
craftables = me.getCraftables() | |
print("Found " .. craftables.n .. " patterns.") | |
matches = {} | |
for word in arg do | |
for k, v in pairs(craftables) do | |
info = v.getItemStack() | |
label = info.label | |
name = info.name | |
if string.find(info .. "/" .. name, word) then | |
table.insert(matches, info) | |
end | |
end | |
craftables = matches | |
end | |
print("Found " .. matches.n .. " matches.") | |
for k, v in pairs(matches) do | |
info = v.getItemStack() | |
print(info.label .. ": " .. info.name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment