This is a problem with Inform 6, so please don’t give me Inform 7 solutions.
I hate implicit actions because they give so many stupid responses. I always use no_implicit_actions, but I have just struck some really weird bugs that have me baffled.
I want to be able to put an object in a container without having to first pick up the object. Let’s say the container is a bucket and I want to use the bucket to scoop up some acid or lava or even just water. You can’t get these types of objects before putting them in a container. I have a fill routine for the container. I just want PUT OBJECT IN CONTAINER to be diverted to
<<Fill second noun>>. Here’s some sample code:
Include "parser"; Include "verblib"; [ Initialise; no_implicit_actions = true; location = stream; ]; Object stream "Stream" with description "You are standing by a steam.", has light; Object water "water" stream with name 'water', article "some", before [; Insert: print "Inserting...^"; <<Fill second noun>>; ], has; Object rocks "rocks" stream with name 'rocks//p', before [; Insert: print "Inserting...^"; <<Fill second noun>>; ], has pluralname; Object bucket "bucket" stream with name 'bucket', description "It's a metal bucket.", before [; Fill: move second to self; "You fill the bucket with ", (the)second, "."; ], has container open; Include "grammar"; Extend 'fill' first * noun 'with' noun -> Fill;
When I PUT ROCKS IN BUCKET, it says “I don’t understand that sentence.”, even though there’s nothing wrong with it.
When I PUT WATER IN BUCKET, it says “You aren’t holding that!”
When I get the bucket and the water, then PUT IT IN BUCKET, it works fine. When I FILL BUCKET WITH ROCKS or FILL BUCKET WITH WATER, it works fine. So my questions are:
Why do PUT ROCKS and PUT WATER give different responses?
Why don’t the two before:Insert routines get executed when you PUT WATER IN BUCKET or PUT ROCKS IN BUCKET when those objects aren’t held? The debugging print statements are never executed, so the parser is clearly deciding to issue one of two different error responses and abort before the before routine can be executed.