:: SunbatheScripts[script]
	setup.moodlets ??= {};
	setup.moodlets.sunbathe = {
		title: "Sunbathe",
		group:'vanity',
		description: '',
		effect: 20,
		duration: 480,
		timeMode: 1
	};
:: SunbahteAction[include]

<<set _actArguments={time:30}>>
<<if $time.isNight>>
	<<set _actArguments.disabled="You can't sunbathe during the night.">>
<<elseif $time.hour < 9 || $time.hour >= 20>>
	<<set _actArguments.disabled="You can only sunbathe from 9:00 to 20:00.">>
<<elseif $weather.isRaining>>
	<<set _actArguments.disabled="You can't sunbathe while it rains.">>
<<elseif !$wardrobe.isWearingSwimwear && !$wardrobe.isNaked>>
	<<set _actArguments.disabled="You need to be naked or wear swimwear.">>
<</if>>

<<act 'Sunbathe' undefined _actArguments>>
	<<gt 'Sunbathe'>>
<</act>>

:: Sunbathe[event]
	
	<<gs 'SunbahteAction'>>
	<<ret 'Stop sunbathing'>>

	<<if $pc.pcs_sweat < 35>>
		<<run $pc.sweatAdd(5)>>
	<</if>>
	<<if $wardrobe.isWearingSwimwear>>
		<<image "locations/shared/lake/tanning_swimsuit.jpg">>
		/*<<if $pc.pcs_inhib < 50>>
			<<run $pc.skillExperienceGain('inhibition',rand(1,2))>>
		<</if>>*/
	<<else>>
		<<image "locations/shared/lake/tanning_nude.jpg">>
		/*<<run $pc.skillExperienceGain('inhibition',rand(1,3))>>*/
	<</if>>

	<<if $inventory.get("sunblock") == 0>>
		<p>You lie down on your towel and enjoy the warm rays of the sun on your body.</p>
		<p>Since you have no sunblock, you need to make sure to not get a sunburn by not staying in direct sunlight for too long. This makes the tanning less effecitve.</p>
		<<set $pc.tan = $pc.tan + 1>>
	<<else>>
		<<run $inventory.dec('sunblock')>>
		<p>You apply sunscreen to yourself and lie down on the towel to work on your tan. You enjoy the warm rays of the sun on your body.</p>
		<<set $pc.tan = $pc.tan + 3>>
	<</if>>
	<<mood 'sunbathe'>>