called when lit lamp is hit by water or put into a container or you've been swallowed by a monster; obj might be in transit while being thrown or dropped so don't assume that its location is valid */
| 1494 | you've been swallowed by a monster; obj might be in transit while |
| 1495 | being thrown or dropped so don't assume that its location is valid */ |
| 1496 | boolean |
| 1497 | snuff_lit(struct obj *obj) |
| 1498 | { |
| 1499 | coordxy x, y; |
| 1500 | |
| 1501 | if (obj->lamplit) { |
| 1502 | if (obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP |
| 1503 | || obj->otyp == BRASS_LANTERN || obj->otyp == POT_OIL) { |
| 1504 | (void) get_obj_location(obj, &x, &y, 0); |
| 1505 | if (obj->where == OBJ_MINVENT ? cansee(x, y) : !Blind) |
| 1506 | pline("%s %s out!", Yname2(obj), otense(obj, "go")); |
| 1507 | end_burn(obj, TRUE); |
| 1508 | return TRUE; |
| 1509 | } |
| 1510 | if (snuff_candle(obj)) |
| 1511 | return TRUE; |
| 1512 | } |
| 1513 | return FALSE; |
| 1514 | } |
| 1515 | |
| 1516 | /* called when lit object is hit by water */ |
| 1517 | boolean |
no test coverage detected