Skip to main content

pick_item

Function pick_item 

Source
fn pick_item<'a>(
    items: &'a [ItemDataFlat],
    token: &str,
    rank: u8,
) -> Option<&'a ItemDataFlat>
Expand description

Pick the item for token at crafting-quality rank: exact tokenized-name matches win over the shortest containing name; same-named rank variants order by item level (rank 1 = lowest), with rank clamped to the available variants.