diff --git a/compacting-storage.lua b/compacting-storage.lua index 2d60707..1b5d36d 100644 --- a/compacting-storage.lua +++ b/compacting-storage.lua @@ -69,9 +69,8 @@ function request (item_type, conversion_type) end function request_multiple (item_type, conversion_type, count) - if count < 1 then return end - if count == 1 then - return request(item_type, conversion_type) + if count < 1 then + return else request(item_type, conversion_type) os.sleep(1) @@ -105,6 +104,7 @@ function fill (type, src, dest, amount) num_requests = math.ceil(amount / AMOUNT_RETURNED) end end + if conversion == nil then return end print(("Converting %d %s %ss to %ss"):format(amount, type, src, dest)) request_multiple(type, conversion, num_requests) end