[i7] giving a part of an item

I’m still using the old version of inform, 6G60, for an old project, and using the following code, which doesn’t compile in 6L02:

“part of” by Andrew Schultz

[code]room 1 is a room. the flowerpot is a thing in room 1. the flower is part of the flowerpot. the packet is a container in room 1. the packet contains the seeds.

Biff is a person in room 1.

before giving the flower to biff: ignore the can’t give what you haven’t got rule;
before giving the seeds to biff: ignore the can’t give what you haven’t got rule;

test basic with “give flowerpot to biff/give flower to biff/give seeds to biff”[/code]

I would expect that you can give the flower to Biff, but instead, the game tries to take the flower, and when that fails, it gives up. But things work for the seeds, which are just contained by the packet.

Is there any simple rule to have Inform ignore so I can give an item that is part of something? Or is it ultimately simpler to just convert the flowerpot to a container and make sure you can’t put stuff in it?

This may not be the example of something that is part of another thing. But it seems like something that’ll come up again for me, whether I need to reject “part of” for “is contained by,” or whether there is a neat workaround.


The second method is probably better. Add this to prevent adding things to the pot:

Check inserting something into the flowerpot: if the noun is not the flower, say "It's full of dirt." instead.

If you ever want to convert this to 6L02, the part causing the errors is the phrase “ignore [rule]”. Change it to “the [rule] does nothing when [condition]”.

Thanks much! My fear of not using a container is more related to other stuff you might be able to do with a container that I didn’t know about. But I can check you can’t put anything on or in the container, so that should be good enough.

Also thanks for helping me chip away at 6L02.