Tips and option to disable them

Adds a more general way to handle gameplay tips, and adds
a boolean option "tips", which can be used to disable all
tips.  Adds a helpful longer message when the game goes
into the "farlook" mode.

Also adds a lua binding to easily show multi-line text
in a menu window.

Breaks save compat.
This commit is contained in:
Pasi Kallinen
2023-02-19 15:44:29 +02:00
parent 80842979aa
commit 5d659cf1f6
16 changed files with 131 additions and 16 deletions

View File

@@ -11,6 +11,14 @@
#define CONTEXTVERBSZ 30
enum nh_tips {
TIP_ENHANCE = 0, /* #enhance */
TIP_SWIM, /* walking into water */
TIP_GETPOS, /* getpos/farlook */
NUM_TIPS
};
/*
* The context structure houses things that the game tracks
* or adjusts during the game, to preserve game state or context.
@@ -153,8 +161,7 @@ struct context_info {
boolean botl; /* partially redo status line */
boolean botlx; /* print an entirely new bottom line */
boolean door_opened; /* set to true if door was opened during test_move */
boolean enhance_tip; /* player is informed about #enhance */
boolean swim_tip; /* player was informed about walking into water */
boolean tips[NUM_TIPS];
struct dig_info digging;
struct victual_info victual;
struct engrave_info engraving;