8.5. Kitchen and Bathroom

| Chapter 8: Vehicles, Animals and Furniture |

| 8.5. Kitchen and Bathroom

Before implementing elaborate mechanisms to handle plumbing, we should pause to ask ourselves: how much of this do we need? Is it really necessary to simulate the complete set of fixtures and fittings?

This turns out to be a little tricky to do, and also rather dull to set out. The example Modern Conveniences was actually written as a demonstration of how an extension to Inform might be written to provide a general "kitchens and bathrooms service" for writers, but it contains a nice implementation well worth borrowing. The idea is to provide a "kitchen" kind of room and a "bathroom" kind of room. All kitchens created automatically contain standard kitchen appliances: fridge, freezer, sink with taps, counters, cabinets, and a stovetop with built-in oven. Similarly, all bathrooms will have sinks, baths, cabinets, and toilets, and respond to some standard interactions.

Another common feature of bathrooms is a mirror: Versailles demonstrates how to create a simple one.

438
| Example Modern Conveniences Exemplifying the kind of source we might use in writing extensions for kitchen and bathroom appliances. |
WI

75
| Example Versailles A mirror which will reflect some random object in the room. |
WI

Previous | Contents | Next