handle optional game version and room format; transform line endings
This commit is contained in:
parent
ebb172df7e
commit
a0d109c0b8
19
src/game.rs
19
src/game.rs
|
@ -295,14 +295,17 @@ impl ToString for Game {
|
||||||
segments.push(self.font_data.to_owned().unwrap())
|
segments.push(self.font_data.to_owned().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
format!(
|
transform_line_endings(
|
||||||
"{}\n{}\n{}{}{}\n\n{}\n\n",
|
format!(
|
||||||
&self.name,
|
"{}{}{}{}{}\n\n{}\n\n",
|
||||||
&self.version_line(),
|
&self.name,
|
||||||
&self.room_format_line(),
|
&self.version_line(),
|
||||||
&self.font_line(),
|
&self.room_format_line(),
|
||||||
&self.text_direction_line(),
|
&self.font_line(),
|
||||||
segments.join("\n\n"),
|
&self.text_direction_line(),
|
||||||
|
segments.join("\n\n"),
|
||||||
|
),
|
||||||
|
if self.line_endings_crlf {TransformMode::CRLF} else {TransformMode::LF}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue