pub fn distribute(
storages: &mut [Storage],
materials: &[RawMaterial],
candidates: &[usize],
mask: u32,
cap: i32,
)Expand description
Hand out up to cap single units of the candidates matching mask, round-robin over the
candidates and one unit per storage per pass, until the cap is reached or a pass adds nothing.
Original: FUN_140096b30.