Skip to content

Commit

Permalink
Fix: アイコンの取得時のチェックを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Dec 30, 2023
1 parent 174ff23 commit f9a8b72
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/icon_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,23 @@ impl IconManager {
.write_to(&mut final_image_cursor, image::ImageOutputFormat::Png)
.map_err(|e| Error::ReadImageFailed(e.into()))?;
}
for (name, portrait) in [
("Normal", &portraits.normal),
("Joy", &portraits.joy),
("Anger", &portraits.anger),
("Sorrow", &portraits.sorrow),
]
.iter()
{
if portrait.is_empty() {
return Err(Error::ReadImageFailed(anyhow!(
"{}の{}の立ち絵が見つかりませんでした。",
speaker.internal_name(),
name,
)));
}
}
// 一部キャラはN以外の立ち絵がないので全部チェックはしない
// for (name, portrait) in [
// ("Normal", &portraits.normal),
// ("Joy", &portraits.joy),
// ("Anger", &portraits.anger),
// ("Sorrow", &portraits.sorrow),
// ]
// .iter()
// {
// if portrait.is_empty() {
// return Err(Error::ReadImageFailed(anyhow!(
// "{}の{}の立ち絵が見つかりませんでした。",
// speaker.internal_name(),
// name,
// )));
// }
// }

self.portraits
.insert(speaker.internal_name().to_string(), portraits);
Expand Down

0 comments on commit f9a8b72

Please sign in to comment.