WASM plugins, scripting, i18n, GUI pan/zoom, cargo-dist CI/CD
- WASM plugin host (wasmtime 46, 17 host fns) + example noisemap plugin - Rhai scripting engine (12 API fns, `terrafier run` cmd) - i18n: en/ru translations, auto-detect, t! macro - GUI: pan (click-drag) + zoom (scroll wheel) with viewport transform - cargo-dist 0.31: MSI/pkg/shell installers, both binaries - CI: .github/workflows/ci.yml + release.yml - Security: wasmtime 30→46, bincode 1.3→2.0, quick-xml CVE docs - Code review: SAFETY comments, unwrap→match cleanup - Fixes: clippy approx_constant, needless_borrows, rustfmt
This commit is contained in:
parent
bdd4564240
commit
18613260a8
100 changed files with 4262 additions and 585 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use clap::Args;
|
||||
use std::path::Path;
|
||||
use terrafier_i18n as i18n;
|
||||
|
||||
use crate::util::output::{self, OutputFormat};
|
||||
use crate::util::{load_world, progress};
|
||||
|
|
@ -31,6 +32,9 @@ pub fn cmd_export(
|
|||
let tile_count: usize = world.dimensions.iter().map(|d| d.tiles.len()).sum();
|
||||
|
||||
if validate || dry_run {
|
||||
if dry_run {
|
||||
log::info!("{}", i18n::translate_with("cli.dry_run", &[("action", "export")]));
|
||||
}
|
||||
output::print_result(
|
||||
format,
|
||||
&serde_json::json!({
|
||||
|
|
@ -45,9 +49,10 @@ pub fn cmd_export(
|
|||
}
|
||||
}
|
||||
|
||||
let bar = progress::new_bar(tile_count as u64, "Exporting...");
|
||||
let exporting_msg = i18n::translate_with("cli.export.exporting", &[("path", &args.output)]);
|
||||
let bar = progress::new_bar(tile_count as u64, &exporting_msg);
|
||||
terrafier_core::io::export::export_to_save(&world, Path::new(&args.output))?;
|
||||
progress::finish_with("Export complete", bar);
|
||||
progress::finish_with(i18n::t!("cli.export.complete"), bar);
|
||||
|
||||
log::info!("World exported to: {}", args.output);
|
||||
output::print_result(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue