|  |  | @@ -7,6 +7,8 @@ const version = "pre-alpha"; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let state; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let refreshHook; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function print(lines) { | 
		
	
		
			
			|  |  |  | (lines.concat([newline])).forEach(line => { | 
		
	
		
			
			|  |  |  | const log = document.querySelector("#log"); | 
		
	
	
		
			
				|  |  | @@ -24,6 +26,10 @@ function refresh() { | 
		
	
		
			
			|  |  |  | updateRoom(state); | 
		
	
		
			
			|  |  |  | updateWorldInfo(state); | 
		
	
		
			
			|  |  |  | updatePlayerInfo(state); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | if (refreshHook) { | 
		
	
		
			
			|  |  |  | refreshHook(state) | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | function switchModal(to) { | 
		
	
	
		
			
				|  |  | @@ -77,6 +83,8 @@ function init(story) { | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | story.intro.setup(state); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | refreshHook = story.refresh; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | goToRoom(story.intro.start, state); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
	
		
			
				|  |  | 
 |