Skip to content

Commit ad40f0d

Browse files
refactor: console output & version number
1 parent 095121e commit ad40f0d

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rusty_witcher3_debugger"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ https://github.com/WolvenKit/WolvenKit
1414
## Usage
1515

1616
In order to use this tool make sure the game is running and that it was launched with following arguments: -net -debugscripts.
17-
By default for a program to exit after handling a command you need to press Enter. This however can be configured with appropriate flags.
1817

1918
Print help information.
2019
```ps1

src/cli/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use clap::{Parser, Subcommand};
99

1010

1111
#[derive(Parser)]
12-
#[clap(name="Rusty Witcher 3 Debugger", version="0.4")]
12+
#[clap(name="Rusty Witcher 3 Debugger", version="v0.5")]
1313
#[clap(about="A standalone debugging tool for The Witcher 3 written in Rust", long_about=None)]
1414
struct Cli {
1515
#[clap(flatten)]

src/cli/response_handling.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ impl ScriptsReloadPrinter {
3535
}
3636

3737
fn print_summary(&self) {
38-
println!("========== {} Errors, {} Warnings ==========\n", self.errors.len(), self.warnings.len());
38+
println!("========== {} Errors, {} Warnings ==========", self.errors.len(), self.warnings.len());
3939

4040
for e in &self.errors {
4141
println!("{}", e.red());
4242
}
4343

44-
println!(""); // empty line between errors and warnings
44+
if self.errors.len() > 0 {
45+
println!(); // empty line between errors and warnings
46+
}
4547

4648
for w in &self.warnings {
4749
println!("{}", w.yellow());
@@ -80,6 +82,7 @@ impl HandleResponse for ScriptsReloadPrinter {
8082
}
8183

8284
if self.has_finished && ( !self.warnings.is_empty() || !self.errors.is_empty() ) {
85+
println!();
8386
self.print_summary();
8487
}
8588
}

src/cli/server_subcommands.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pub(crate) enum ServerSubcommands {
1111
Rootpath,
1212
/// Reload game scripts
1313
Reload {
14+
// Max waiting time for function compilation in millis
1415
#[clap(long, short='c', default_value_t=7000)]
1516
max_compile_time: u64
1617
},
@@ -110,8 +111,8 @@ pub(crate) fn handle_server_subcommand( cmd: ServerSubcommands, options: CliOpti
110111
connection.write( p.to_bytes().as_slice() ).unwrap();
111112

112113
if !options.no_listen {
113-
println!("Game response:\n");
114-
if !options.no_wait { thread::sleep( Duration::from_millis(2000) ) }
114+
println!("\nGame response:\n");
115+
if !options.no_wait { thread::sleep( Duration::from_millis(1000) ) }
115116

116117
// This function can either finish by itself by the means of response timeout
117118
// or be stopped by input waiter thread if that one sends him a signal

0 commit comments

Comments
 (0)