anchor.diff:  	// Loop.
   	Master.StartProcessing(0)
   
  -/datum/controller/master/proc/SetRunLevel(runlevel)
  -	testing("MC: Runlevel changed from [isnull(current_runlevel) ? "NULL" : current_runlevel] to [runlevel]")
  -	current_runlevel = runlevel
  +/datum/controller/master/proc/SetRunLevel(new_runlevel)
  +	var/old_runlevel = current_runlevel
  +	if(isnull(old_runlevel))
  +		old_runlevel = "NULL"
  +
  +	testing("MC: Runlevel changed from [old_runlevel] to [new_runlevel]")
  +	current_runlevel = log(2, new_runlevel) + 1
  +	if(current_runlevel < 1)
  +		CRASH("Attempted to set invalid runlevel: [new_runlevel]")
   
   // Starts the mc, and sticks around to restart it if the loop ever ends.
   /datum/controller/master/proc/StartProcessing(delay)
  
positive.code: 	for(var/I in runlevel_sorted_subsystems)
  		sortTim(runlevel_sorted_subsystems, /proc/cmp_subsystem_priority)
  		I += tickersubsystems
  	
  	var/cached_runlevel = current_runlevel
  	var/list/current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel]
  
  
negative.code: 			timer += world.tick_lag * rand(1, 5)
  			SS.next_fire = timer
  			continue
  
  		var/ss_runlevels = SS.runlevels
  		var/added_to_any = FALSE
  		for(var/I in 1 to GLOB.bitflags.len)
  