Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000865Core InformActionspublic2012-02-13 23:172014-05-07 07:33
Assigned Tograham 
Platformx64OSWindowsOS Version7 SP1
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000865: The player's command does not include the noun when it is provided by disambiguation
DescriptionI understand why ">GET" would not trigger the After rule; the player's command literally does not mention the orange, the system simply assumes that's what the player means.

But throwing away the word parsed from a disambiguation request, rather than appending it to the player's command, seems to be incorrect behavior to me. There's no way to access that disambiguating word as a snippet within Inform, is there?
Minimal Source Text To Reproduce
Happy Room is a room.

Here is an orange. Player holds a bottle.

After reading a command when the player's command includes "[orange]": 
	say "The orange does not exist, has never existed, will never exist."; 
	remove the orange from play;
	stop the action.
After doing something when the orange is off-stage:
	now the orange is in the location.

Every turn, showme the player's command.
Additional Information>get
(the orange)

"player's command" = snippet: get
What do you want to drop?


"player's command" = snippet: drop
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
curiousdannii (developer)
2012-06-20 09:12

Lot's going on here!

Firstly, disambiguation occurs after the reading a command activity, so you'll never be able to get disambiguation info at that time.

Secondly, outside of the reading a command activity you're probably better off checking the current action instead of the player's command.

Thirdly, sometimes the player's command is amended, and sometimes it isn't! I don't know why. See the following code.

- - - -
There is a room.
Here is an orange ball. Here is an orange hat. Here is an orange pencil.

After reading a command when the player's command includes "[orange]":
    say "The orange does not exist, has never existed, will never exist.";
    stop the action.

Every turn:
    showme the player's command;
    showme the current action.

Test me with "get orange / get / orange / ball / get / pencil / get".
- - - -
EmacsUser (manager)
2012-08-05 09:30

Confirming based on Jesse's explanation:

- - - -
I'd call this a bug: the variable "the player's command" is not being updated even though the parse buffer is. Normal disambiguation does update it, but special disambiguation due to an incomplete command doesn't. Probably every assignment to num_words in Parser.i6t should be paired with an assignment to players_command - that's done just above the .ReParse label but not just below it, causing the bug. Alternatively, "the player's command" should be a function instead of (100 + num_words).
- - - -

- Issue History
Date Modified Username Field Change
2012-02-13 23:17 ChrisC New Issue
2012-06-20 09:12 curiousdannii Note Added: 0001691
2012-06-20 09:12 curiousdannii Status new => feedback
2012-08-05 09:30 EmacsUser Note Added: 0001758
2012-08-05 09:30 EmacsUser Status feedback => confirmed
2014-01-27 11:08 graham Status confirmed => resolved
2014-01-27 11:08 graham Resolution open => fixed
2014-01-27 11:08 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker