mud/
mud/2.4.5/dgd/include/
mud/2.4.5/dgd/std/
mud/2.4.5/dgd/sys/
mud/2.4.5/doc/
mud/2.4.5/doc/examples/
mud/2.4.5/log/
mud/2.4.5/obj/Go/
mud/2.4.5/players/
mud/2.4.5/players/lars/
mud/2.4.5/room/death/
mud/2.4.5/room/maze1/
mud/2.4.5/room/post_dir/
mud/2.4.5/room/sub/
/* --------- debug.h ---------------------
 created by Tech the toolmaker also know
 as Anders Ripa (ripa@cd.chalmers.se)
--------------------------------------------*/

int is_debug;

/*
generic debug support for any object

typical uses are:

	if(is_debug) {
		write("in routine...\n");
	}
or
	if(is_debug) {
		tell_object(ob, "in routine...\n");
	}
*/

/* do add_action("debug_toggle", "debug"); */

debug_toggle(str) {
	if(!str || !id(str)) return 0;

	is_debug += 1;
	if(is_debug > 1) is_debug = 0;
	if(is_debug) {
		write("Debug is enabled for " + short() + "\n");
	} else {
		write("Debug is disabled for " + short() + "\n");
	}
	return 1;
}

query_debug() { return is_debug; }

set_debug(arg) { is_debug = arg; }