:: pav_commclubs
<<set $here = 'pav_commclubs'>>
<<set $ARGS = $location_var[$here]>>
<<set $loc_arg = ''>>
<<set $loc = 'pav_commclubs'>>
<<set $menu_loc = 'pav_commclubs'>>
<<set $menu_arg = ''>>
<<set $menu_off = 0>>
<<set $location_type = 'public_indoors'>>
<<set $pc.frost = 0>>

<h2>The community center</h2>
<<image "locations/pavlovsk/community/gdkkru.jpg">>
<<act 'Leave'>>
	<<gt 'pav_commcenter'>>
<</act>>
<<act 'Go to the toilets'>>
	<<gt 'gdktoilet' 'start'>>
<</act>>
<<if $nerd_game['game_day'] == $time.daystart and $time.hour == 20 and getvar("$time.yearstart") == 1>>
	<<act '<b>Join nerds</b>'>>
	<<gt 'nerd_game_night' 'game'>>
<</act>>

<</if>>
<<if $time.hour >= 12 and $time.hour < 20>>
	At this time of day, the community center operates various clubs.
	<<if $krumonth == $time.month and $kruyear == $time.year>>
		<<act 'Go to the sewing club'>>
			<<gt 'krupo'>>
		<</act>>
	<<else>>
		<<actCLA 'Go to the sewing club'>>
			<<set $menu_off = 1>>
			<h2>Sewing circle</h2>
			<<image "locations/pavlovsk/community/sew/sewing_class.jpg">>
			<p>You go to the sewing club room. As you walk in, a teacher looks at you and says "It costs 500 <b>₽</b> for one month's lessons and you can attend as many times as you like. The days you did not attend are not refundable when the one month is finished."</p>
			<<if $finances.cash >= 500>>
				<<actCLA 'Sign up'>>
					<<set $finances.cash -= 500>>
					<<set $krumonth = $time.month>>
					<<set $kruyear = $time.year>>
					You pay for the tuition.
					<<act 'Leave'>>
						<<gt 'pav_commclubs'>>
					<</act>>
				<</actCLA>>
			<</if>>
			<<act 'Leave'>>
				<<gt 'pav_commclubs'>>
			<</act>>
		<</actCLA>>
	<</if>>
	<<if $chessmonth == $time.month and $chessyear == $time.year>>
		<<act 'Go to the chess club'>>
			<<gt 'kruchess'>>
		<</act>>
	<<else>>
		<<actCLA 'Go to the chess club'>>
			<<set $menu_off = 1>>
			<h2>Chess Circle</h2>
			<<image "locations/pavlovsk/community/kruchess.jpg">>
			<p>You go to the chess club room. As you walk in, a teacher looks at you and says "It costs 500 <b>₽</b> for one month to join and you can come as many days as you like. Once the month is up, any days you did not attend are not refunded."</p>
			<<if $finances.cash >= 500>>
				<<actCLA 'Sign up'>>
					<<set $finances.cash -= 500>>
					<<set $chessmonth = $time.month>>
					<<set $chessyear = $time.year>>
					You pay for the tuition.
					<<act 'Leave'>>
						<<gt 'pav_commclubs'>>
					<</act>>
				<</actCLA>>
			<</if>>
			<<act 'Leave'>>
				<<gt 'pav_commclubs'>>
			<</act>>
		<</actCLA>>
	<</if>>
	<<if getvar("$ml_guitarlesson['advertisement']") == 1 and getvar("$ml_guitarlesson['enquired']") == 0>>
		<<act 'Enquire about the guitar lessons'>>
			<<gt 'music_guitarlesson' 'enquiry'>>
		<</act>>
	<</if>>
	<<if getvar("$ml_guitarlesson['enquired']") == 1 and getvar("$ml_guitarlesson['lessonday']") == 8>>
		<<act 'Arrange a lesson day'>>
			<<gt 'music_guitarlesson' 'setlessonday'>>
		<</act>>
	<</if>>
	<<if $ml_guitarlesson['nextlesson'] == $time.daystart>>
		<<if $ml_guitarlesson['lessonhour'] - 1 == $time.hour>>
			<<if $finances.cash >= $ml_guitarlesson['lessoncost']>>
				<<actCLA 'Wait for your guitar lesson (ml_guitarlesson['lessoncost'] rubles)'>>
					<<set $time.minutes += (60 - $time.minutes)>>
					<<gt 'music_guitarlesson' 'lesson'>>
				<</actCLA>>
			<<else>>
				<!-- FAILED TO CONVERT
					act 'Wait for your guitar lesson (<font color="red"><<ml_guitarlesson[''lessoncost'']>> rubles</font>))':'<font color="red">You don''t have enough money to pay for the lesson.</font>'
				-----
					<<actCLA 'Wait for your guitar lesson (<font color="red">ml_guitarlesson['lessoncost'] rubles</font>))'>>
					<<set ERROR: FAILED TO CONVERT LITERAL: """'<font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">You don't have enough money to pay for the lesson.<""" / ERROR: FAILED TO CONVERT LITERAL: """font>'""">>
				<</actCLA>>

				-->
				<<warn "CONVERSION ERROR 4ec41a107bc5d31900a893b0839e67a4">>
			<</if>>
		<</if>>
		<<if $ml_guitarlesson['lessonhour'] == $time.hour>>
			<<if $finances.cash >= $ml_guitarlesson['lessoncost']>>
				<<actCLA 'Go to your guitar lesson (ml_guitarlesson['lessoncost'] rubles)'>>
					<<gt 'music_guitarlesson' 'lesson'>>
				<</actCLA>>
			<<else>>
				<!-- FAILED TO CONVERT
					act 'Go to your guitar lesson (<font color="red"><<ml_guitarlesson[''lessoncost'']>> rubles</font>))':'<font color="red">You don''t have enough money to pay for the lesson.</font>'
				-----
					<<actCLA 'Go to your guitar lesson (<font color="red">ml_guitarlesson['lessoncost'] rubles</font>))'>>
					<<set ERROR: FAILED TO CONVERT LITERAL: """'<font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">You don't have enough money to pay for the lesson.<""" / ERROR: FAILED TO CONVERT LITERAL: """font>'""">>
				<</actCLA>>

				-->
				<<warn "CONVERSION ERROR 5ffb08bcfda6cf3723077959823adb51">>
			<</if>>
		<</if>>
	<</if>>
<<else>>
	Club''s closed.
<</if>>
