how to make an action need something else before completing

i am making a cooking/baking game…

once i tried to make something need water [which referred to a thing]
like before i could boil i needed the water and the other items.

but im not sure how to do that originally.

i could use:

but im still confused, wouldnt i need to make it differently for each thing that can be boiled
like for the different objects that are put in

example: like how a locked container needs the right key, something like that
but for regular things

You could make a relation like “requirement”, and for each item specify a “prerequisite” (e.g., the potato requires the oil, the egg requires the water, et cetera). Then, in the action definition, make it check whether “the prerequisite of the noun” is in the pot.

The answer to the simplest interpretation of your question is:

Instead of boiling something when the water is not inside the pot:
	say "You need water to start boiling [the noun]."

Something includes people, so you’ll need a separate rule to prevent that, unless your game is awesome.

In general, what lux said.

Modeling cooking at this granularity could be complex. Even just heating water in a pot on a stove involves two difficult things (fire and liquids). I’d suggest doing whatever you can to simplify the model within the constraints of what’s important to your game. Possibly just have BOIL X report “You grab a pot, heat some water, and boil [the noun].”