:: outdoors_depr[deprecated]
<<set $here = 'outdoors'>>
<<set $ARGS = $location_var[$here]>>

<<set $pc.isOutdoors = true>>

<<setinit $weatherGrM[1] = -10>>
<<setinit $weatherGrM[2] = -5>>
<<setinit $weatherGrM[3] = 0>>
<<setinit $weatherGrM[4] = 10>>
<<setinit $weatherGrM[5] = 10>>
<<setinit $weatherGrM[6] = 15>>
<<setinit $weatherGrM[7] = 25>>
<<setinit $weatherGrM[8] = 20>>
<<setinit $weatherGrM[9] = 15>>
<<setinit $weatherGrM[10] = 10>>
<<setinit $weatherGrM[11] = 0>>
<<setinit $weatherGrM[12] = -5>>
<<set $weatherGrDelta = 5>>
<<setinit $weatherFallM[1] = 50>>
<<setinit $weatherFallM[2] = 40>>
<<setinit $weatherFallM[3] = 30>>
<<setinit $weatherFallM[4] = 20>>
<<setinit $weatherFallM[5] = 20>>
<<setinit $weatherFallM[6] = 10>>
<<setinit $weatherFallM[7] = 10>>
<<setinit $weatherFallM[8] = 10>>
<<setinit $weatherFallM[9] = 20>>
<<setinit $weatherFallM[10] = 20>>
<<setinit $weatherFallM[11] = 30>>
<<setinit $weatherFallM[12] = 40>>
<<set $weatherFallDelta = 10>>
<<set _dayLengthMin = 177>>
<<set _dayLengthMax = 563>>
<<if $location_var[$here][0] == 'weather'>>
	<<if getvar('$weatherDay') != getvar('$time.dayOfYear')>>
		<<set $weatherTemper = rand($weatherGrM[$time.month]-$weatherGrDelta, $weatherGrM[$time.month]+$weatherGrDelta)>>
		<<set $weatherFall = rand($weatherFallM[$time.month]-$weatherFallDelta, $weatherFallM[$time.month]+$weatherFallDelta)>>
	<</if>>
	<<if $weatherHour != $time.hour or $weatherDay != $time.daystart>>
		<<log "Updating Weather">>
		<<set $weatherDay = getvar('$time.dayOfYear')>>
		<<set $weatherHour = $time.hour>>
		<<set $weather.temperature = $time.hour>>
		<<if $weather.temperature <= 2>>
			<<set $weather.temperature = $weather.temperature + (6 - ($weather.temperature * 2))>>
		<<elseif $weather.temperature >= 3 and $weather.temperature <= 15>>
			<<set $weather.temperature = $weather.temperature>>
		<<elseif $weather.temperature >= 16>>
			<<set $weather.temperature = ($weather.temperature - 30) * -1>>
		<</if>>
		<<set $weather.temperature = $weatherTemper + ($weatherGrDelta * 100 / 6 * $weather.temperature) / 100>>
		<<if getvar("$chWeather") == 0>>
			<<set $sunWeather = iif( rand(0,100)<getvar("$weatherFall"), 0, 1)>>
		<<else>>
			<<set $chWeather to null>>
		<</if>>
		<<if $weather.temperature < -5>>
			<<if getvar("$weatherFall") < 30>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clear and cloudless.'>>
				<<else>>
					<<set $osadki = 'Clear sky, but light snow falls.'>>
				<</if>>
			<<elseif getvar("$weatherFall") < 60>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Partly cloudy and light breeze.'>>
				<<else>>
					<<set $osadki = 'Clouds and it is snowing.'>>
				<</if>>
			<<else>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clouds all over the sky and a sharp cold wind.'>>
				<<else>>
					<<set $osadki = 'Strong snow with wind.'>>
				<</if>>
			<</if>>
		<<elseif $weather.temperature < 5>>
			<<if getvar("$weatherFall") < 30>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clear and cloudless.'>>
				<<else>>
					<<set $osadki = 'Slightly wet snow.'>>
				<</if>>
			<<elseif getvar("$weatherFall") < 60>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Partly cloudy and light breeze.'>>
				<<else>>
					<<set $osadki = 'Clouds and wet snow.'>>
				<</if>>
			<<else>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clouds all over the sky and a sharp wind.'>>
				<<else>>
					<<set $osadki = 'Heavy snow, sticking wet snow.'>>
				<</if>>
			<</if>>
		<<else>>
			<<if getvar("$weatherFall") < 30>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clear and cloudless.'>>
				<<else>>
					<<set $osadki = 'Light mushroom rain.'>>
				<</if>>
			<<elseif getvar("$weatherFall") < 60>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Partly cloudy skies.'>>
				<<else>>
					<<set $osadki = 'It is raining.'>>
				<</if>>
			<<else>>
				<<if !$weather.isRaining>>
					<<set $osadki = 'Clouds all over the sky and a sharp wind.'>>
				<<else>>
					<<set $osadki = 'Heavy rain and wind.'>>
				<</if>>
			<</if>>
		<</if>>
		<<gs 'outdoors' 'temp_set'>>
		<<if $time.month == 1>>
			<<set $weather = '$osadki The temperature is $temperature.<br>There is snow on the street.'>>
		<<elseif $time.month == 2>>
			<<set $weather = '$osadki The temperature is $temperature.<br>There is snow on the street.'>>
		<<elseif $time.month == 3>>
			<<set $weather = '$osadki The temperature is $temperature.<br>There is snow on the street.'>>
		<<elseif $time.month == 4>>
			<<set $weather = '$osadki The temperature is $temperature.<br>The snow melts on the street.'>>
		<<elseif $time.month == 5>>
			<<set $weather = '$osadki The temperature is $temperature.<br>Puddles in the street left by snow, winter has covered everything in dirt and debris, some places where new grass grows are pleasantly green.'>>
		<<elseif $time.month == 6>>
			<<set $weather = '$osadki The temperature is $temperature.<br>Green grass lines the streets.'>>
		<<elseif $time.month == 7>>
			<<set $weather = '$osadki The temperature is $temperature.<br>Green grass lines the streets.'>>
		<<elseif $time.month == 8>>
			<<set $weather = '$osadki The temperature is $temperature.<br>The grass is green, the leaves in the trees are already turning yellow.'>>
		<<elseif $time.month == 9>>
			<<set $weather = '$osadki The temperature is $temperature.<br>Streets lined with green grass, visible yellow leaves.'>>
		<<elseif $time.month == 10>>
			<<set $weather = '$osadki Temperature is $temperature.<br>The grass is fading and patchy, yellow and brown leaves fall from the trees, mud and puddles dot the street.'>>
		<<elseif $time.month == 11>>
			<<set $weather = '$osadki Temperature is $temperature.<br>The street is dirty with a thin snow cover.'>>
		<<elseif $time.month == 12>>
			<<set $weather = '$osadki The temperature is $temperature.<br>The street is covered in snow.'>>
		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'temp_set'>>
	<<if $weather.temperature < 0>>
		<<set $temperature = '<font color=blue>'>>
	<<elseif $weather.temperature < 10>>
		<<set $temperature = '<font color=green>'>>
	<<elseif $weather.temperature < 20>>
		<<set $temperature = '<font color=orange>'>>
	<<else>>
		<<set $temperature = '<font color=red>'>>
	<</if>>
	<<if getvar("$TempUnit") == 0>>
		<<set $temperature += (Math.round($weather.temperature*10)/10)+'°C</font>' >>
	<<else>>
		<<set $temperature +=($weather.temperature*9/5+32)+'°F</font>'>>

	<</if>>
<</if>>
<<if $location_var[$here][0] == 'main'>>

	<<set _dayLength = $time.dayLength>>
	<!-- ! length/2 in minutes current day-->
	<<set $CurTimeSun = $time.hour * 60 + $time.minutes>>
	<!-- ! midday in 13:00-->
	<!-- ! CurTimeSun (minuts) <0 - before midday; >0 - after midday-->
	<<if getvar("_curTimeSun") >= 780>>
		<<set _curTimeSun = _curTimeSun - 780>>
	<<else>>
		<<set _curTimeSun =  - (780 - _curTimeSun)>>
	<</if>>

	<!-- ! 1 - dawn-->
	<!-- ! 2 - midday-->
	<!-- ! 3 - sunset-->
	<!-- ! 4 - the beginning of the night-->
	<!-- ! 5 - night-->
	<!-- ! 6 - the end of the night-->
	<<switch $time.dayStage>>
		<<case 1>>
			<<set $BColorBase = 128 + (_dayLength + _curTimeSun) * 2>>
		<<case 2>>
			<<set $BColorBase = 255>>
		<<case 3>>
 			<<set $BColorBase = 256 + ((_dayLength - 60) - _curTimeSun) * 2>>
		<<case 4>>
			<<set $BColorBase = 128 - (_curTimeSun - _dayLength) * 2>>
		<<case 5>>
			<<set $BColorBase = 0>>
		<<case 6>>
			<<set $BColorBase = 128 + (_curTimeSun + _dayLength) * 2>>
	<</switch>>
	<!-- !	*pl '    DayInYear=<<DayInYear>> DayLength=<<DayLength>>  CurTimeSun=<<CurTimeSun>>  dayStage=<<dayStage>>'-->
	
	<!-- !	clr-->
	<!-- !	pl $weatherImage-->
	<!-- !	pl-->
	<!-- !	pl $weather-->
	<!-- !	pl $osadki-->
	<<if $location_type == 'public_outdoors' or $location_type == 'secluded' or $location_type == 'event_outdoors'>>

		<<if $weather.temperature <= 0>>
			<<if ($time.minutesTimestamp- $Time15Minute) >= 15>>
				<!-- !reset Time15Minute-->
				<<if $pc.frost == 0>>
					<<set $Time15Minute = $totminut>>

				<</if>>
				<!-- ! begin Loop-->
				<<warn 'JUMP MARKER ENCOUNTERED: :Time15MinuteLoop'>>
				<<if $wardrobe.coatworntype == 'none'>>
					<<set $bonusZ = 0>>
				<<else>>
					<<set $bonusZ = $wardrobe.PCoatQuality - 2>>
				<</if>>
				<<if $wardrobe.coatworntype == 'none'>>
					<<if $weather.temperature < 0>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $weather.temperature < -20>>
						<<setn $pc.frost += 2>>

					<</if>>
					<<if $weather.temperature < -30>>
						<<setn $pc.frost += 5>>

					<</if>>
					<<if $pc.pcs_energy < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_hydra < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if !$wardrobe.isWearingPanties>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_sweat > 20>>
						<<setn $pc.frost += 1>>

					<</if>>
				<<elseif $weather.temperature < -10 and $wardrobe.PCoatWarm == 1>>
					<<if $weather.temperature < -30>>
						<<set $pc.frost += 2>>
					<<else>>
						<<set $pc.frost += 1>>
					<</if>>
					<<if $pc.pcs_energy < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_hydra < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if !$wardrobe.isWearingPanties>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_sweat > 20>>
						<<setn $pc.frost += 1>>

					<</if>>
				<<elseif $weather.temperature < -20 and $wardrobe.PCoatWarm == 2>>
					<<set $pc.frost += 1>>
					<<if $pc.pcs_energy < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_hydra < 20>>
						<<setn $pc.frost += 1>>

					<</if>>
					<<if $pc.pcs_sweat > 20>>
						<<setn $pc.frost += 1>>

					<</if>>
				<<elseif $weather.temperature < -30 and $wardrobe.PCoatWarm == 3>>
					<<set $pc.frost += 1>>
				<</if>>
				<<if $pc.frost >= 12>>
					<<set $sickstage = 1>>

				<</if>>
				<<set $Time15Minute += 15>>
				<<if ($time.minutesTimestamp- $Time15Minute) >= 15>>
					<<warn 'JUMP COMMAND ENCOUNTERED: jump Time15MinuteLoop'>>

				<</if>>
			<</if>>
		<</if>>
		<!-- !!15 minute check to stop refreshes causing early gameover and cheating at exhibitionism-->
		<<if $outdoors_checks + 15 < $totminut>>
			<<set $outdoors_checks = $totminut>>
			<<if getvar("$isprok") == 0 and getvar("$isprokp") == 0 and getvar("$mesec") > 0 and $pc.preg == 0 and $loc != 'gaddvor' and (getvar("$isprok_lastday") == 0 or ($time.hour > 4 and getvar("$isprok_lastday") == 1))>>
				<b><font color="red">You have blood flowing down your legs and staining your clothes.</font></b>
				<!-- FAILED TO CONVERT
					if $wardrobe.pantyworntype ! 'none':gs 'panties', 'dispose' & '<b><font color="red">Your panties have been ruined and you discreetly remove and dispose of them.</font></b>'
				-----
					<<if $wardrobe.isWearingPanties>>
					<!-- FAILED TO CONVERT
	gs 'panties', 'dispose' & '<b><font color="red">Your panties have been ruined and you discreetly remove and dispose of them.</font></b>'
-----
	<<gs 'panties' 'dispose'>> <<set ERROR: FAILED TO CONVERT LITERAL: """'<b><font color""" = ERROR: FAILED TO CONVERT LITERAL: """"red">Your panties have been ruined and you discreetly remove and dispose of them.<""" / ERROR: FAILED TO CONVERT LITERAL: """font><""" / ERROR: FAILED TO CONVERT LITERAL: """b>'""">>

-->
<<warn "CONVERSION ERROR 75357c2603e7b56c95a92a6ea6e068f8">>

				<</if>>

				-->
				<<warn "CONVERSION ERROR f078dcb6801e443b26604aa6b1931366">>
				<<run $pc.sweatAdd(10)>>
				<<if $pc.mood > 20>>
					<<setn $pc.mood -= 20>>

				<</if>>
				<<set '+$wardrobe.clothingworntype+'_h['+clothingwornnumber+'] -= 1>>
			<</if>>
			<!-- !!Exhibitionism-->
			<<if $wardrobe.clothes.inhibition >= $pc.pcs_inhib - 10 and $loc != 'gaddvor'>>
				<<set $exhibition_outdoors += 1>>
				<<if $pc.pcs_inhib < 45 and $wardrobe.PCloPanties == 1>>
					<<setn $exhibition_outdoors += 1>>

				<</if>>
			<</if>>
			<<if !$wardrobe.isWearingPanties and $loc != 'gaddvor'>>
				<<if $wardrobe.PCloSkirt == 3>>
					<<set $exhibition_outdoors += 1>>
				<<elseif $wardrobe.PCloSkirt == 4>>
					<<set $exhibition_outdoors += 2>>
				<<elseif $wardrobe.PCloSkirt == 5>>
					<<set $exhibition_outdoors += 3>>
				<<elseif $wardrobe.PCloSkirt == 6>>
					<<set $exhibition_outdoors += 4>>
				<</if>>
			<</if>>
		<</if>>
	<<else>>
	<</if>>
<</if>>
