Skip to content

Commit

Permalink
Fix web version not building
Browse files Browse the repository at this point in the history
  • Loading branch information
KonaeAkira committed Dec 30, 2024
1 parent cb8d519 commit dfd5a2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ gloo-worker = { version = "0.5.0", features = ["futures"] }
web-time = "1.1.0"
# web-sys doesn't follow semver, so version needs to be pinned (https://github.com/emilk/egui/issues/4961)
web-sys = "=0.3.76"
getrandom = { version = "0.2.15", features = ["js"] }

[[bin]]
name = "webworker"
Expand Down
10 changes: 2 additions & 8 deletions src/widgets/saved_rotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ impl Rotation {
solver: solver_params,
actions,
item: recipe.item_id,
food: match food {
Some(consumable) => Some((consumable.item_id, consumable.hq)),
None => None,
},
potion: match potion {
Some(consumable) => Some((consumable.item_id, consumable.hq)),
None => None,
},
food: food.map(|consumable| (consumable.item_id, consumable.hq)),
potion: potion.map(|consumable| (consumable.item_id, consumable.hq)),
crafter_stats: *crafter_config.active_stats(),
job_id: crafter_config.selected_job,
}
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub fn get_action_icon(action: Action, job_id: u8) -> egui::Image<'static> {
let image_path = format!(
"{}/action-icons/{}/{}.webp",
env!("BASE_URL"),
game_data::get_job_name(job_id, Locale::EN),
game_data::action_name(action, Locale::EN)
game_data::get_job_name(job_id, game_data::Locale::EN),
game_data::action_name(action, game_data::Locale::EN)
);
egui::Image::new(image_path)
}
Expand Down

0 comments on commit dfd5a2a

Please sign in to comment.