Inform 7 Home Page / Documentation


§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.


arrow-up.png Start of Chapter 8: Vehicles, Animals and Furniture
arrow-left.png Back to §8.4. Furniture
arrow-right.png Onward to Chapter 9: Props: Food, Clothing, Money, Toys, Books, Electronics: §9.1. Food

**ExampleVersailles
A mirror which will reflect some random object in the room.

**ExampleModern Conveniences
Exemplifying the kind of source we might use in writing extensions for kitchen and bathroom appliances.