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:
@@ -498,7 +498,7 @@ outer_break:
|
||||
buf, distant_name(best,doname));
|
||||
if (autocurse)
|
||||
pline("%s %s %s %s for a moment.",
|
||||
s_suffix(Monnam(mon)), simple_typename(best->otyp),
|
||||
s_suffix(Monnam(mon)), simpleonames(best),
|
||||
otense(best, "glow"), hcolor(NH_BLACK));
|
||||
} /* can see it */
|
||||
m_delay += objects[best->otyp].oc_delay;
|
||||
|
||||
Reference in New Issue
Block a user