The very nice Underside extension (as in:
Include Underside by Eric Eve) defines an underside as a type of container, but ignores carrying capacity. It is easy to enforce the condition, but sometimes hard to set the condition.
If (for example) mom doesn’t want you (the player) to put more than n things under the bed, add the following rule:
Check placing something under (this is the underside capacity exceeded rule): if the second noun incorporates an underside (called x): let c be the carrying capacity of x; let n be the number of things in x; if n is not less than c, say "There are already too many things under [the second noun]." instead.
(To force others to observe capacities, add
the actor between
For reasons that I don’t fully understand, in Inform 7 it can sometimes be ridiculously easy and at other times painfully hard to set an initial state for parts a thing. (The problem seems to be some ambiguities that are inherent in English grammar.) Difficulty seems to vary according to whether the part is described as part of a kind (class) or part of a thing (instance), and apparently also, whether the thing or the part is named with a single word or more than one word. The only workaround that consistently works seems to be when play or some other scene begins, for example:
When play begins: [ Mom doesn't allow anything under the bed! ] if the small bed incorporates an underside (called x): now the carrying capacity of x is 0; [ The banjo picker doesn't care what Mom doesn't allow! ] now the banjo picker is under the bed.