Skip to content

Commit 373f66a

Browse files
committed
Removed redundant Inventory - clears
1 parent ef67895 commit 373f66a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

builder-lib.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ function Builder_Lib:clearArea(length, width, height)
138138
upDownDig(currentHeight, height)
139139
turtleController:goStraight(1)
140140
end
141-
if manageSpace then
142-
if tResourceManager:manageSpace(10, filterFunc) == 3 then
141+
if manageSpace and tResourceManager:getFreeSlots() < 5 then
142+
if tResourceManager:manageSpace(12, filterFunc) == 3 then
143143
error("Errorhandling not finished, cound not pickup Chest!")
144144
end
145145
end

tests/clearArea_spec.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,6 @@ describe("Testing ClearArea Function", function()
243243
assert.are.equal(0,m)
244244
assert.are.same("minecraft:coal", turtle.getItemDetail(1).name)
245245
assert.are.same("minecraft:stone", turtle.getItemDetail(2).name) -- only does the last Line without clearing inventory
246-
assert.are.same(nil, turtle.getItemDetail(3))
247-
assert.are.same("minecraft:dirt", turtle.getItemDetail(14).name)
248246
end)
249247

250248
end)

0 commit comments

Comments
 (0)