From fceb99af0bd573a260ad785c309f7a036752c012 Mon Sep 17 00:00:00 2001 From: Kan18 <24967425+Kan18@users.noreply.github.com> Date: Sun, 16 Apr 2023 14:45:45 -0400 Subject: [PATCH] speed up imports by 100x --- milo/apis/storage.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/milo/apis/storage.lua b/milo/apis/storage.lua index 20b4acd..7ae8edf 100644 --- a/milo/apis/storage.lua +++ b/milo/apis/storage.lua @@ -670,6 +670,8 @@ function Storage:import(source, slot, count, item) item = entry local function insert(adapter) + if adapter.__used and adapter.__size and adapter.__used == adapter.__size then return 0 end + local amount = rawInsert(adapter, source.adapter, slot, count) if amount > 0 then