milo: sounds

This commit is contained in:
kepler155c
2018-11-26 17:10:39 -05:00
parent 427006d2cb
commit 4833f7f12b
2 changed files with 14 additions and 2 deletions

View File

@@ -9,7 +9,9 @@ local os = _G.os
local turtle = _G.turtle
local args = { ... }
local mobType = args[1] or error('Syntax: attack <mob name>')
local mobType = args[1] or error('Syntax: attack <mob names>')
local mobTypes = Util.transpose(args)
local Runners = {
Cow = true,
@@ -94,7 +96,7 @@ end
while true do
local blocks = sensor.sense()
local mobs = Util.filterInplace(blocks, function(b)
if b.name == mobType then
if mobTypes[b.name] then
normalize(b)
return true
end