fix scn patch bug

This commit is contained in:
2025-09-05 22:05:38 +08:00
parent 900678f89a
commit 7fc13b1619

View File

@@ -474,11 +474,7 @@ impl Script for ScnScript {
name = name.replace(key, value);
}
}
if has_display_name || self.language_index != 0 {
text[1][self.language_index][0].set_string(name);
} else {
text[0].set_string(name);
}
text[1][self.language_index][0].set_string(name);
} else {
return Err(anyhow::anyhow!(
"Name is missing for message. (text {j} at scene {i})"
@@ -579,16 +575,7 @@ impl Script for ScnScript {
name = name.replace(key, value);
}
}
if has_display_name || self.language_index != 0 {
text[2][self.language_index][0]
.set_string(name);
} else {
if text[1].is_string() {
text[1].set_string(name);
} else {
text[0].set_string(name);
}
}
text[2][self.language_index][0].set_string(name);
} else {
return Err(anyhow::anyhow!(
"Name is missing for message.(text {j} at scene {i})"