<screen src="swfs/screens/Floor2/SurgeryPreperationRoom.swf" footstep="Stone">
	<warning id="LOCATION_FLOOR2_SURGERY_PREPARATION_ROOM"/>
	<unlockRoom id="Floor2/SURGERY_PREPARATION_ROOM"/>
	
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" value="true" />
		<music src="Audio/Music/FLOOR2/LIGHTS_ON.mp3" fadeIn="10000" channel="MUSIC" loop="true"/>
	</state>
	<music src="Audio/Ambient/FLOOR2/OPERATING_ROOM.mp3" channel="AMBIENT" fadeIn="5000" loop="true"/>
	
	<object name="nav_Operating_room" id="NAV_OPERATING_ROOM" cursor="south" tooltip="LOCATION_SURGERY_ROOM_TO">
		<event type="clicked">
			<portal target="Floor2/OPERATING_ROOM"/>  
		</event> 				
	</object>
	
	<state>
		<requirement type="session" id="M6_FIXED_HOT_WATER_TAP" value="true" />	
		<property type="visible" value="false" assign="active_screen" name="tap" />
		<property type="visible" value="false" assign="active_screen" name="area2" />
		
		<property type="frame" value="done" stop="true" assign="active_screen" name="knob_1" />
		<property type="frame" value="active" stop="true" assign="active_screen" name="combo" />
					
	</state>
	<state>
		<requirement type="session" id="M6_DRILL_USED" value="true" />		
		<property type="visible" value="false" assign="object_window" name="tool_box_closed" />
		<property type="visible" value="true" assign="object_window" name="tool_box_open" />	
	</state>
	<state>
		<requirement type="session" id="M6_DRILL_USED" value="false" />		
		<property type="visible" value="true" assign="object_window" name="tool_box_closed" />
		<property type="visible" value="false" assign="object_window" name="tool_box_open" />		
	</state>
	
	
	<state>
		<requirement type="session" id="PICKED_AUDIO_TAPE_11" value="true" />
		<property type="visible" value="false" assign="object_window" name="audio_tape_11" />
	</state>
	
	<state>
		<requirement type="session" id="M6_FIXED_HOT_WATER_TAP" value="true" />
		<requirement type="session" id="PICKED_AUDIO_TAPE_11" value="false" />
		<poi value="on" target="active_screen" object="audio_tape_11" align="origin" type="single" />
	</state>
	
	<object name="audio_tape_11" id="AUDIO_TAPE_11" cursor="hand">
		<event type="clicked">
			<property type="visible" value="false" assign="object_window" name="audio_tape_11" />
			<session id="PICKED_AUDIO_TAPE_11"/>	
			<unlockAudioTape id="11"/>
			<show_book tab="3"/>
			<sound src="Audio/SFX/GAME/tape_collected.mp3" />
			<closeWindow/>
		</event>
					
	</object>
	
	<object name="toolbox" id="TOOLBOX" cursor="spyglass">
		<state>
			<requirement type="session" id="M6_GOT_SCALPEL" value="true" />
			<object name="toolbox" id="TOOLBOX" cursor="default"/>
		</state>
		<state>
			<requirement type="session" id="M6_GOT_SCALPEL" value="false" />
			<requirement type="session" id="M6_DRILL" value="true" />
			<!--<object name="toolbox" id="TOOLBOX" cursor="hand"/>-->
			<poi value="on" target="active_screen" object="toolbox" type="single" align="origin" />
		</state>
		<event type="clicked">
			<requirement type="session" id="M6_GOT_SCALPEL" value="false" />
			<window src="swfs/windows/tool_box.swf">
				<state>
					<requirement type="session" id="M6_DRILL_USED" value="false" />
					<property type="visible" value="false" assign="object_window" name="lidopen" />
				</state>
				<state>
					<requirement type="session" id="M6_DRILL_USED" value="true" />
					<property type="visible" value="false" assign="object_window" name="Lidclose" />
					<property type="visible" value="false" assign="object_window" name="overlay" />
				</state>
				<object name="drill_animation">
					<event type="frame" value="active">
						<item remove="true" id="DRILL"/>
						<session id="M6_DRILL_USED"/>
						
						<fadeIn assign="active_screen" name="tool_box_open"  time="500"/>
						<fadeOut assign="active_screen" name="tool_box_closed"  time="500"/>
						
						
		
						<fadeIn assign="object_window" name="lidopen" time="500" />
						<fadeOut assign="object_window" name="Lidclose" time="500" />
					</event>
				</object>
				<object name="scalpel" cursor="hand">
					<event type="clicked">					
						<requirement type="session" id="M6_DRILL_USED" value="true" />
						<requirement type="session" id="M6_GOT_SCALPEL" value="false" />
						<item name="scalpel" id="SCALPEL" src="images/items/scalpel.png" large_src="images/items/scalpel_large.png"/>
						<items_collected>
							<session id="M6_GOT_SCALPEL" />
							
							<object name="toolbox" id="TOOLBOX" assign="active_screen" cursor="default"/>
							<poi value="off" target="active_screen" object="toolbox"/>
							<closeWindow/>
						</items_collected>	
					</event>
				</object> 
				<object name="overlay">
					<event type="clicked">
						<requirement type="session" id="M6_DRILL_USED" value="false" />
						<requirement type="holding_item" id="DRILL" warning="PREPARATION_ROOM_NEED_A_DRILL" />
						<property type="frame" value="activate" stop="false" assign="object_window" name="drill_animation" />
					
						<property type="visible" value="false" assign="object_window" name="overlay" />
						<sound src="Audio/SFX/FLOOR2/preparation_room_drilling.mp3" />
						
						
						
					</event>
				</object>
				
				
				
			</window> 
		</event>
	</object>
	
	<state>
		<requirement type="session" id="M6_FIXED_HOT_WATER_TAP" value="true" />	
		<property type="visible" value="false" assign="object_window" name="tap" />
	</state>
	
	
	<state>
		<requirement type="session" id="M6_FIXED_HOT_WATER_TAP" value="true" />	
		<requirement type="session" id="M6_SAFE_CODE_OBTAINED" value="false" />	
		<property type="frame" value="activate" stop="false" assign="active_screen" name="knob_1" />
		<property type="frame" value="activate" stop="false" assign="active_screen" name="combo" />
		<sound src="Audio/SFX/FLOOR2/preparation_room_faucet.mp3" />			
		<delay time="1400"/>
		<sound src="Audio/SFX/FLOOR2/prep_room_water.mp3" />
	</state>
	<object name="combo">
		<event type="frame" value="unlocked">
			<item remove="true" id="FAUCET" />
			<session id="M6_SAFE_CODE_OBTAINED" />
			<goal id="TASK_5_3" remove="true" />

			<goal id="TASK_6_4" priority="5" />
			
			<poi value="off" target="active_screen" object="tap" type="single" />
			
			
			<newChapter id="10"/>
			<!--<show_book tab="4"/>-->
			
			
			<property type="visible" value="false" assign="active_screen" name="tap" />
			<property type="visible" value="false" assign="active_screen" name="area2" />
			<cinematic id="PREPARATION_ROOM_AREA1B"/>
		</event>
	</object>
	<object name="tap" id="TAP" >
		<state>
			<requirement type="session" id="ACTIVE_MISSION" value="6" />
			<requirement type="session" id="M6_FIXED_HOT_WATER_TAP" value="false" />
			<object name="tap" id="TAP" cursor="hand"/>
			<poi value="on" target="active_screen" object="tap" align="origin" type="single" />
		</state>
		<event type="clicked">
			<requirement type="session" id="M6_SAFE_CODE_OBTAINED" value="false" />
			<requirement type="holding_item" id="FAUCET" warning="PREPARATION_ROOM_NEED_SINK_FAUCET" />
			
			
			<property type="frame" value="activate" stop="false" assign="active_screen" name="knob_1" />
			<property type="frame" value="activate" stop="false" assign="active_screen" name="combo" />
			
			<sound src="Audio/SFX/FLOOR2/preparation_room_faucet.mp3" />
			<session id="M6_FIXED_HOT_WATER_TAP"/>	
			<delay time="1400"/>
			<sound src="Audio/SFX/FLOOR2/prep_room_water.mp3" />
		</event> 
	</object>
	
	<object name="area1" id="AREA1" basic="true" cursor="hand">
		<event type="clicked">
			<requirement type="session" id="M6_SAFE_CODE_OBTAINED" value="false" />
			<warning id="PREPARATION_ROOM_AREA1A"/>
		</event>		
		<event type="clicked">
			<requirement type="session" id="M6_SAFE_CODE_OBTAINED" value="true" />
			<warning id="PREPARATION_ROOM_AREA1B"/>
		</event>		
	</object>
	<object name="area2" id="AREA2" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="PREPARATION_ROOM_AREA2"/>
		</event>		
	</object>
	<object name="area3" id="AREA3" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="PREPARATION_ROOM_AREA3"/>
		</event>		
	</object>
</screen>