followup: drinking from sinks while levitating
This is a followup to the patch I made a couple months ago. It replaces the "!Levitation && !u.uswallow" checks with can_reach_floor(), which makes a more complete set of checks and is more consistent. I applied this to fountains too. I doubt that fountains hit the ceiling, and the checks also seem reasonable for heights in between (e.g. while mounted).
This commit is contained in:
@@ -342,7 +342,7 @@ dodrink()
|
||||
return 0;
|
||||
}
|
||||
/* Is there a fountain to drink from here? */
|
||||
if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) {
|
||||
if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && can_reach_floor()) {
|
||||
if(yn("Drink from the fountain?") == 'y') {
|
||||
drinkfountain();
|
||||
return 1;
|
||||
@@ -350,7 +350,7 @@ dodrink()
|
||||
}
|
||||
#ifdef SINKS
|
||||
/* Or a kitchen sink? */
|
||||
if (IS_SINK(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) {
|
||||
if (IS_SINK(levl[u.ux][u.uy].typ) && can_reach_floor()) {
|
||||
if (yn("Drink from the sink?") == 'y') {
|
||||
drinksink();
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user