Three scenarios: one form works, one fails at compilation, and one fails silently at run time (these differ only in the final line in each example).
This one works:
A desk is a kind of supporter. The printed name is "desky thingie". The description is "looks pedestrian".
A terminal is a kind of thing. The printed name is "stage 4 gallows humor". The description is "battery not included".
Home is a room. There is a desk in Home.
There is a terminal in Home. Now the terminal is on the desk.
This one fails at compilation:
A desk is a kind of supporter. The printed name is "desky thingie". The description is "looks pedestrian".
A terminal is a kind of thing. The printed name is "stage 4 gallows humor". The description is "battery not included".
Home is a room. There is a desk in Home.
A terminal is on the desk.
This one fails silently (no terminal in the world):
A desk is a kind of supporter. The printed name is "desky thingie". The description is "looks pedestrian".
A terminal is a kind of thing. The printed name is "stage 4 gallows humor". The description is "battery not included".
Home is a room. There is a desk in Home.
There is a terminal on the desk.
The reason Iâm defining a kind
rather than simply instantiating the objects directly is because there are many instances of rooms with desks, terminals, etc. (some have complicated parts and behaviors). If I must resort to brute force to define each one separately with unique identifiers, then I shall, but not without some gnashing of teeth. That the first example works is a bit baffling; the run time difference between the second and third is mildly mystifying, but what find perversely puzzling is when adding another room:
Away is south of Home.
There is a desk in Away. There is a terminal in Away. [Now the terminal is on the desk.]
This gets past the compiler and runs. When I uncomment the final bit, it fails. I suppose itâs a disambiguation problem for I7 and rooms are special in some way.
The larger question has to do with a scalable way to re-use objects (i.e. populating the world with a collection of these n times), which I have not been able to find in the documentation.