Merge pull request #35 from CosmicConveyor/master
Fixed Gravel Sieve bug
This commit is contained in:
commit
176aa758ce
@ -75,20 +75,22 @@ end
|
|||||||
|
|
||||||
local function sieving(pos, crd, nvm, inv)
|
local function sieving(pos, crd, nvm, inv)
|
||||||
local src, dst
|
local src, dst
|
||||||
if inv:contains_item("src", ItemStack("techage:basalt_gravel")) then
|
for i = 1, crd.num_items do
|
||||||
dst, src = get_random_basalt_ore(), ItemStack("techage:basalt_gravel")
|
if inv:contains_item("src", ItemStack("techage:basalt_gravel")) then
|
||||||
elseif inv:contains_item("src", ItemStack("default:gravel")) then
|
dst, src = get_random_basalt_ore(), ItemStack("techage:basalt_gravel")
|
||||||
dst, src = get_random_gravel_ore(), ItemStack("default:gravel")
|
elseif inv:contains_item("src", ItemStack("default:gravel")) then
|
||||||
else
|
dst, src = get_random_gravel_ore(), ItemStack("default:gravel")
|
||||||
crd.State:idle(pos, nvm)
|
else
|
||||||
return
|
crd.State:idle(pos, nvm)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not inv:room_for_item("dst", dst) then
|
||||||
|
crd.State:idle(pos, nvm)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
inv:add_item("dst", dst)
|
||||||
|
inv:remove_item("src", src)
|
||||||
end
|
end
|
||||||
if not inv:room_for_item("dst", dst) then
|
|
||||||
crd.State:idle(pos, nvm)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
inv:add_item("dst", dst)
|
|
||||||
inv:remove_item("src", src)
|
|
||||||
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user