refine PR #946 - named armor
Move the new stuff from PR #946 out of xname() into new routine armor_simple_name(). Noticed while testing: tweak 'call object type' so that it doesn't list instances of pre-discovered armor as likely candidates since assigning a name to such wasn't showing up in the discoveries list. Add "silver shield" as wishing synonym for "polished silver shield".
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
static void setgemprobs(d_level *);
|
||||
static void shuffle(int, int, boolean);
|
||||
static void shuffle_all(void);
|
||||
static boolean interesting_to_discover(int);
|
||||
static int QSORTCALLBACK discovered_cmp(const genericptr, const genericptr);
|
||||
static char *oclass_to_name(char, char *);
|
||||
|
||||
@@ -447,8 +446,9 @@ undiscover_object(int oindx)
|
||||
register boolean found = FALSE;
|
||||
|
||||
/* find the object; shift those behind it forward one slot */
|
||||
for (dindx = gb.bases[acls]; dindx < NUM_OBJECTS && gd.disco[dindx] != 0
|
||||
&& objects[dindx].oc_class == acls;
|
||||
for (dindx = gb.bases[acls];
|
||||
dindx < NUM_OBJECTS && gd.disco[dindx] != 0
|
||||
&& objects[dindx].oc_class == acls;
|
||||
dindx++)
|
||||
if (found)
|
||||
gd.disco[dindx - 1] = gd.disco[dindx];
|
||||
@@ -467,7 +467,7 @@ undiscover_object(int oindx)
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
boolean
|
||||
interesting_to_discover(int i)
|
||||
{
|
||||
/* Pre-discovered objects are now printed with a '*' */
|
||||
|
||||
Reference in New Issue
Block a user