Change the tips internal data struct

Previously adding any new tips invalidated saves; now you can have
up to the number of bits in a long without change in savefile.

Invalidates saves.
This commit is contained in:
Pasi Kallinen
2026-04-04 15:39:43 +03:00
parent 7120a7190e
commit 5f1163c11a
4 changed files with 6 additions and 6 deletions

View File

@@ -1834,8 +1834,8 @@ handle_tip(int tip)
if (!flags.tips)
return FALSE;
if (tip >= 0 && tip < NUM_TIPS && !svc.context.tips[tip]) {
svc.context.tips[tip] = TRUE;
if (tip >= 0 && tip < NUM_TIPS && !(svc.context.tips & (1 << tip))) {
svc.context.tips |= (1 << tip);
/* the "Tip:" prefix is a hint to use of OPTIONS=!tips to suppress */
switch (tip) {
case TIP_ENHANCE:
@@ -1886,7 +1886,7 @@ swim_move_danger(coordxy x, coordxy y)
|| liquid_wall) {
if (svc.context.nopick) {
/* moving with m-prefix */
svc.context.tips[TIP_SWIM] = TRUE;
svc.context.tips |= (1 << TIP_SWIM);
return FALSE;
} else if (ParanoidSwim || liquid_wall) {
You("avoid %s into the %s.",