Chronicle of major events, and livelog

Log game events, such as entering a new dungeon level, breaking
a conduct, or killing a unique monster, in a new "Major events"
chronicle. The entries record the turn when the event happened.
The log can be viewed with #chronicle -command, and the entries
also show up in the end-of-game dump, if that is available.

This feature is on by default, but can be disabled by
defining NO_CHRONICLE compile-time option.

This also contains "live logging", writing the events as they
happen into a single livelog-file. This is mostly useful for
public servers. The livelog is off by default, and must be
compiled in with LIVELOG, and then turned on in sysconf.

Mostly this a version of livelogging from the Hardfought server,
with some changes.
This commit is contained in:
Pasi Kallinen
2022-02-09 22:49:25 +02:00
parent cfcfc3429f
commit 1e90f89203
43 changed files with 624 additions and 53 deletions
+4
View File
@@ -260,6 +260,7 @@ extern void rhack(char *);
extern int doextlist(void);
extern int extcmd_via_menu(void);
extern int enter_explore_mode(void);
extern int do_gamelog(void);
extern boolean bind_key(uchar, const char *);
extern void dokeylist(void);
extern int xytod(schar, schar);
@@ -879,6 +880,7 @@ extern void reveal_paths(void);
extern boolean read_tribute(const char *, const char *, int, char *, int,
unsigned);
extern boolean Death_quote(char *, int);
extern void livelog_add(unsigned int ll_type, const char *);
/* ### fountain.c ### */
@@ -2046,6 +2048,8 @@ extern void You_see(const char *, ...) PRINTF_F(1, 2);
extern void pline_The(const char *, ...) PRINTF_F(1, 2);
extern void There(const char *, ...) PRINTF_F(1, 2);
extern void verbalize(const char *, ...) PRINTF_F(1, 2);
extern void gamelog_add(unsigned int, long, const char *);
extern void livelog_printf(unsigned int, const char *, ...) PRINTF_F(2, 3);
extern void raw_printf(const char *, ...) PRINTF_F(1, 2);
extern void impossible(const char *, ...) PRINTF_F(1, 2);
extern void config_error_add(const char *, ...) PRINTF_F(1, 2);