1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-13 07:07:45 +00:00

Update to latest Physis Sheets API for error handling

This commit is contained in:
Joshua Goins 2025-05-09 18:11:18 -04:00
parent 99c92d1b67
commit df789b52c9
2 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -1028,7 +1028,7 @@ dependencies = [
[[package]] [[package]]
name = "physis-sheets" name = "physis-sheets"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/redstrate/PhysisSheets#1b746c17e8ae8abf4ac613165e63de9f047e567e" source = "git+https://github.com/redstrate/PhysisSheets#ca42d72fc8a76211d67f6bd4698a45c7da0037fb"
dependencies = [ dependencies = [
"physis", "physis",
] ]

View file

@ -133,9 +133,9 @@ impl GameData {
/// Returns the pop range object id that's associated with the warp id /// Returns the pop range object id that's associated with the warp id
pub fn get_warp(&mut self, warp_id: u32) -> Option<(u32, u16)> { pub fn get_warp(&mut self, warp_id: u32) -> Option<(u32, u16)> {
let warp_sheet = Warp::read_from(&mut self.game_data, Language::English); let warp_sheet = Warp::read_from(&mut self.game_data, Language::English)?;
let row = warp_sheet.get_row(warp_id); let row = warp_sheet.get_row(warp_id)?;
let pop_range_id = row.PopRange().into_u32()?; let pop_range_id = row.PopRange().into_u32()?;
let zone_id = row.TerritoryType().into_u16()?; let zone_id = row.TerritoryType().into_u16()?;