mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00
Emit better warnings when loading LGB files
Now the "Loading XYZ.lgb" message only shows up *if* we find the file, and if it fails to parse then we tell people to report it to us. See #35
This commit is contained in:
parent
347a12a1b5
commit
9405714e56
1 changed files with 6 additions and 2 deletions
|
@ -39,9 +39,13 @@ impl Zone {
|
|||
|
||||
let mut load_lgb = |name: &str| -> Option<LayerGroup> {
|
||||
let path = format!("bg/{}/level/{}.lgb", &bg_path[..level_index], name);
|
||||
let lgb_file = game_data.extract(&path)?;
|
||||
tracing::info!("Loading {path}");
|
||||
let lgb = game_data.extract(&path)?;
|
||||
LayerGroup::from_existing(&lgb)
|
||||
let lgb = LayerGroup::from_existing(&lgb_file);
|
||||
if lgb.is_none() {
|
||||
tracing::warn!("Failed to parse {path}, this is most likely a bug in Physis and should be reported somewhere!")
|
||||
}
|
||||
lgb
|
||||
};
|
||||
|
||||
zone.planevent = load_lgb("planevent");
|
||||
|
|
Loading…
Add table
Reference in a new issue