List lamps and lanterns in charging prompt
Brass lanterns and oil lamps are always chargeable. Magic lamps are only listed if they are not yet identified.
This commit is contained in:
10
src/read.c
10
src/read.c
@@ -501,8 +501,16 @@ struct obj *obj;
|
||||
&& objects[obj->otyp].oc_name_known)));
|
||||
if (is_weptool(obj)) /* specific check before general tools */
|
||||
return FALSE;
|
||||
if (obj->oclass == TOOL_CLASS)
|
||||
if (obj->oclass == TOOL_CLASS) {
|
||||
if (obj->otyp == BRASS_LANTERN
|
||||
|| (obj->otyp == OIL_LAMP)
|
||||
/* only list magic lamps if they are not identified yet */
|
||||
|| (obj->otyp == MAGIC_LAMP
|
||||
&& !objects[MAGIC_LAMP].oc_name_known)) {
|
||||
return TRUE;
|
||||
}
|
||||
return (boolean) objects[obj->otyp].oc_charged;
|
||||
}
|
||||
return FALSE; /* why are weapons/armor considered charged anyway? */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user