use sylpheed_formats::{game_data as gd, PakArchive};
fn main(){
    let disc=std::env::var("SYLPHEED_DISC").unwrap();
    let pak=PakArchive::open(format!("{disc}/dat/GP_HANGAR_ARSENAL.pak")).unwrap();
    let rosters=gd::load_pilot_rosters(&pak);
    // distinct rosters by their pilot set
    let mut seen=std::collections::BTreeSet::new(); let mut shown=0;
    println!("{} pilot-roster configs; distinct line-ups:", rosters.len());
    for r in &rosters{
        let key:String=r.pilots.iter().map(|(c,p)|format!("{c}:{p}")).collect::<Vec<_>>().join(",");
        if seen.insert(key) && shown<8 {
            shown+=1;
            let flt:Vec<String>=r.pilots.iter().map(|(c,p)|format!("{c}={p}")).collect();
            println!("  {}", flt.join("  "));
        }
    }
}
