[I7] Remove "undo" entirely

Before anyone answers the obvious, I don’t mean what Use Undo Prevention does. I want the parser to respond to >Undo with “That’s not a verb I recognize.” by default and completely revise its function.

I’ve tried to intercept it:

After reading a command:
	If the player's command includes "undo":
		[...]
		Reject the player's command.

but “undo” and “oops” seem to be on a higher level of the parse command rule than after reading a command. Any help with this would be greatly appreciated. I Suspect diving into I6 may be required.

Yes, this is an I6 hack. The simplest way is to modify the “Vocabulary” section of the “Language.i6t” template file and change the constants UNDO1__WD, UNDO2__WD, UNDO3__WD to unused dict words. (Such ‘not,used’ with an embedded comma. Normal parsing will never generate such a word.)

Thanks for the reply! I’ll try this. For collaboration purposes, Is there any way to do it with a stock install/library, using (- -) to drop into I6?

I suppose that if all you want to do is get “undo” to yield “not a verb I recogniz/se” rather than its ordinary failure message with Undo Prevention, you could modify the rule response:

[code]Lab is a room. Use undo prevention.

When play begins: now immediately undo rule response (A) is “[text of parser error internal rule response (N)]”.[/code]

This wouldn’t work to modify the behavior of “undo,” though. There may be hacks for that by changing the response to a say phrase that does stuff:

[code]Lab is a room. Use undo prevention.

When play begins: now immediately undo rule response (A) is “[obnoxious undo response]”.

To say obnoxious undo response:
say “Oh yeah? I’m going to make you jump up and down five times.”;
repeat with n running from 1 to 5:
try jumping.[/code]

but at this point, unless you’re pathologically averse to delving into I6, it’s probably simpler to do what zarf says. Which as a rule is what you should do.

This is actually perfect for my needs, thanks!

You’re welcome! But you should be warned that I have absolutely no idea what’s going on under the hood or what can happen if you make responses do stuff, and my code has been known to be a bit unstable when I start doing ludicrous hacks.