1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Allow loading invalid zone IDs

This commit is contained in:
Joshua Goins 2025-06-21 19:01:44 -04:00
parent 37cdde3703
commit 0cdd20fb50

View file

@ -28,7 +28,10 @@ impl Zone {
}; };
let sheet = TerritoryTypeSheet::read_from(game_data, Language::None).unwrap(); let sheet = TerritoryTypeSheet::read_from(game_data, Language::None).unwrap();
let row = sheet.get_row(id as u32).unwrap(); let Some(row) = sheet.get_row(id as u32) else {
tracing::warn!("Invalid zone id {id}, allowing anyway...");
return zone;
};
// e.g. ffxiv/fst_f1/fld/f1f3/level/f1f3 // e.g. ffxiv/fst_f1/fld/f1f3/level/f1f3
let bg_path = row.Bg().into_string().unwrap(); let bg_path = row.Bg().into_string().unwrap();