The word "zorkmid" was hard-coded in format strings all
over the place. Often they would use "%ld zorkmid%s", amt, plur(amt) but not consistently, so some of the hard-coded usage could result in "1 zorkmids" This adds the function currency(long) to return the name of the currency, either plural or singular depending on the argument passed to it. That eliminates the need for the extra %s in the format string and the use of the plur() macro.
This commit is contained in:
@@ -201,7 +201,7 @@ forcelock() /* try to force a locked chest */
|
||||
if (costly)
|
||||
loss += stolen_value(xlock.box, u.ux, u.uy,
|
||||
(boolean)shkp->mpeaceful, TRUE);
|
||||
if(loss) You("owe %ld zorkmids for objects destroyed.", loss);
|
||||
if(loss) You("owe %ld %s for objects destroyed.", loss, currency(loss));
|
||||
delobj(xlock.box);
|
||||
}
|
||||
exercise((xlock.picktyp) ? A_DEX : A_STR, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user