mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-20 19:04:38 +08:00
add circus special rules to fixed formatter
This commit is contained in:
@@ -2,13 +2,13 @@ mod fixed;
|
||||
|
||||
use crate::types::*;
|
||||
|
||||
pub fn fmt_message(mes: &mut Vec<Message>, opt: FormatOptions) {
|
||||
pub fn fmt_message(mes: &mut Vec<Message>, opt: FormatOptions, typ: ScriptType) {
|
||||
match opt {
|
||||
FormatOptions::Fixed {
|
||||
length,
|
||||
keep_original,
|
||||
} => {
|
||||
let formatter = fixed::FixedFormatter::new(length, keep_original);
|
||||
let formatter = fixed::FixedFormatter::new(length, keep_original, Some(typ));
|
||||
for message in mes.iter_mut() {
|
||||
message.message = formatter.format(&message.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user