:: bed[quest]

	<<if !$bedSettings>>
		<<set $bedSettings = {
			underwear: 0
		}>>
	<</if>>

<!--<<if !$bedPanty>><<set $bedPanty = 0>><</if>>
<<if !$bedVibrator>><<set $bedVibrator = 0>><</if>>
<<if !$bedAnal>><<set $bedAnal = 0>><</if>>-->

	<!--<<if getvar("$clo_flag['bed']") == 1>>
		<<setinit $clo_flag['bed'] = 0>>
		<<run $wardrobe.wear_clothes_legacy('clothes',$lastwornclothingtype['bed'],$lastwornclothingnumber['bed'])>>
		<<run $wardrobe.wear(['panties',$lastwornpantytype['bed'],$lastwornpantynumber['bed']])>>
		<<run $wardrobe.wear(['bra',$lastwornbratype['bed'],$lastwornbranumber['bed']])>>
	<</if>>-->
	<<if $wardrobe.clothingworntype != 'nude'>>
		<<image "shared/home/bed.jpg">>
	<<else>>
		<<image "shared/home/bedroom/son.jpg">>
	<</if>>
	<p>
		Alarm clock turned on <<checkbox "$alarmClock.on" 0 1 autocheck>>
	</p>
	<!--<<if getvar("$hypnoPanty") <= 0>>-->
		<!--<p>
			Will you always wear your underwear to bed?
			<label><<radiobutton "$bedSettings.underwear" 0 autocheck>> Don't get changed</label>
			<label><<radiobutton "$bedSettings.underwear" 1 autocheck>> Always put underwear on</label>
			<label><<radiobutton "$bedSettings.underwear" 2 autocheck>> No</label>
		</p>-->
	<!--<</if>>-->
	<!--<<if getvar("$analplug") == 1>>
		<p>
			Should you always remove your anal plug before bed?
			<label><<radiobutton "$bedAnal" 0 autocheck>> No</label>
			<label><<radiobutton "$bedAnal" 1 autocheck>> Yes</label>
		</p>
	<</if>>
	<<if getvar("$vibrator") == 1 and getvar("$cheatVib") == 1>>
		<p>
			Should you always remove your vibrator before bed?
			<label><<radiobutton "$bedVibrator" 0 autocheck>> No</label>
			<label><<radiobutton "$bedVibrator" 1 autocheck>> Yes</label>
		</p>
	<</if>>-->
	<<if $pc.makeupAmount > 0>>
		<p><b><font color="red">You should wash off your makeup before going to bed.</font></b></p>
	<</if>>

	<<set _sleepArguments= {}>>
	<<if $wardrobe.clothingworntype == 'nude'>>
		<<set _sleep_txt = 'Go to sleep'>>
	<<else>>
		<<set _sleep_txt = 'Undress and go to sleep'>>
	<</if>>
	<<if $pc.pcs_sleep > 80>>
		<<set _sleepArguments.disabled='You are not tired enough (>80).'>>
	<</if>>
	<<if $pc.pcs_energy < 20>>
		<<set _sleepArguments.disabled='You are too hungry to sleep now.'>>
	<</if>>
	<<if $pc.pcs_hydra < 20>>
		<<set _sleepArguments.disabled='You are too thirsty to sleep now.'>>
	<</if>>

	<<act _sleep_txt undefined _sleepArguments>><<gt 'sleep_prepare'>><</act>>

	<<act 'Daydream' undefined `{time:30,mood:40}`>>
			<<refresh>>
		<</act>>
	<<ret 'Get out of bed'>>
	<!--<<todo>><<actCLA 'Take a nap'>>

	<</actCLA>><</todo>>-->
	<!--<<gs 'events' 'read'>>-->
	<!--<<if $loc == 'bedrPar'>>
		<<if getvar("$locat['Anya_inroom']") == 0 or getvar("$locat['Anya']") == 1 or getvar("$locat['Anya']") == 26>>
			<<if getvar("$pornMagazine") > 0>>
				<<gs 'events' 'read_porn'>>

			<</if>>
			<<if ($pc.horny > 75 and $pc.pcs_inhib >= 60) or ($pc.horny > 50 and $pc.fame('pav_slut') >= 150) or ($pc.horny > 50 and $pc.fame('pav_slut') >= 50 and $pc.pcs_inhib >= 60)>>
				<<actCLA 'Masturbate'>>
					<<set $pc.isSleeping= 0>>
					<<gt 'selfplay' 'start'>>
				<</actCLA>>
			<</if>>
		<</if>>
	<<else>>
		<<if getvar("$pornMagazine") > 0>>
			<<gs 'events' 'read_porn'>>

		<</if>>
		<<if ($pc.horny > 75 and $pc.pcs_inhib >= 60) or ($pc.horny > 50 and $pc.fame('pav_slut') >= 150) or ($pc.horny > 50 and $pc.fame('pav_slut') >= 50 and $pc.pcs_inhib >= 60)>>
			<<actCLA 'Masturbate'>>
				<<set $pc.isSleeping= 0>>
				<<gt 'selfplay' 'start'>>
			<</actCLA>>
		<</if>>
	<</if>>-->
