<screen src="swfs/screens/Floor2/Dentists_Room.swf" footstep="Stone">
	<warning id="LOCATION_FLOOR2_DENTISTS_ROOM"/>
	<unlockRoom id="Floor2/DENTISTS_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>
	
	
	<state>
		<requirement type="session" id="M5_POWER_RESTORED" warning="ERROR_ROOM_TOO_DARK"/>
		<requirement type="session" id="SOLVED_DENTISTS_ROOM" value="false" />
		<poi value="on" target="active_screen" object="HO_area"/>
	</state>
	<state>
		<requirement type="session" id="SOLVED_DENTISTS_ROOM_2" value="false" />
		<requirement type="session" id="ACTIVE_MISSION" value="7" />
		<poi value="on" target="active_screen" object="HO_area"/>
	</state>
	<property type="visible" value="false" assign="object_window" name="chair_down" />
	<!--
	<state>
		<requirement type="session" id="SOLVED_DENTISTS_ROOM" value="true"/>		
		<property type="visible" value="false" assign="object_window" name="HO_area" />
	</state>
	-->
	<object name="HO_area" id="HO_AREA" cursor="hand" tooltip="LOCATION_FLOOR2_DENTISTS_TOOLS">
		<state>
			<requirement type="session" id="M5_POWER_RESTORED"/>
			<requirement type="session" id="SOLVED_DENTISTS_ROOM" value="false" />
			<object name="HO_area" id="HO_AREA" cursor="spyglass"/>
		</state>
		<state>
			<requirement type="session" id="SOLVED_DENTISTS_ROOM_2" value="false" />
			<requirement type="session" id="ACTIVE_MISSION" value="7" />
			<object name="HO_area" id="HO_AREA" cursor="spyglass"/>
		</state>
		
		<event type="clicked">
			<requirement type="session" id="M5_POWER_RESTORED"/>
			<requirement type="session" id="SOLVED_DENTISTS_ROOM" value="false" />
			<portal target="HO_SCREEN/HO_DENTISTS_ROOM" hidden_screen="true" />
		</event> 		
		<event type="clicked">
			<requirement type="session" id="SOLVED_DENTISTS_ROOM_2" value="false" />
			<requirement type="session" id="ACTIVE_MISSION" value="7" />
			<portal target="HO_SCREEN/HO_DENTISTS_ROOM" hidden_screen="true" />
		</event> 
		
		<event type="clicked">
			<requirement type="session" id="ACTIVE_MISSION" valueNot="7" />
			<requirement type="session" id="SOLVED_DENTISTS_ROOM" value="true" />
			<warning id="DENTIST_AREA3"/>
		</event>
		<event type="clicked">
			<requirement type="session" id="ACTIVE_MISSION" value="7" />
			<requirement type="session" id="SOLVED_DENTISTS_ROOM_2" value="true" />
			<warning id="DENTIST_AREA3"/>
		</event>
	</object>

	
	
	
	
	
	
	
	<object name="nav_Hallway6" id="NAV_HALLWAY6" cursor="south" tooltip="LOCATION_HALLWAY6_TO">
		<event type="clicked">
			<portal target="Floor2/HALLWAY_6"/>
		</event> 				
	</object>
	
	<!--<object name="wall" id="WALL" cursor="hand" tooltip="ERROR_WALL">
		<state>
			<requirement type="session" id="ACTIVE_MISSION" value="6"/>
			<requirement type="session" id="M6_DOCTOR_NAME_OBTAINED" value="false"/>	
			<poi value="on" target="active_screen" object="wall" align="right" />
		</state>
		<event type="clicked">
			<session id="M6_DOCTOR_NAME_OBTAINED"/>
			<poi value="off" target="active_screen" object="wall" align="right" />
			<warning id="DOCTOR_NAME_OBTAINED"/>
		</event> 				
	</object>-->
	<state>
		<requirement type="session" id="M7_GOT_SUN_EMBLEM"/>
		<property type="visible" value="false" assign="object_window" name="chair" />
	</state>
	<state>
		<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="false" />
		<requirement type="session" id="M7_GOT_WIRE_PIECE" value="true" />
		<poi value="on" target="active_screen" object="chair" align="right" type="single" />
	</state>
	<object name="chair" id="CHAIR" cursor="spyglass" >
		<event type="clicked">
			<requirement type="session" id="M7_GOT_SUN_EMBLEM" value="false" />
						
			<window src="swfs/windows/Chair_Control_panel.swf">	
				<state>
					<object name="effect_spark1" id="EFFECT_SPARK1" mouseEnabled="false" />
					<object name="effect_spark2" id="EFFECT_SPARK2" mouseEnabled="false" />
				</state>
				<state>
					<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="false" />
					<property type="visible" value="false" assign="object_window" name="wire" />
				</state>
				<object name="background" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="false" />
						<requirement type="holding_item" id="WIRE_PIECE" warning="DENTIST_CHAIR_NEED_WIRE_PIECE" />
						
						<sound src="Audio/SFX/FLOOR2/operating_room_difibulator_zap.mp3" />
						<item remove="true" id="WIRE_PIECE"/>
						<session id="M7_DENTIST_CHAIR_FIXED"/>
						<property type="visible" value="true" assign="object_window" name="wire" />
						
						<property type="frame" value="activate" stop="false" assign="object_window" name="effect_spark1" />
						<property type="frame" value="activate" stop="false" assign="object_window" name="effect_spark2" />
						
					</event> 
				</object>
				<object name="button_up" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" warning="DENTIST_CHAIR_NEED_WIRE_PIECE" />
						<sound src="Audio/SFX/FLOOR2/dentist_button_pressed.mp3" />
						<property type="visible" value="false" assign="object_window" name="button_up" />
						<delay time="1000"/>
						<closeWindow/>
						<sound src="Audio/SFX/FLOOR2/dentist_chair_reclining.mp3" />
						<delay time="1000"/>
						<property type="visible" value="true" assign="active_screen" name="chair_down" />
						<delay time="1000"/>
						<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="true" />
						<requirement type="session" id="M7_GOT_SUN_EMBLEM" value="false" />
						
						<object name="chair" id="CHAIR" assign="active_screen" cursor="spyglass" />
						<window src="swfs/windows/dentist_light.swf">
							<object name="sunkey" cursor="hand">
								<event type="clicked">
									<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="true" />
									<requirement type="session" id="M7_GOT_SUN_EMBLEM" value="false" />
									<item name="sun_emblem" id="SUN_EMBLEM" src="images/items/sun_emblem.png" large_src="images/items/sun_emblem_large.png"/>
									<items_collected>
										<session id="M7_GOT_SUN_EMBLEM"/>
										<goal id="TASK_6_11" priority="11" />
										<closeWindow/>
										<property type="visible" value="false" assign="object_window" name="chair" />
									</items_collected>	
								</event> 
							</object>
							
						</window>
					</event>
				</object>
									
			</window>
		</event> 	
		<!--
		<event type="clicked">			
			<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="true" />
			<requirement type="session" id="M7_GOT_SUN_EMBLEM" value="false" />
			<window src="swfs/windows/dentist_light.swf">
				<object name="sunkey" cursor="hand">
					<event type="clicked">
						<requirement type="session" id="M7_DENTIST_CHAIR_FIXED" value="true" />
						<requirement type="session" id="M7_GOT_SUN_EMBLEM" value="false" />
						<item name="sun_emblem" id="SUN_EMBLEM" src="images/items/security_badge.png"/>
						<items_collected>
							<goal id="TASK_6_11"/>
							<session id="M7_GOT_SUN_EMBLEM"/>
							<closeWindow/>
						</items_collected>	
					</event> 
				</object>
				
			</window>
				
		</event>
		-->
	</object>
	
	<object name="area1" id="AREA1" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="DENTIST_AREA1"/>
		</event>		
	</object>
	<object name="area2" id="AREA2" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="DENTIST_AREA2"/>
		</event>		
	</object>
	
	<object name="area4" id="AREA4" basic="true" cursor="hand">
		<event type="clicked">
			<warning id="DENTIST_AREA4"/>
		</event>		
	</object>
</screen>


			