I7 6g60: any way to get rid of 100+ scope rules in debug?

So I have this bit of code:

before deciding the scope of the player:
	place the location of the player in scope;
	continue the action;

And if I type RULES and try to debug, it shows this rule 100x before printing anything. This is a bit awkward. I’ve tried later versions, and it works, but the problem is, I have a project it would be hard to port for the later version.

Is there a trick where I could replace some function in parser.i6t so that the initial room is always in scope? I’ve searched around, and the DoScopeAction functions look promising, but I don’t know what to put where.

In DoScopeActionAndRecurse, I tried

if (domain ofclass K1_room) { domain.&add_to_scope; }

but this doesn’t work. Any suggestions? Thanks!

I’d suggest changing the rules debug output instead of messing around with how scope is handled.

This is for 6M62, but I’m sure that you can adapt it to 6G60. The key line is the one in DB_Rule that returns before printing anything if R == (+ the silent rule +).

First Room is west of Second Room.
	
before deciding the scope of the player (this is the silent rule):
	place the location of the player in scope.
	
Include (-
Replace DB_Rule;
-) before "Rulebooks.i6t".

Include (-
[ DB_Rule R N blocked;
	if (R==0 || R==(+ the silent rule +)) return;
	print "[Rule ~", (RulePrintingRule) R, "~ ";
	#ifdef NUMBERED_RULES; print "(", N, ") "; #endif;
	if (blocked == false) "applies.]";
	print "does not apply (wrong ", (address) blocked, ").]^";
];
-) after "Rulebooks.i6t".

I admit I never considered this side effect when I made my original suggestion about the scope rule. :frowning:

Thanks Vince! If you’ve done the heavy lifting, I can certainly clean up the details.

Hey, no worries. Now that I’ve written a game, I know all about unintended side effects for that, much less a whole programming language. And mine are often a bit less, well, minor.

ETA: code works as-is in 6G60, so, yay!