diff options
| author | Franklin Wei <git@fwei.tk> | 2015-05-24 21:48:39 -0400 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2015-05-24 21:48:39 -0400 |
| commit | 96b8dd1f5e92df0f7a7d0de7f1ec208c80760c9d (patch) | |
| tree | 7510f32436e7f5b30894dee784c5e3c041642300 | |
| parent | 4f6e8cfe95cd42071ac0d53eb8d22b22236c4b40 (diff) | |
| download | market-sim-96b8dd1f5e92df0f7a7d0de7f1ec208c80760c9d.zip market-sim-96b8dd1f5e92df0f7a7d0de7f1ec208c80760c9d.tar.gz market-sim-96b8dd1f5e92df0f7a7d0de7f1ec208c80760c9d.tar.bz2 market-sim-96b8dd1f5e92df0f7a7d0de7f1ec208c80760c9d.tar.xz | |
Change batch mode
| -rw-r--r-- | src/globals.h | 1 | ||||
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/util.c | 8 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/globals.h b/src/globals.h index bf37e8b..bb5450e 100644 --- a/src/globals.h +++ b/src/globals.h @@ -98,6 +98,7 @@ extern bool have_color; /* restricted mode disables things that would be considered "dangerous" when used in a web-facing script such as interactive loading/saving */ extern bool restricted; +extern bool batch_mode; #define COL_NORM 0 #define COL_RED 1 @@ -72,6 +72,8 @@ exec_cmd: if(best_command >= 0) { + if(batch_mode) + output("\n"); commands[best_command].handler(player); output("\n"); } @@ -531,13 +531,9 @@ void curses_init(void) } } -int dummy_output(const char* f, ...) -{ - (void) f; - return 0; -} +bool batch_mode = false; void batch_init(void) { - output = dummy_output; + batch_mode = true; } |