"Wearables" Source (Inform7)

A pair of pants, a hat and a shirt are kinds of thing. A pair of pants, a hat and a shirt are usually wearable.

Some golf pants are a pair of pants.

Some tuxedo trousers are a pair of pants.

The frilly shirt is a shirt.

The polo shirt is a shirt.

The black baseball cap is a kind of hat.
The gray cowboy hat is a kind of hat.

The player wears the golf pants, the gray cowboy hat and the polo shirt. The player carries the tuxedo trousers, the black baseball cap and the frilly shirt.

The Dressing Room is a room. "Demo showing basic simulation of 'wearables logic' in interactive fiction. Type 'inventory' to see what you're carrying. Then try {put on,take off} {frilly shirt,polo shirt, tuxedo trousers, golf pants, black baseball cap, gray cowboy hat}. "


Instead of wearing a pair of pants when the player is wearing a pair of pants (called the wrong trousers):
    say "You'll have to take off [the wrong trousers] first."

Instead of wearing a shirt when the player is wearing a shirt (called the wrong top):
    say "You'll have to take off [the wrong top] first."

Instead of wearing a hat when the player is wearing a hat (called the wrong cap):
    say "You'll have to take off [the wrong cap] first."

(Based on http://inform7.com/book/WI_4_4.html#e112)

Home