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?
select_pickup_point with quality
Re: select_pickup_point with quality
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}
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}
