[2.0.11] LuaItemStack.set_stack lacks quality adjustment
Posted: Sun Oct 27, 2024 7:00 pm
In my mod i want to do this:
But the parameter quality has no effect, i guess since https://lua-api.factorio.com/2.0.8/clas ... ml#quality is readonly.
But how do i create a new stack of items with the desired quality? At the moment i see no way.
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.