I haven't been active in the past decade, but here's a small patch. Main
branch only. This adds a check when setting a new fruit so that if no fruits have been created since the last time the option has been set, the current fruit is overwritten. Result: the user cannot repeatedly set the fruit option and overflow the maximum fruit number.
This commit is contained in:
14
src/cmd.c
14
src/cmd.c
@@ -2053,6 +2053,20 @@ int final;
|
||||
if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt);
|
||||
#endif
|
||||
you_can(buf,"");
|
||||
if (wizard) {
|
||||
int fcount = 0;
|
||||
struct fruit *f;
|
||||
char buf2[BUFSZ];
|
||||
for(f=ffruit; f; f = f->nextf)
|
||||
{
|
||||
Sprintf(buf, "Fruit %d ", ++fcount);
|
||||
Sprintf(buf2, "%s (id %d)", f->fname, f->fid);
|
||||
enl_msg(buf, "is ", "was ", buf2, "");
|
||||
}
|
||||
enl_msg("The current fruit ", "is ", "was ", pl_fruit, "");
|
||||
Sprintf(buf, "%d", flags.made_fruit);
|
||||
enl_msg("The made fruit flag ", "is ", "was ", buf, "");
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user