# saunabed
$metka = $ARGS[0]
$loc = $CURLOC
gs 'stat'
'<center><b>bed</b></center>'
'<center><img src="images/pics/son.jpg"></center>'

if son < 10:
	if budon = 1:
		act 'Sleep to the alarm - <<timer>> hours <<timerM>> minutes':
			cls
			inSleep = 1
			:markson
			needminut = 60 - minut
			sec += needminut * 60
			son += 3
			gs 'stat'

			if son >= 23 or timer = hour and timerM = minut:
				inSleep = 2
				gt $locBroom, $metkaBroom
			else
				jump 'markson'
			end
		end
	end

	act 'Screw the alarm and sleep well':
		cls
		inSleep = 1
		:markson
		needminut = 60 - minut
		sec += needminut * 60
		son += 3
		gs 'stat'

		if son < 23:jump 'markson'

		inSleep = 2
		gt $locBroom, $metkaBroom
	end
end

if budon = 1:
	'Alarm set for <<timer>> hours <<timerM>> minutes'

	act 'Turn the alarm off':budon = 0 & gt $curloc
else
	act 'Turn the alarm on':budon = 1 & gt $curloc
end

act 'Set the alarm':gt'budilnik', 'start'
act 'Get out of bed':sec += 5 & gt $locBroom, $metkaBroom

--- saunabed ---------------------------------

