Disambiguation breaking when changing the player's command - Only in 10.1.0

I have a rule that changes the player’s command and it breaks disambiguation in 10.1, but is fine in 6M62.

Here’s the code:

"Whatcha mean?"

Laboratory is a room.

After reading a command:
	let N be "[the player's command]";
	say "Started with [N].";
	change the text of the player's command to N.
 
A ball is a kind of thing.
The large ball is a ball in the laboratory.
The miniscule ball is a ball in the laboratory.

And here’s what happens:

Laboratory
You can see a large ball and a miniscule ball here.
 
>x ball
Started with x ball.
 
Which do you mean, the large ball or the miniscule ball?
 
>large
Started with x larg.
You can't see any such thing.

It looks like the command is truncated to be the same length as the original command when doing disambiguation and using After reading a command:. If I comment out that rule everything is fine.

What’s going on? And more importantly, how do I fix it?

1 Like

fixed in current dev.

I7-2306
I7-2276

3 Likes

This workaround works, thanks Zed:

To retokenise: (- VM_Tokenise(buffer, parse); players_command = 100 + WordCount(); -).

After reading a command when not asking which do you mean (this is the mangle possessives in the players command rule):
	retokenise;
	let N be "[the player's command]";
	replace the regular expression "(\w)[']s" in N with "\1 [']s";
	replace the regular expression "s['](\W)" in N with "s [']s\1"; [Cheat to handle possessives]
	change the text of the player's command to N.
3 Likes