:: sleep_prepare[event]
	<<if $wardrobe.clothingworntype != 'nude'>>
		<<image "shared/home/bed.jpg">>
	<<else>>
		<<image "shared/home/bedroom/son.jpg">>
	<</if>>

	<p>
		You run through your regular nightly routine,
		<<if $alarmClock.on>>
			<<set _nextAlarmClockAlarm = setup.alarmClockNextAlarm()>>
			setting your alarm for
			<<time_print _nextAlarmClockAlarm>>
		<<else>>
			not bothering to setting your alarm,
		<</if>>
		you undress, and prepare for sleep.
	</p>

	<<run $wardrobe.lastWornSet('bed')>>
	<<run $wardrobe.strip('clothes')>>
	<<run $wardrobe.strip('shoes')>>

	<<set $pc.pcs_hairbsh = 0>>
	<!--<<if setup.startingCharacterTagsIncludes('sg') and $loc != 'bedrPar' and $pc.isSchoolStudent>>
		<<set $notathomesleep += 1>>
	<<else>>
		<<set $notathomesleep = 0>>
	<</if>>-->
	<!--<<if getvar("$succubusflag") == 1 and $sucwalkday <= $time.daystart and $succhungry < (0 - 1 - succublvl or $pc.willpower < ((succublvl * willpowermax) / 13) or getvar("$sucpowzeroed") >= 3)>>
		<<gs 'succubus' 'sucwalkinginit'>>

	<</if>>-->
	<!--
	<<if getvar("$pc.analplugin") == 1 and $pc.vibratorin == 1>>
		<<if getvar("$bedAnal") == 1 and getvar("$bedVibrator") == 1>>
			<<set $pc.analplugin = 0>>
			<<set $pc.vibratorin = 0>>

			You remove your butt plug and your vibrator.
		<<elseif getvar("$bedAnal") == 0 and getvar("$bedVibrator") == 0>>
			You decide to leave your butt plug and vibrator in.
		<<elseif getvar("$bedAnal") == 1 and getvar("$bedVibrator") == 0>>
			<<set $pc.vibratorin = 0>>

			You decide to leave your butt plug in, but remove your vibrator.
		<<elseif getvar("$bedAnal") == 0 and getvar("$bedVibrator") == 1>>
			<<set $pc.analplugin = 0>>

			You decide to remove your butt plug, but leave your vibrator in.
		<</if>>
	<<elseif getvar("$pc.analplugin") == 1 and $pc.vibratorin == 0>>
		<<if getvar("$bedAnal") == 1>>
			<<set $pc.analplugin = 0>>

			You remove your butt plug.
		<<elseif getvar("$bedAnal") == 0>>
			You decide to leave your butt plug in.
		<</if>>
	<<elseif getvar("$pc.analplugin") == 0 and $pc.vibratorin == 1>>
		<<if getvar("$bedVibrator") == 1>>
			<<set $pc.vibratorin = 0>>
			You remove your vibrator.
		<<elseif getvar("$bedVibrator") == 0>>
			You decide to leave your vibrator in.
		<</if>>
	<</if>>
	<<if $wardrobe.shoeworntype == 'none'>>
		<<setinit $bed['shoetype'] = 'none'>>
	<<else>>
		<<setinit $bed['shoetype'] = $wardrobe.shoeworntype>>
		<<setinit $bed['shoenumber'] = $wardrobe.shoewornnumber>>
		<!-- !!		gs 'shoes', 'strip'-->
	<!-- <</if>> -->
	<!--
	<<if getvar("$bedPanty") == 1>>
		<<if !$wardrobe.isWearingPanties and !$wardrobe.isWearingBra>>
			You put on your bra and panties.
		<<elseif $wardrobe.isWearingPanties and !$wardrobe.isWearingBra>>
			You put on your bra.
		<<elseif $wardrobe.isWearingPanties and $wardrobe.isWearingBra>>
			You put on your panties.
		<<else>>
			You change your bra and panties.
		<</if>>
	<<elseif getvar("$bedPanty") == 2>>
		<<if $wardrobe.isWearingPanties or $wardrobe.isWearingBra>>
			You remove your bra and panties.
		<<elseif $wardrobe.isWearingPanties and !$wardrobe.isWearingBra>>
			You remove your panties.
		<<elseif $wardrobe.isWearingBra>>
			You remove your bra.
		<</if>>
	<<else>>
		You were too tired to worry about your underwear, so for tonight you left it as is.
	<</if>>
	<<if $hairstyle != ''>>
		$hairstyle
	<<else>>
		Your hair is loose and free.
	<</if>> -->
	<<if $pc.pcs_makeup > 1 and $pc.cosmetic_tattoo == 0>>
		<<set $pc.pcs_makeup = 0>>
		<<set $pc.vidageday -= 1>>
		<<gs 'body' 'SkinLoss' 'MakeUpSleep'>>
		<p>You went to bed wearing your makeup, which will smear your face as you sleep; your skin will age faster from this!</p>
	<</if>>
	<!--<<if $pc.fat > 5 and getvar("$stringimplant") == 1>>
		<<setn $silicone += 1>> <<setn $pc.fat -= 5>>

	<</if>>-->
	<<actCLA 'Sleep...'>>
		<!-- !!flag to stop autosave breaking my awesome clothing thingy-->
		<!--<<setinit $clo_flag['bed'] = 0>>-->
		<<gt 'sleep'>>
	<</actCLA>>
