select_pickup_point with quality

Place to get help with not working mods / modding interface.
Rim153153
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Apr 14, 2026 12:53 pm
Contact:

select_pickup_point with quality

Post by Rim153153 »

Hi. Could you help me? I created a function using
local pickup_point = select_pickup_point {name = name, position = self.position, include_buffers = true}
where name is "repair-pack" (repair-tool), and it doesn't work with quality. I looked in the documentation and tried this:
local quality = prototypes.quality["uncommon"]
local pickup_point = select_pickup_point {name = {name = name, quality=quality}, position = self.position, include_buffers = true}
but it doesn't work.
Can you tell me how I can make select_pickup_point work so that it returns repair packs with a higher quality than normal ones?
Rim153153
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Apr 14, 2026 12:53 pm
Contact:

Re: select_pickup_point with quality

Post by Rim153153 »

Sorry, my bad. The error was elsewhere. I also needed to specify the quality in owner_inventory.find_item_stack() further down the code.
As a result, this line works correctly:
local pickup_point = select_pickup_point {name = {name = "repair-pack", quality = "uncommon"}, position = self.position, include_buffers = true}
Post Reply

Return to “Modding help”