"../deathforth/rooms/industrial.txt" $load-rooms
"../deathforth/rooms/bigoffice.txt" $add-rooms
"../deathforth/rooms/restroom.txt" $add-rooms
"events/inner/officeloc.df" $load

	location
		tags: factory
		max-rooms: 16
		entry-tags: indust-start
		
		2 value indroomcountdown
		
		: restdoor random-door "restroom" only-with-door ;		
		: extraindloot
			30 %chance if random-door "treasure" only-with-door then 
			20 %chance if random-door "death" only-with-door then 
		;
		
		: factoryhall
			factorylloot
			random-door "indust-room" only-with-door
			extraindloot
		;

		: startfactoryhall
			3 for random-door "indust-hall" only-with-door next
		;
		
		: tryfactoryend
			factorylloot
			' indroomcountdown --
			indroomcountdown 1 < if 
				random-door "execsafe" only-with-door
				random-door "emplounge" only-with-door
				extraindloot restdoor
			then;
			random-door "indust-hall" with-door
		;
		
		script: factory-theme 
		post-script: 10diff %zombs map{ room-papers 25 %chance if swreckage then 15 %chance if room-garbage then } nad ndx

		
		room-choice: indust-start
			room-weight: 1
			room-count: 1
			room-post-script: startfactoryhall
			filter-only
		
		room-choice: indust-room
			room-weight: 1
			room-count: 2
			room-post-script: tryfactoryend
			filter-only
			
		room-choice: execsafe
			room-weight: 10
			room-count: 1
			room-script: floor-office
			room-post-script: execloot 
			filter-only
		
		room-choice: emplounge
			room-weight: 10
			room-count: 1
			room-script: 
			room-post-script: officefood restdoor	
			filter-only			

		room-choice: indust-room
			room-weight: 10
			room-count: 1
			filter-only
			
		room-choice: indust-room
			room-weight: 10
			room-count: 1
			room-script: combonote
			filter-only

		room-choice: treasure
			room-weight: 1
			room-count: 3
			filter-only
			
		room-choice: restroom
			room-weight: 10
			room-count: 1
			room-script: floor-bath
		
		room-choice: death
			room-weight: 1
			room-count: 1
			filter-only

		room-choice: indust-hall
			room-weight: 1
			room-count: 4
			room-post-script: factoryhall 
			filter-only

regiondef{

	region: industry
		w: 40
		h: 23
		max-locs: 1
		script: timeofday o'clock resetsafe
		post-script: 10diff %zombs inspawn

		inside no-prefab

		"REGION LOCATIONS" print
					
		loc-choice: factory
			loc-weight: 99
			loc-count: 1

}
