Skip to main content

write_script_lua

Function write_script_lua 

Source
pub fn write_script_lua(
    inf_path: &Path,
    input_root: &Path,
    stage_root: &Path,
    seq_index: usize,
    script_s2s: &str,
    debug: bool,
) -> Result<()>
Expand description

Extract an embedded .s2s script from an .inf entry, transpile it to Lua, and write it alongside the .ron file as <ron_stem>.<seq_index>.lua.

If s2s2lua parsing fails, the raw script is still written as a Lua comment block so no data is lost.