From 44329268bc54d07506559b1491d14717954d1ca2 Mon Sep 17 00:00:00 2001 From: Equim Date: Tue, 20 Feb 2024 02:11:41 +0800 Subject: [PATCH] add mjai log to View --- src/main.rs | 1 + src/render.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index fbcc885..558044a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -430,6 +430,7 @@ fn main() -> Result<()> { player_id, split_logs: split_raw_logs.as_deref(), + mjai_log: &events, lang: lang_value.get_name(), }; log!("writing output..."); diff --git a/src/render.rs b/src/render.rs index 7d5f9be..334af1f 100644 --- a/src/render.rs +++ b/src/render.rs @@ -1,6 +1,7 @@ use crate::opts::Engine; use crate::review::Review; use convlog::tenhou::{GameLength, RawPartialLog}; +use convlog::Event; use fluent_templates::FluentLoader; use std::collections::HashMap; use std::io::prelude::*; @@ -60,6 +61,7 @@ pub struct View<'a> { pub player_id: u8, pub split_logs: Option<&'a [RawPartialLog<'a>]>, + pub mjai_log: &'a [Event], pub lang: &'a str, }