Counterfeit Monkey — 67 of 292

Emily Short

Release 5

Section 2 - Clothing

[Our clothing simulation is as lightweight as we can make it. The aim is

-- to avoid breaking immersion by having the player simultaneously wear things that ought to overlap, like the monocle and the goggles

-- to juggle clothing automatically so that the player never has to worry about explicitly taking off one piece of clothing to wear another

Though there are provisions in the manual for clothing systems that handle layering, describing outfits based on what's uppermost, and specifying body parts, we want to avoid all of that. Naming body parts would clash with the "arm", "toe", and other severed body bits that appear elsewhere in the game, while layering would draw our attention to the fact that the protagonist's original outfit is never clearly described. We want to focus player attention as much as possible away from those points.

Any article of clothing which can be stacked freely -- rings, wraps, jewelry, etc -- is not said to cover anything. We also do not bother to specify a coverage area for items of clothing that the player will never get his hands on -- those worn by NPCs.]

Body-area is a kind of value. The body-areas are face-area, head-area, torso-area, legs-area.

Covering relates various things to one body-area. The verb to cover (it covers, they cover, it is covering, it is covered) implies the covering relation.

[Strip off anything else that's in the way -- which should be only one thing, really, but we write it as a loop just in case.]

Check wearing something which covers a body-area (called affected region):

if the affected region is not the face-area and the affected region is not the head-area and the affected region is not the torso-area and the affected region is not the legs-area: [1]

make no decision;

while the player wears a non-noun thing (called blockage) which covers the affected region:

try taking off the blockage;

if the player wears the blockage:

stop the action.

Definition: a thing is non-noun if it is not the noun.

[...and to deal with the special case of objects worn as blindfolds:]

Check wearing something which covers face-area when the player wears something blinding:

while the player wears a blinding thing (called blockage):

try taking off the blockage;

if the player wears the blockage:

stop the action.

Report taking off something which covers face-area:

say "[You] gently remove [the noun]." instead.

Report taking off something which covers head-area:

say "[You] pull off [the noun] and smoothe down our hair." instead.

Report wearing something which covers head-area:

say "[You] settle [the noun] on our head and adjust our hair underneath." instead.

Test wardrobe with "tutorial off / cycle wardrobe / wear ben wig / wear monocle / blindfold me with swatch / wear monocle".

Note

[1]. you would think this was covered already, but for some reason there's a bug at time of writing that allows "which covers a body area" to match "illegal body-area" -- that is to say, no part of the body at all.