Code: Select all
local stacksize = entity.cursor_stack.count --record amount
local old_quality = entity.cursor_stack.quality --record quality
entity.cursor_stack.clear() --clear the slot
entity.cursor_stack.set_stack({ name = "alien-hyper-module-" .. math.min(storage.currentmodulelevel[forceName], 100), count = stacksize, quality = old_quality })
But how do i create a new stack of items with the desired quality? At the moment i see no way.