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:
@@ -579,6 +579,7 @@ render the color names in the corresponding color when using the pick-a-color
|
||||
menu for adding status highlights or menu colors via 'O'
|
||||
reading blessed scroll of teleportation confers one-shot teleport control
|
||||
mild zombie apocalypse
|
||||
list lamps and lanterns in charging prompt
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
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