:: fallAsleepEvents[include indoors_events outdoors_events]
<<if $pc.pcs_sleep <= 0>>
	<<either 0>>

	<<or 25>>
		
		<<event 1000>>
			<<eventFired>>
			<<if _targetPassageTags.includes('indoors')>>
				<<set _sleepTime = rand(30,90)>>
				<<if _targetPassageTags.includes('kitchen')>>
					<<image 'pc/activities/sleep/kitchen_0.jpg'>>
					<p>
						You are so tired and the kitchen table suddenly looks so soft.
						Deciding to only rest your head for a few seconds you test it.
					</p>
					<p>
						A little puzzled, you wake up again a few minutes later.
					</p>
				<<elseif _targetPassageTags.includes('private')>>
					<<image 'pc/activities/sleep/floor_0.jpg'>>
					<p>
						You are so tired and the floor suddenly looks so soft.
						Deciding to only rest your head for a few seconds you test it.
					</p>
					<p>
						A little puzzled, you wake up again a few minutes later.
					</p>
				<<else>>
					<<image 'pc/activities/sleep/indoor_public_n.webp'>>
					<p>
						You are so tired and a nearby chair suddenly looks so soft.
						Deciding to only rest your head for a few seconds you test it.
					</p>
					<p>
						A little puzzled, you wake up again a few minutes later.
					</p>
				<</if>>
				
			<<elseif _targetPassageTags.includes('outdoors')>>
				<<imageDayNight 'pc/activities/sleep/outdoors#.jpg' '' '_n'>>
				<p>
					You are so tired and a nearby bench suddenly looks so soft.
					Deciding to only rest your head for a few seconds you test it.
				</p>
				<p>
					A little puzzled, you wake up again a few minutes later.
				</p>
			<</if>>
			<<ret 'Stand up'>>
			<<set $pc.isSleeping= 1>>
			<<addtime _sleepTime>>
			<<set $pc.isSleeping= 0>>
		<</event>>
	<</either>>
<</if>>

