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:
@@ -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;
|
||||
|
||||
@@ -966,6 +966,7 @@ extern int wiz_debug_cmd_traveldisplay(void);
|
||||
extern boolean u_rooted(void);
|
||||
extern boolean u_maybe_impaired(void);
|
||||
extern const char *u_locomotion(const char *);
|
||||
extern void handle_tip(int);
|
||||
extern void domove(void);
|
||||
extern void runmode_delay_output(void);
|
||||
extern void overexert_hp(void);
|
||||
|
||||
@@ -34,6 +34,7 @@ struct flag {
|
||||
boolean friday13; /* it's Friday the 13th */
|
||||
boolean goldX; /* for BUCX filtering, whether gold is X or U */
|
||||
boolean help; /* look in data file for info about stuff */
|
||||
boolean tips; /* show helpful hints? */
|
||||
boolean ignintr; /* ignore interrupts */
|
||||
boolean implicit_uncursed; /* maybe omit "uncursed" status in inventory */
|
||||
boolean ins_chkpt; /* checkpoint as appropriate; INSURANCE */
|
||||
|
||||
@@ -519,6 +519,7 @@ enum nhcore_calls {
|
||||
NHCORE_RESTORE_OLD_GAME,
|
||||
NHCORE_MOVELOOP_TURN,
|
||||
NHCORE_GAME_EXIT,
|
||||
NHCORE_GETPOS_TIP,
|
||||
|
||||
NUM_NHCORE_CALLS
|
||||
};
|
||||
|
||||
@@ -615,6 +615,8 @@ static int optfn_##a(int, int, boolean, char *, char *);
|
||||
NHOPTB(timed_delay, Map, 0, opt_in, set_in_config,
|
||||
Off, No, No, No, NoAlias, (boolean *) 0, Term_False)
|
||||
#endif
|
||||
NHOPTB(tips, Advanced, 0, opt_out, set_in_game,
|
||||
On, Yes, No, No, NoAlias, &flags.tips, Term_False)
|
||||
NHOPTB(tombstone, Advanced, 0, opt_out, set_in_game,
|
||||
On, Yes, No, No, NoAlias, &flags.tombstone, Term_False)
|
||||
NHOPTB(toptenwin, Advanced, 0, opt_in, set_in_game,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 73
|
||||
#define EDITLEVEL 74
|
||||
|
||||
/*
|
||||
* Development status possibilities.
|
||||
|
||||
Reference in New Issue
Block a user