From f9a8b721f3bd5ee08fce354aff9d1624f33e8cc5 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sat, 30 Dec 2023 19:32:20 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=81=AE=E5=8F=96=E5=BE=97=E6=99=82=E3=81=AE=E3=83=81=E3=82=A7?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/icon_manager.rs | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/icon_manager.rs b/src/icon_manager.rs index e2c1f39..d856806 100644 --- a/src/icon_manager.rs +++ b/src/icon_manager.rs @@ -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);