I6: Waterelement.h

Has anyone used it in their project? I’m asking because judging by the documentation it looks awesome, but I’ve never seen anyone actually use it, except the author in Savoir-Faire. So, is it too good to be true, or what?

Haven’t used it, but it does look good, doesn’t it? Emily is usually very careful and thorough with her code, so I would have a lot of confidence that it will work. Try it out and let us know!

pour skrin in box
(first taking the musical box)
Taken.

You put some water in the musical box
[** Programming error: water (object number 73) has a property before, but it is longer than 2 bytes so you cannot use “.” to read **]
. This fills the musical box to the brim.

Any idea how I can get rid of this programming error without breaking the code?

Error resolved. Now I’ve run into another problem. When more than one container has water in it and the player types X WATER, he gets the rather unhelpful disambiguation question

x water
Which do you mean, the water or the water?

How do I make the parser disambiguate the containers instead of the liquids?

It’s been a long, long time since I did anything with this extension, but I know I did solve this problem for Savoir-Faire. The WaterElement instructions say

Assuming you got WaterElement.h from the archive, it should have come in a zip file including that modified parser file; if not, you can download here. The function of these hacks is to make it clear when a disambiguation question is being asked, so WaterElement knows to print the longer form of the name (“water in the pitcher”) only when the question is being asked, and otherwise the short version (“water”).

You know, I’d have sworn I included your version of parserm, but I didn’t. Now that everything works, I have a question about puddles. I can create a puddle in every location (of class Room). Does that mean that locations are treated as containers? I’m asking because you recommend the number of liquids to match the number of containers. So if I have five containers and 30 locations, do I need 35 liquids?

Anyway, thanks for WaterElement and Locksmith. They are both neat.