bundle the display-related hints, that tell bot() and others
that an update is required, into a struct. Remove it from context since there is no reason to save those.
This commit is contained in:
16
src/shk.c
16
src/shk.c
@@ -124,7 +124,7 @@ money2mon(struct monst* mon, long amount)
|
||||
remove_worn_item(ygold, FALSE); /* quiver */
|
||||
freeinv(ygold);
|
||||
add_to_minv(mon, ygold);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
return amount;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ money2u(struct monst* mon, long amount)
|
||||
dropy(mongold);
|
||||
} else {
|
||||
addinv(mongold);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1179,7 +1179,7 @@ pay(long tmp, register struct monst* shkp)
|
||||
money2mon(shkp, balance);
|
||||
else if (balance < 0)
|
||||
money2u(shkp, -balance);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
if (robbed) {
|
||||
robbed -= tmp;
|
||||
if (robbed < 0)
|
||||
@@ -1674,7 +1674,7 @@ dopay(void)
|
||||
eshkp->debit = 0L;
|
||||
eshkp->loan = 0L;
|
||||
You("pay that debt.");
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
} else {
|
||||
dtmp -= eshkp->credit;
|
||||
eshkp->credit = 0L;
|
||||
@@ -1683,7 +1683,7 @@ dopay(void)
|
||||
eshkp->loan = 0L;
|
||||
pline("That debt is partially offset by your credit.");
|
||||
You("pay the remainder.");
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
}
|
||||
paid = TRUE;
|
||||
}
|
||||
@@ -2098,14 +2098,14 @@ inherits(
|
||||
eshkp->robbed = 0L;
|
||||
if (umoney > 0L) {
|
||||
money2mon(shkp, umoney);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
}
|
||||
if (!silently)
|
||||
pline("%s %s all your possessions.", Shknam(shkp), takes);
|
||||
taken = TRUE;
|
||||
} else {
|
||||
money2mon(shkp, loss);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
if (!silently)
|
||||
pline("%s %s the %ld %s %sowed %s.", Shknam(shkp),
|
||||
takes, loss, currency(loss),
|
||||
@@ -4730,7 +4730,7 @@ pay_for_damage(const char *dmgstr, boolean cant_mollify)
|
||||
cost_of_damage = check_credit(cost_of_damage, shkp);
|
||||
if (cost_of_damage > 0L) {
|
||||
money2mon(shkp, cost_of_damage);
|
||||
gc.context.botl = 1;
|
||||
display.botl = 1;
|
||||
}
|
||||
pline("Mollified, %s accepts your restitution.", shkname(shkp));
|
||||
/* move shk back to his home loc */
|
||||
|
||||
Reference in New Issue
Block a user