<scene name="Room28" numVictoryConditions="1">
	<inventory>
		<object name="Lighter" memberName="HUD_lighter" acquired="0" visible="1">
			<onUseObject name="Benzene">
				<action target="Scene" name="RemoveFromInventory" param="Benzene"/>
				<action target="Scene" name="RemoveFromInventory" param="Lighter"/>
				<action target="Scene" name="AddToInventory" param="FullLighter"/>
				<action target="Scene" name="PlaySound" param="use_benzin_on_lighter"/>
			</onUseObject>
			<onUseObject name="Manual">
				<action target="Scene" name="ShowDialog" param="empty_lighter"/>
			</onUseObject>
		</object>
		<object name="Key" memberName="HUD_key" acquired="0" visible="1"/>
		<object name="Manual" memberName="HUD_manual" acquired="0" visible="1">
			<onUseObject name="FullLighter">
				<action target="Scene" name="RemoveFromInventory" param="FullLighter"/>
				<action target="Scene" name="RemoveFromInventory" param="Manual"/>
				<action target="Scene" name="AddToInventory" param="Fire"/>
			</onUseObject>
			<onUseObject name="Lighter">
				<action target="Scene" name="ShowDialog" param="empty_lighter"/>
			</onUseObject>
		</object>
		<object name="Benzene" memberName="HUD_benzene" acquired="0" visible="1">
			<onUseObject name="Lighter">
				<action target="Scene" name="RemoveFromInventory" param="Benzene"/>
				<action target="Scene" name="RemoveFromInventory" param="Lighter"/>
				<action target="Scene" name="AddToInventory" param="FullLighter"/>
				<action target="Scene" name="PlaySound" param="use_benzin_on_lighter"/>
			</onUseObject>
		</object>
		<object name="FullLighter" memberName="HUD_lighter" acquired="0" visible="0">
			<onUseObject name="Manual">
				<action target="Scene" name="RemoveFromInventory" param="FullLighter"/>
				<action target="Scene" name="RemoveFromInventory" param="Manual"/>
				<action target="Scene" name="AddToInventory" param="Fire"/>
			</onUseObject>
		</object>
		<object name="Fire" memberName="HUD_fire" acquired="0" visible="0"/>
	</inventory>
	
	<finalStates>
		<finalState objName="Pocket" state="noLighter"/>
		<finalState objName="Drawer" state="noKey"/>
		<finalState objName="FirstAidKit" state="noManual"/>
		<finalState objName="CashRegister" state="noBenzene"/>
		<finalState objName="SmokeDetector" state="on"/>
		<finalState objName="Door" state="unlocked"/>
	</finalStates>
	
	<zoomWindows>
		<zoomWindow name="PocketWindow" file="ZoomWindows\Room28_PocketWindow.dir" x="600" y="340" visible="0"/>
		<zoomWindow name="DrawerWindow" file="ZoomWindows\Room28_DrawerWindow.dir" x="360" y="462" visible="0"/>
		<zoomWindow name="FirstAidKitWindow" file="ZoomWindows\Room28_FirstAidKitWindow.dir" x="480" y="300" visible="0"/>
		<zoomWindow name="CashRegisterWindow" file="ZoomWindows\Room28_CashRegisterWindow.dir" x="470" y="400" visible="0"/>
	</zoomWindows>
	
	<objects>
		<object name="Pocket">
			<clickStrategy type="rect" left="580" top="270" right="800" bottom="500"/>
			<states>
				<state name="withLighter">
					<onStateEnter>
						<action target="Scene" name="PlaySound" param="indoor_small"/>
						<action target="Scene" name="PlaySound" param="traffic"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					
					<onClick><action target="Scene" name="OpenWindow" param="PocketWindow"/></onClick>
				</state>
				
				<state name="noLighter">
					<onStateEnter>
						<action target="Scene" name="CloseWindow" param="PocketWindow" delay="60"/>
						<action target="Scene" name="PlaySound" param="Item_Pickup_Cloth_small"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Drawer">
			<clickStrategy type="alpha" layer="Drawer"/>
			<states>
				<state name="closed">
					<onStateEnter><action target="Scene" name="HideLayer" param="Drawer"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="DrawerWindow"/>
						<action target="Drawer" name="SetState" param="open"/>
						<action target="Scene" name="PlaySound" param="open_drawer"/>
					</onClick>
				</state>
				
				<state name="open">
					<onStateEnter><action target="Scene" name="ShowLayer" param="Drawer"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick><action target="Scene" name="OpenWindow" param="DrawerWindow"/></onClick>
				</state>
				
				<state name="noKey">
					<onStateEnter>
						<action target="Scene" name="CloseWindow" param="DrawerWindow" delay="60"/>
						<action target="Scene" name="ShowLayer" param="Drawer"/>
						<action target="Scene" name="PlaySound" param="take_a_key"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="FirstAidKit">
			<clickStrategy type="alpha" layer="FirstAidKit"/>
			<states>
				<state name="closed">
					<onStateEnter><action target="Scene" name="HideLayer" param="FirstAidKit"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="FirstAidKitWindow"/>
						<action target="FirstAidKit" name="SetState" param="open"/>
						<action target="Scene" name="PlaySound" param="open_first_aid"/>
					</onClick>
				</state>
				
				<state name="open">
					<onStateEnter><action target="Scene" name="ShowLayer" param="FirstAidKit"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick><action target="Scene" name="OpenWindow" param="FirstAidKitWindow"/></onClick>
				</state>
				
				<state name="noManual">
					<onStateEnter>
						<action target="Scene" name="CloseWindow" param="FirstAidKitWindow" delay="60"/>
						<action target="Scene" name="ShowLayer" param="FirstAidKit"/>
					</onStateEnter>
				</state>				
			</states>
		</object>
		
		<object name="CashRegister">
			<clickStrategy type="alpha" layer="CashRegister"/>
			<states>
				<state name="closed">
					<onStateEnter><action target="Scene" name="HideLayer" param="CashRegister"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="OpenWindow" param="CashRegisterWindow"/>
						<action target="Scene" name="ShowDialog" param="register_click"/>
					</onClick>
					
					<onUseObject name="Key">
						<action target="Scene" name="RemoveFromInventory" param="Key"/>
						<action target="Scene" name="OpenWindow" param="CashRegisterWindow"/>
						<action target="CashRegister" name="SetState" param="open"/>
					</onUseObject>
				</state>
				
				<state name="open">
					<onStateEnter><action target="Scene" name="ShowLayer" param="CashRegister"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="zoom"/>
					</onMouseOver>
					
					<onClick><action target="Scene" name="OpenWindow" param="CashRegisterWindow"/></onClick>
				</state>
				
				<state name="noBenzene">
					<onStateEnter>
						<action target="Scene" name="CloseWindow" param="CashRegisterWindow" delay="60"/>
						<action target="Scene" name="ShowLayer" param="CashRegister"/>
						<action target="Scene" name="PlaySound" param="Item_Pickup_Metal_small"/>
					</onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="SmokeDetector">
			<clickStrategy type="rect" left="230" top="148" right="266" bottom="200"/>
			<states>
				<state name="off">
					<onStateEnter><action target="Scene" name="HideLayer" param="RedLight"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="interactive"/>
					</onMouseOver>
					
					<onUseObject name="Fire">
						<action target="Scene" name="RemoveFromInventory" param="Fire"/>
						<action target="SmokeDetector" name="SetState" param="on"/>
						<action target="Door" name="SetState" param="unlocked"/>
						<action target="Scene" name="PlaySound" param="use_lighter_on_fire_sensor"/>
						<action target="Scene" name="PlaySound" param="alarm_loop"/>
					</onUseObject>
				</state>				
				
				<state name="on">
					<onStateEnter><action target="Scene" name="ShowLayer" param="RedLight"/></onStateEnter>
				</state>
			</states>
		</object>
		
		<object name="Door">
			<clickStrategy type="alpha" layer="OpenDoor"/>
			<states>
				<state name="locked">
					<onStateEnter><action target="Scene" name="HideLayer" param="OpenDoor"/></onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="noExit"/>
					</onMouseOver>
					
					<onClick>
						<action target="Scene" name="ShowDialog" param="door_click"/>
					</onClick>
				</state>
				
				<state name="unlocked">
					<onStateEnter>
						<action target="Scene" name="ShowLayer" param="OpenDoor"/>
						<action target="Scene" name="PlaySound" param="door_unlock"/>
					</onStateEnter>
					
					<onMouseOver>
						<action target="Scene" name="SetCursor" param="exit"/>
					</onMouseOver>					
					
					<onClick>
						<action target="Scene" name="RegisterVictoryCondition" param=""/>
					</onClick>
				</state>
			</states>
		</object>
	</objects>
</scene>

