minimal_xname (trunk only)
simple_typename and obj_typename operate on item types rather than
particular objects so have to assume that the item involved has been seen.
That means that simple_typename(obj->otyp) is not suitable; if obj->dknown
hasn't been set, it gives away information. This adds mininal_xname(obj)
to be used for that purpose. I'm not aware of any straightforward way to
actually expose the original problem; it's more than hypothetical but not
something anyone's likely to have come across.
Not fixed: test driver program reveals that obj_typename(GOLD_PIECE)
and simple_typename(GOLD_PIECE) yield "coin of gold piece". But I don't
think there's any way to get nethack to show that to the user.
This commit is contained in:
@@ -697,7 +697,7 @@ struct obj *obj;
|
||||
boolean vis;
|
||||
|
||||
if(!getdir((char *)0)) return 0;
|
||||
mirror = simple_typename(obj->otyp); /* "mirror" or "looking glass" */
|
||||
mirror = simpleonames(obj); /* "mirror" or "looking glass" */
|
||||
if(obj->cursed && !rn2(2)) {
|
||||
if (!Blind)
|
||||
pline_The("%s fogs up and doesn't reflect!", mirror);
|
||||
|
||||
Reference in New Issue
Block a user