I am having some difficulty getting a new clothing system working the way I want it to. Basically, I want to define clothes as occupying certain body slots, so that when the clothes get worn, the body slot becomes covered or uncovered. The problem I am bumping into is with the occupying relation I’ve defined: rather than treat it as a requirement, Inform 7 is creating a generic item of the specified kind, so when I say “The blue jeans occupy a pelvis, upper legs, and lower legs” a new instance of each of those body slots is created. Not sure how to fix this. Here’s the most relevant code to give an idea of what I’m going for.
Clothes are a kind of thing. Clothes are usually wearable. A body slot is a kind of thing. Occupying relates various clothes to various body slots. The verb to occupy means the occupying relation. Upper legs are a kind of body slot. Every person incorporates upper legs. Lower legs are a kind of body slot. Every person incorporates lower legs. Covering relates various clothes to various body slots. The verb to cover means the covering relation. Carry out wearing something: Repeat with slot-in-question running through body slots which are occupied by the noun: Now slot-in-question is covered by the noun. The blue jeans are clothes. The jeans occupy upper legs and lower legs.
So if a player types “wear jeans”, then the generic upper legs and lower legs occupied by the jeans get covered, rather than the player character’s upper and lower legs. Is my approach here even remotely correct?