>DRINK FROM CANTEEN
You feel much refreshed.
>POUR WATER
Poured.
>DRINK FROM CANTEEN
I'd like to oblige, but it's not within easy reach.
That's because V-DRINK-FROM assumes you mean to drink the WATER object, and V-DRINK then objects because the water isn't within reach. I think that case is mainly so that you can't drink the water unless you're holding the canteen.
The more appropriate "There's nothing to drink in the ..." message is only printed if you try to drink from something else than the Nile, the canteen or the oil jar, and it's an empty container.
I'm not sure why it checks for the canteen at all. It should be handled nicely by the default case (which is how "DRINK FROM CHALICE" is handled), and that should then also handle the case where the canteen is filled with sand instead. But maybe I'm overlooking something...
Also, "DRINK FROM JAR" should probably check if OIL-JAR is open or not. It does for some other things, e.g. "DRINK WATER FROM KNAPSACK" can print "Better open the knapsack first."
That's because
V-DRINK-FROM
assumes you mean to drink theWATER
object, andV-DRINK
then objects because the water isn't within reach. I think that case is mainly so that you can't drink the water unless you're holding the canteen.The more appropriate "There's nothing to drink in the ..." message is only printed if you try to drink from something else than the Nile, the canteen or the oil jar, and it's an empty container.
I'm not sure why it checks for the canteen at all. It should be handled nicely by the default case (which is how "DRINK FROM CHALICE" is handled), and that should then also handle the case where the canteen is filled with sand instead. But maybe I'm overlooking something...