Add conditional
This commit is contained in:
parent
8129f039cd
commit
946d96a6af
@ -5,7 +5,8 @@ function placeBreeder()
|
||||
breeder = peripheral.wrap('top')
|
||||
-- First, we nab the new chicken in slot 1
|
||||
turtle.select(1)
|
||||
turtle.suckUp()
|
||||
-- Check to see if this iteration obtained a new chicken
|
||||
if turtle.suckUp() then
|
||||
-- Then, we destroy the breeder
|
||||
turtle.select(2)
|
||||
turtle.digUp()
|
||||
@ -18,6 +19,11 @@ function placeBreeder()
|
||||
-- In any case, discarding 1 item in slot 2 will eliminate poor genes
|
||||
--turtle.select(2) -- Unnecessary due to previous instr
|
||||
turtle.dropDown(1)
|
||||
else
|
||||
-- Just pop the breeder for consistency
|
||||
turtle.select(2)
|
||||
turtle.digUp()
|
||||
end
|
||||
-- Now we re set-up the breeder
|
||||
selectItem('chickens:breeder')
|
||||
turtle.placeUp()
|
||||
|
Loading…
Reference in New Issue
Block a user