:: Sidebar



<<if $init_complete && false>>
	<<if $DEBUGGING>>
		<<cheatMenu>>
	<</if>>
    <<include "Sidebar_menu_on">>
<</if>>
<<debug>>
	<<set _debugCommand = recall('debugCommand', '')>>
	<<textbox "_debugCommand" _debugCommand>>
	<<button "GetVar">>
		<<run memorize('debugCommand',_debugCommand)>>
		<<if _debugCommand.includes("=")>>
			<<run $.wiki(_debugCommand)>>
			<<run console.log("Debug Command executed:",_debugCommand)>>
		<<else>>
			<<set _debugvar = State.getVar(_debugCommand)>>
			<<append "#passages .passage">>
				<<debug>>
					<pre>
						<<=JSON.stringify(_debugvar,null,'\t')>>
					</pre>
				<</debug>>
			<</append>>
		<</if>>
	<</button>>
<</debug>>

:: Sidebar_menu_on
/*<<gs 'outdoors' 'main'>>*/
<<set _styleClass = ''>>
<<if _menuDeactivated>>
	<<set _styleClass += ' deactivated'>>
<</if>>
<div id="sidebar_menu_on" @class=_styleClass>
	<div class="icons" style="--columnCount:6">
		<<menuLinkedImage 'system/icons/menu/icon_character.png'>>
			<<gt 'characterOverview'>>
		<</menuLinkedImage>>
		<<menuLinkedImage 'system/icons/menu/icon_phone.png'>>
			<<phoneMain>>
		<</menuLinkedImage>>
		<<menuLinkedImage 'system/icons/menu/journal_norm.png'>>
			<<gt 'notes'>>
		<</menuLinkedImage>>
		<<menuLinkedImage 'system/icons/menu/icon_purse.png'>>
			<<gt 'Purse'>>
		<</menuLinkedImage>>
		<<menuLinkedImage 'system/icons/menu/icon_menu.png'>>
			<<gt 'Menu'>>
		<</menuLinkedImage>>
		<<menuLinkedImage 'system/icons/menu/help.png'>>
			<<gt 'Help'>>
		<</menuLinkedImage>>
	</div>

    <div class="pc_name">
		<span class="nickname">$pc.name_nick</span>
	</div>

	

    <div id="time_current">
        <<datetime_current>>
    </div>
	<div id="currentDayEvents">
		<<currentDayEventsList>>
	</div>
	<div id="weather">
		<<weatherImage>>
	</div>

    <div id="money_owned">
        <<if $wardrobe.purse.isValidItem > 0>>Purse<<else>>Pockets<</if>>: <<money $finances.cash>>
        <<if $stolmoney > 0>>
            , Drawer <<money $stolmoney>>
        <</if>>
        <<if $finances.hasBankAccount == 1>>
            <<if $finances.bank >= 0>>
                , Bank: <<money $finances.bank>>
            <<else>>
                <font color="red">Your bank account is overdrawn by <<money $finances.bank>>!</font>
            <</if>>
        <</if>>
    </div>
    
    <div class="icons">

		<<if $pc.isIndecent>>
			<<imageWithTooltip "system/icons/icon_info_night.png">>
				<p><<negative 2>>Your current appearance is deemed indecend! You try to avoid any attention until you have this problem fixed. Most social interactions are blocked.<</negative>></p>
				<<set _indecencies = $pc.indecencies>>
				<<if _indecencies.includes('naked_breast')>>
					<p>Your breasts are completely exposed. You should either wear a bra or some clothes.</p>
				<</if>>
				<<if _indecencies.includes('naked_pussy')>>
					<p>Your privates are completely exposed. You should either wear panties or some clothes.</p>
				<</if>>
				<<if _indecencies.includes('menses_blood')>>
					<p>Your clothes are stained by your own menstrual blood running down your legs. You need to get to a toilet to use a tampon or a sanpad and to clean up your clothes.</p>
				<</if>>
				<<if _indecencies.includes('cum')>>
					<p>You have visible cum on you.</p>
				<</if>>
			<</imageWithTooltip>>
		<</if>>

		<<set _jobsToday = $jobs.scheduledForDay()>>
		<<set _jobsTomorrow = $jobs.scheduledForDay($time.tomorrow)>>
		<<if Object.keys(_jobsToday).length > 0 or Object.keys(_jobsTomorrow).length > 0>>
			<<imageWithTooltip "system/icons/status/work.png">>
				<<if Object.keys(_jobsToday).length > 0>>
					<b>Jobs today:</b>
					<<for _jobKey, _jobData range _jobsToday>>
						<br/>_jobData.title (<<time_print _jobData.worktimes[0] _jobData.worktimes[1]>>-<<time_print _jobData.worktimes[2] _jobData.worktimes[3]>>)
					<</for>>
				<</if>>
				<<if Object.keys(_jobsTomorrow).length > 0>>
					<b>Jobs tomorrow:</b>
					<<for _jobKey, _jobData range _jobsTomorrow>>
						<br/>_jobData.title (<<time_print _jobData.worktimes[0] _jobData.worktimes[1]>>-<<time_print _jobData.worktimes[2] _jobData.worktimes[3]>>)
					<</for>>
				<</if>>
			<</imageWithTooltip>>
		<</if>>

		<<imageWithTooltip "system/icons/status/appearance.png">>
			<div style="font-size:1.3em">$pc.hotcat</div>
			<span style="font-size:0.6em">People would rate your appearance as a $pc.hotcat out of 10.<br/>
			Your base appearance (genetics, skin quality, BMI, etc.) is $pc.appearance.lastingValue.</span>
			<hr/>
			Short-term modifiers:
			<ul>
				<<for _modificator range $pc.appearance.currentModifiers>>
					<<set _modificatorStyle = ''>>
					<<if _modificator.dec>>
						<<set _modificatorStyle = 'negative'>>
					<<elseif _modificator.inc>>
						<<set _modificatorStyle = 'positive'>>
					<</if>>
					<li @style='_modificatorStyle'>_modificator.label</li>
				<</for>>
			</ul>
		<</imageWithTooltip>>

		<<if $pc.cyclePhase == 'menses'>>
			<<if $pc.cycleProductsUsed>>
				<<imageWithTooltip "system/icons/status/vperiod_sanitaries.png">>
					You are currently experiencing your monthly bleeding. You are using feminine hygiene products.
				<</imageWithTooltip>>
			<<else>>
				<<imageWithTooltip "system/icons/status/vperiod_bleeding.png">>
					You are currently experiencing your monthly bleeding. <<negative 2>>You are not using feminine hygiene products.<</negative>>
				<</imageWithTooltip>>
			<</if>>
		<<elseif $pc.cycleProductsEnabled>>
			<<if $pc.cycleProductsUsed>>
				<<imageWithTooltip "system/icons/status/vperiod_sanitaries.png">>
					It feels like your monthly bleeding will start soon. You are using feminine hygiene products in preparation.
				<</imageWithTooltip>>
			<<else>>
				<<imageWithTooltip "system/icons/status/vagina.png">>
					It feels like your monthly bleeding will start soon. You should consider using feminine hygiene products in preparation.
				<</imageWithTooltip>>
			<</if>>
		<</if>>

		<<if $pc.makeupAmount > 0>>
			<<imageWithTooltip `"system/icons/status/makeup_"+$pc.makeupAmount+".png"`>>
				You are wearing
				<<if $pc.makeupQuality < 0 >>
					ruined
				<<else>>
					<<switch $pc.makeupQuality>><<case 1>>low<<case 2>>medium<<case 3>>high<</switch>>
					quality 
				<</if>>
				<<switch $pc.makeupAmount>><<case 1>>subtle<<case 3>>heavy<</switch>>
				makeup.
			<</imageWithTooltip>>
		<</if>>

        <<if $pc.pcs_hairbsh == 1>>
            /*<<imageWithTooltip `"system/icons/status/hair_1.png"`>>
                Your hair is neatly styled.
            <</imageWithTooltip>>*/
        <<else>>
            <<imageWithTooltip `"system/icons/status/hair_0.png"`>>
                Your hair is not brushed.
            <</imageWithTooltip>>

        <</if>>

        <<if $pc.pcs_lipbalm > 0>>
            <<imageWithTooltip `"system/icons/status/lipstick.png"`>>
                Your lips are covered in moisturizing balm.
            <</imageWithTooltip>>
        <</if>>
        <<if $pc.eyelashes_false >= 1>>
            <<imageWithTooltip `"system/icons/status/lashes.png"`>>
                You're wearing false <<if $pc.eyelashes == 4>>mink<</if>> lashes.
            <</imageWithTooltip>>
        <</if>>

		<<if $pc.pcs_sweat > 59>>
			<<set _stat_sweat_msg = 'You are dripping wet from sweat and smell like a gym sock.'>>
		<<elseif $pc.pcs_sweat > 49>>
			<<set _stat_sweat_msg = 'You really stink.'>>
		<<elseif $pc.pcs_sweat > 39>>
			<<set _stat_sweat_msg = 'You stink.'>>
		<<elseif $pc.pcs_sweat > 29>>
			<<set _stat_sweat_msg = 'You are a little smelly.'>>
		<<elseif $pc.pcs_sweat > 19>>
			<<set _stat_sweat_msg = 'You`re sweating.'>>
		<<elseif $pc.pcs_sweat > 9 and $pc.deodorant_on == 1>>
			<<set _stat_sweat_msg = 'You feel fresh with your deodorant.'>>
		<<elseif arrsize('sparrvol') == 0>>
			<<set _stat_sweat_msg = 'You are sparkling clean.'>>
		<<elseif $pc.deodorant_on == 1>>
			<<set _stat_sweat_msg = 'You feel fresh with your deodorant on.'>>
		<<else>>
			<<set _stat_sweat_msg = ''>>
		<</if>>
		<<if $pc.deodorant_on == 1 and $pc.pcs_sweat < 20>>
			<<imageWithTooltip `"system/icons/status/deodorant.png"`>>
				_stat_sweat_msg
			<</imageWithTooltip>>
		<</if>>
		<<if $pc.pcs_sweat > 19>>
			<<imageWithTooltip `"system/icons/status/need_shower.png"`>>
				_stat_sweat_msg
			<</imageWithTooltip>>
		<</if>>
		<<if $pc.legHairVisibility > 1 or ($pc.pubestyle > 0 and $pc.pubesLength >= $shave_trigger)>>
			<<imageWithTooltip `"system/icons/status/need_shave.png"`>>
				<<if ($pc.pubestyle > 0 and $pc.pubesLength >= $shave_trigger)>>
					You need to shave your
					<<if $pc.legHairVisibility > 1>>
						legs and
					<</if>>
					pussy.
				<<elseif $pc.legHairVisibility > 1>>
					You need to shave your legs.
				<</if>>
			<</imageWithTooltip>>
		<</if>>

		<<if $pc.willpower < $pc.willpowermax>>
		<<set $willpower_percent = (100 * $pc.willpower) / $pc.willpowermax>>
		<<if $willpower_percent > 60>>
			<<imageWithTooltip `"system/icons/status/willpower_high.png"`>>
				You feel confident and in control. You still have <<=$pc.willpower.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
			<</imageWithTooltip>>
		<<elseif $willpower_percent > 30>>
			<<imageWithTooltip `"system/icons/status/willpower_med.png"`>>
				You feel like you have less control over yourself than usual. You have <<=$pc.willpower.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
			<</imageWithTooltip>>
		<<else>>
			<<imageWithTooltip `"system/icons/status/willpower_low.png"`>>
				In your current state, you could easily be pressured into doing things against your will. You have <<=$pc.willpower.roundToDecimal(1)>> (<<=$willpower_percent.roundToDecimal(1)>> %) of your willpower left.
			<</imageWithTooltip>>
		<</if>>
		<</if>>


		<<if $pc.mood >= 80>>
			<<set _moodImage="system/icons/status/mood_1.png">>
			<<set _moodDescString = 'You are in a great mood.'>>
		<<elseif $pc.mood >= 60>>
			<<set _moodImage="system/icons/status/mood_2.png">>
			<<set _moodDescString = 'You are in an OK mood.'>>
		<<elseif $pc.mood >= 40>>
			<<set _moodImage="system/icons/status/mood_3.png">>
			<<set _moodDescString = 'You are in a good mood.'>>
		<<elseif $pc.mood >= 20>>
			<<set _moodImage="system/icons/status/mood_4.png">>
			<<set _moodDescString = 'You are in a bad mood.'>>
		<<elseif $pc.mood >= 5>>
			<<set _moodImage="system/icons/status/mood_5.png">>
			<<set _moodDescString = 'You are in a terrible mood.'>>
		<<else>>
			<<set _moodImage="system/icons/status/mood_6.png">>
			<<set _moodDescString = 'You are really depressed and need to improve your mood.'>>
		<</if>>
		<<imageWithTooltip _moodImage>>
			_moodDescString
			<div id="moodDetailsSidebar">
				<<for _moodletGroupId, _moodletGroup range $pc.moodletsActiveByGroupAccumulationApplied>>
					<<for _moodletId, _moodletData range _moodletGroup>>
						<<set _moodletStyleClass="moodlet">>
						<<if _moodletData.effect == 0>>
							<<set _moodletStyleClass+=" neutral">>
						<<elseif _moodletData.effect < 0>>
							<<set _moodletStyleClass+=" negative">>
						<<else>>
							<<set _moodletStyleClass+=" positive">>
						<</if>>
						<div @class="_moodletStyleClass">
							<span class="effectStrength">_moodletData.effect</span>
							<span class="title">_moodletData.title</span>
							<span class="timeLeft">
								<<set _moodEffectMinutesLieft = (_moodletData.expiration.getTime() - $time.now.getTime()) / 60000>>
								<<if _moodEffectMinutesLieft > 5256000>>
									(lasting)
								<<else>>
									(<<=setup.durationToString(_moodEffectMinutesLieft)>>)
								<</if>>
							</span>
						</div>
					<</for>>
				<</for>>
			</div>
		<</imageWithTooltip>>

		<<set _painTotal = $pc.painTotal>>
		<<set _painReduction = $pc.painReductionOfActiveEffects>>
		<<if _painTotal > 0>>
			<<set _painBodyPartMsg = 'Total: '+_painTotal.roundToDecimal(1)>>
			<<if _painReduction > 0>>
				<<set _painBodyPartMsg +=' (including a reduction of '+_painReduction+')'>>
			<</if>>
			<<set _painBodyPartMsg +='<ul>'>>

			<<for _paindata range $pc.painByBodypartsSorted>>
				<<set _painBodyPartMsg += '<li>'+setup.getBodypart(_paindata[0]).label+': '+_paindata[1].roundToDecimal(1)+'<ul>'>>
				<<for _painReasonData range $pc.painReasonsByBodypartSorted(_paindata[0])>>
					<<set _reasonLabel = setup.painReasons[_painReasonData[0]].label>>
					<<set _painBodyPartMsg += '<li>'+_reasonLabel+': '+_painReasonData[1].roundToDecimal(1)+'</li>'>>
				<</for>>
				<<set _painBodyPartMsg += '</ul></li>'>>
			<</for>>

			<<set _painBodyPartMsg += '</ul><hr/>You are always aware of the worst pain. All other values are added with diminishing effects.'>>

			<<if _painTotal > 80>>
				<<imageWithTooltip `"system/icons/status/pain_3.png"`>>
					You feel you are at your limit with the amount of pain you're feeling!
					<hr/>_painBodyPartMsg
				<</imageWithTooltip>>
			<<elseif _painTotal > 50>>
				<<imageWithTooltip `"system/icons/status/pain_2.png"`>>
					You are in a fair amount of pain, making you very uncomfortable.
					<hr/>_painBodyPartMsg
				<</imageWithTooltip>>
			<<elseif _painTotal > 20>>
				<<imageWithTooltip `"system/icons/status/pain_1.png"`>>
					The pain you're feeling is noticeable. It makes you uncomfortable.
					<hr/>_painBodyPartMsg
				<</imageWithTooltip>>
			<<else>>
				<<imageWithTooltip `"system/icons/status/pain_1.png"`>>
					The pain you're feeling is minimal. It makes you a little uncomfortable.
					<hr/>_painBodyPartMsg
				<</imageWithTooltip>>
			<</if>>
		<</if>>


		<<if $pc.horny > 90>>
			<<imageWithTooltip `"system/icons/status/arousal_high.png"`>>
				You can not stop thinking about sex. You are soaked between your legs from your juices.
			<</imageWithTooltip>>
		<<elseif $pc.horny > 60>>
			<<imageWithTooltip `"system/icons/status/arousal_med.png"`>>
				You are a little nervous, feeling itchy between your legs from arousal.
			<</imageWithTooltip>>
		<<elseif $pc.horny > 30>>
			<<imageWithTooltip `"system/icons/status/arousal_low.png"`>>
				You are feeling a tingling sensation between your legs.
			<</imageWithTooltip>>
        <</if>>

		<<set _cum = $pc.cumVisibleBodypartIds>>
		<<if _cum.length > 0>>
			<<imageWithTooltip `"system/icons/status/visible_cum.png"`>>
				You have visible cum on these bodyparts: <<=_cum.join(',')>>.
			<</imageWithTooltip>>
		<</if>>
		<<set _cum = $pc.cumBodypartIds>>
		<<if _cum.length > 0>>
			<<imageWithTooltip `"system/icons/status/cum_covered.png"`>>
				You have cum on these bodyparts: <<=_cum.join(',')>>.
			<</imageWithTooltip>>
		<</if>>

        <<if $pc.pcs_energy < 30>>
			<<imageWithTooltip `"system/icons/status/need_food.png"`>>
				<<if $pc.pcs_energy < 5>>
					You feel faint from hunger, if you don`t have something to eat very soon, you will pass out.
				<<elseif $pc.pcs_energy < 10>>
					You are starving, you really need to have something to eat.
				<<elseif $pc.pcs_energy < 20>>
					You are very hungry and struggle to concentrate on anything other than food.
				<<else>>
					You feel peckish, and your thoughts sometimes drift towards food.
				<</if>>
			<</imageWithTooltip>>

                <!--<<warn 'FTCL: 		<<set $statusIconBarTab += ERROR: FAILED TO CONVERT LITERAL: """"<td><a href="exec: buterbrod = 0""">> <<set $pc.pcs_energy += 40>> <<set $cumspclnt = 2>> <<gs "cum_cleanup">> <<set $pc.fat += 1>> <<set ERROR: FAILED TO CONVERT LITERAL: """gs ""stat"""><img title""" = ERROR: FAILED TO CONVERT LITERAL: """"Click to eat your sandwich." height = <<set_siconht>> src="images""" / $system / $icons / $status / ERROR: FAILED TO CONVERT LITERAL: """need_food.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """td>"""">>'>>-->
                <<info "TODO: Eat sandwhich from sidebar">>
        <</if>>

        <<if $pc.pcs_hydra < 30>>
            <<imageWithTooltip `"system/icons/status/need_drink.png"`>>
                <<if $pc.pcs_hydra < 5>>
					You feel light-headed, if you don`t have something to drink very soon, you will pass out.
				<<elseif $pc.pcs_hydra < 10>>
					You are dehydrated, you really need to have something to drink.
				<<elseif $pc.pcs_hydra < 20>>
					You are thirsty, and your dry throat is irritating and distracting you.
				<<else>>
					You feel a little thirsty, and your mouth is a little dry.
				<</if>>
            <</imageWithTooltip>>
            <<info "TODO: Drink water bottle from sidebar">>
        <!--    <<if $inventory.get("water") == 0 and $refillable_bottle < 2>>
        <!--        <<set $statusIconBarTab += '<td><a href="exec:msg $stat_thirst_msg"><img title="$stat_thirst_tooltip" height = set_siconht src="images/system/icons/status/need_drink.png"></a></td>'>>
        <!--    <<elseif $cheatNoDrink == 0 and $stat_thirst_msg != '' and $refillable_bottle > 1 and $menu_off == 0>>
        <!-- 		<<set $statusIconBarTab += ERROR: FAILED TO CONVERT LITERAL: """'<td><a href="exec: refillable_bottle""" - ERROR: FAILED TO CONVERT LITERAL: """= 1""">> <<set $pc.pcs_hydra += 100>> <<set $cumspclnt = 2>> <<gs 'cum_cleanup'>> <<set ERROR: FAILED TO CONVERT LITERAL: """gs ''stat''"><img title""" = ERROR: FAILED TO CONVERT LITERAL: """"Click to drink from your refillable water bottle." height = <<set_siconht>> src="images""" / $system / $icons / $status / ERROR: FAILED TO CONVERT LITERAL: """need_drink.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """td>'""">> -->
        <!--    <<elseif $cheatNoDrink == 0 and $stat_thirst_msg != '' and $inventory.get("water") > 0 and $menu_off == 0>>
        <!-- 		<<set $statusIconBarTab += ERROR: FAILED TO CONVERT LITERAL: """'<td><a href="exec: bottle = 0""">> <<set $pc.pcs_hydra += 100>> <<set $cumspclnt = 2>> <<gs 'cum_cleanup'>> <<set ERROR: FAILED TO CONVERT LITERAL: """gs ''stat''"><img title""" = ERROR: FAILED TO CONVERT LITERAL: """"Click to drink from your water bottle." height = <<set_siconht>> src="images""" / $system / $icons / $status / ERROR: FAILED TO CONVERT LITERAL: """need_drink.png"><""" / ERROR: FAILED TO CONVERT LITERAL: """a><""" / ERROR: FAILED TO CONVERT LITERAL: """td>'""">> -->
        <!--   <<elseif $cheatNoDrink == 0 and $stat_thirst_msg != '' and ($inventory.get("water") > 0 or $refillable_bottle > 1) and $menu_off == 1>>
        <!--        <<set $statusIconBarTab += '<td><a href="exec:msg $stat_thirst_msg"><img title="Your water bottle has to wait until you can spare a minute." height = set_siconht src="images/system/icons/status/need_drink.png"></a></td>'>>
        <!--    <</if>>-->
        <</if>>

        <<if $pc.pcs_sleep < 30>>
            <<imageWithTooltip `"system/icons/status/need_sleep.png"`>>
                <<if $pc.pcs_sleep < 5>>
					You can't keep your eyes open, if you don't go to bed now, you will fall asleep right here.
				<<elseif $pc.pcs_sleep < 10>>
					You are exhausted, you really need to go to bed soon.
				<<elseif $pc.pcs_sleep < 20>>
					You are tired and you are struggling to concentrate.
				<<else>>
					You feel a little tired.
				<</if>>
            <</imageWithTooltip>>
        <</if>>

		<<for _effect range $pc.activeEffectsSidebar>>
			<<imageWithTooltip _effect.image>>
				_effect.desc
			<</imageWithTooltip>>
		<</for>>


        <!--<<if getvar("$birth_control['remind_icon']") == 1>>
            <<imageWithTooltip "system/icons/status/bc_pill.png">>
                It's time to take your birth control pill!
            <</imageWithTooltip>>
        <</if>>-->


		<<stat_clothes_icon>>

		<<if $wardrobe.clothingworntype == 'nude'>>
			<<imageWithTooltip "system/icons/status/nude.png">>
				<<stat_clothes_nude_msg>>
			<</imageWithTooltip>>
		<<else>>
			<<if !$wardrobe.bra.isValidItem>>
				<<imageWithTooltip "system/icons/status/boobs_white.png">>
					<<stat_bra_msg>>
				<</imageWithTooltip>>
			<</if>>

			<<if !$wardrobe.panties.isValidItem>>
				<<imageWithTooltip "system/icons/status/commando_white.png">>
					<<stat_panty_msg>>
				<</imageWithTooltip>>
			<</if>>
		<</if>>

		<!-- Anal Plug -->
		<<if $pc.analplugin == 1 and $pc.vibratorin == 0>>
			<<imageWithTooltip "system/icons/status/tbutt_plug.png">>
				A butt plug is inside your ass.
			<</imageWithTooltip>>
		<<elseif $pc.analplugin == 0 and $pc.vibratorin == 1>>
			<<imageWithTooltip "system/icons/status/tvibrator.png">>
				A vibrator is inside your vagina.
			<</imageWithTooltip>>
		<<elseif $pc.analplugin == 1 and $pc.vibratorin == 1>>
			<<imageWithTooltip "system/icons/status/tdouble_stuffed.png">>
				You are wearing a plug and a vibrator.
			<</imageWithTooltip>>
		<</if>>

		<<switch $pc.vehicleType>>
			<<case 'car'>>
				<<set _carData = $pc.vehicleData>>
				<<imageWithTooltip "system/icons/status/car.png">>
					You are driving your _carData.label.
					<<image _carData.imageExterior>>
				<</imageWithTooltip>>
		<</switch>>

		<<set setup.sidebarIconPassages ??= Story.lookup("tags", 'sidebarIcon')>>/*Might be expensive, so lets cache that*/
		<<for _sidebarIconPassage range setup.sidebarIconPassages>>
			<<gs _sidebarIconPassage.title>>
		<</for>>

		

		<!-- !!Row 5: Clothes,...-->
	<<if $stat_bfgf_msg_0 != ''>>
		<<set $statusIconBarTab += '<td><a href="exec: $stat_bfgf_msg_0"><img title="$stat_bfgf_tooltip_0" height = set_siconht src="images/system/icons/status/date.png"></a></td>'>>
	<</if>>
	<<if $stat_bfgf_msg_1 != ''>>
		<<set $statusIconBarTab += '<td><a href="exec: $stat_bfgf_msg_1"><img title="$stat_bfgf_tooltip_1" height = set_siconht src="images/system/icons/status/date.png"></a></td>'>>
	<</if>>
	<<if $stat_bfgf_msg_2 != ''>>
		<<set $statusIconBarTab += '<td><a href="exec: $stat_bfgf_msg_2"><img title="$stat_bfgf_tooltip_2" height = set_siconht src="images/system/icons/status/date.png"></a></td>'>>
	<</if>>
	<<if _stat_clothes_msg != ''>>
		<<set $statusIconBarTab += '<td><a href="exec:msg _stat_clothes_msg"><img title="_stat_clothes_tooltip" height = set_siconht src="images/system/icons/status/_stat_clothes_icon.png"></a></td>'>>
	<</if>>
	<<if $stat_bra_msg != '' and $wardrobe.isWearingBra>>
		<<set $statusIconBarTab += '<td><a href="exec:msg $stat_bra_msg"><img title="$stat_bra_msg" height = set_siconht src="images/system/icons/status/bra.png"></a></td>'>>
	<</if>>

	<<if $stat_panty_msg != '' and $wardrobe.isWearingPanties and $pc.trait('commando_lvl') < 3>>
		<<set $statusIconBarTab += '<td><a href="exec:msg $stat_panty_msg"><img title="$stat_panty_msg" height = set_siconht src="images/system/icons/status/panties.png"></a></td>'>>
	<<elseif $stat_panty_msg != '' and $wardrobe.isWearingPanties and $pc.trait('commando_lvl') == 3>>
		<<set $statusIconBarTab += '<td><a href="exec:msg $stat_panty_msg"><img title="$stat_panty_msg" height = set_siconht src="images/system/icons/status/panties_red.png"></a></td>'>>
	<</if>>

    </div>

    <div id="stats_table">
        <<set _color_arousal = 'rgb('+((16777216 + $fcolor) % 256)+','+((16777216 + $fcolor)/256 % 256)+','+(16777216 + $fcolor)/65536+')'>>
        <<statblock "Arousal" $pc.horny null _color_arousal>>
        <!--<<statblock "Pain" _painTotal>>-->
        <!--<<statblock "Health" $pc.pcs_health $pc.healthmax>>-->

        <<if setup.startingCharacterTagsIncludes('magic')>>
			<<statblock "Mana" $pcs_mana $manamax>>
		<</if>>

		<<if $pc.willpower < $pc.willpowermax>>
			<<statblock "Willpower" $pc.willpower $pc.willpowermax>>
		<</if>>
		<<if $pc.mentalHealth < 1000>>
			<<statblock "Mental Health" $pc.mentalHealth 1000>>
		<</if>>

		<<if $pc.pcs_stam < $pc.stammax>>
			<<statblock "Stamina" $pc.pcs_stam $pc.stammax>>
		<</if>>
		<<statblock "Mood" $pc.mood>>
		<<statblock "Hunger" $pc.pcs_energy>>
		<<statblock "Thirst" $pc.pcs_hydra>>
		<<statblock "Sleep" $pc.pcs_sleep>>

    </div>
	<hr/>
	<<imageWithTooltip $pc.image>>
		$pc.name_full
	<</imageWithTooltip>>
</div>
:: SidebarWidgets[widget]
<<widget 'menuLinkedImage' container>>
	<<set _menuLinkedImageContents = _contents>>
	<<capture _menuLinkedImageContents>>
	<<linkedImage _args[0]>>
		<<if _menuDeactivated>>
			<<msg "The menu is deactivated here.">>
		<<else>>
			_menuLinkedImageContents
		<</if>>
	<</linkedImage>>
	<</capture>>
<</widget>>

<<widget 'statblock'>>
    <<set _label = _args[0]>>
    <<set _currentvalue = _args[1]>>
    <<set _maxvalue = _args[2] || 100>>

    <<set _valuePercentage = Math.clamp(parseInt(_currentvalue * 100 / _maxvalue),0,100)>>
    <<set _style = ''>>
    <<if _args[3]>>
        <<set _style = 'color:'+_args[3]>>
    <</if>>


        <<bar _valuePercentage `Math.ceil(_currentvalue)+" / "+_maxvalue`>>
        <font class="label" @style="_style">_label</font>

<</widget>>
<<widget 'bar'>>
    <<set _percentage to _args[0]+"%">>
    <div class="bar" @style='"--percentage:"+_percentage'>
        <div class="filling">

        </div>
		<<if _args[1]>>
		<div class="label">
			_args[1]
		</div>
		<</if>>
    </div>
<</widget>>
<<widget 'sidebarUpdate'>>
	<<run UIBar.update()>>
<</widget>>
<<widget 'refresh'>>
	<<gt `passage()` $location_var[$here]>>
<</widget>>




<<widget 'stat_clothes_nude_msg'>>
	<<if $wardrobe.pantyworntype == 'salacious'>>
		<<if !$wardrobe.isWearingBra>>
			<<='You are only wearing your see-through panties, and your boobs sway invitingly as you walk.'>>
		<<elseif $wardrobe.braworntype == 'salacious'>>
			<<='You are only wearing your see-through underwear.'>>
		<<else>>
			<<='You are only wearing your see-through panties and bra.'>>
		<</if>>
	<<elseif $wardrobe.isWearingPanties>>
		<<if !$wardrobe.isWearingBra>>
			<<='You are only wearing your panties, and your boobs sway invitingly as you walk.'>>
		<<elseif $wardrobe.braworntype == 'salacious'>>
			<<='You are only wearing your see-through bra and panties.'>>
		<<else>>
			<<='You are wearing your underwear.'>>
		<</if>>
	<<else>>
		<<if $wardrobe.isWearingBra>>
			<<='You are only wearing your bra, leaving your pussy and ass completely exposed.'>>
		<<else>>
			<<if $pc.pcs_inhib < 5>>
				<<='You are completely naked, and it makes you feel nervous and ashamed.'>>
			<<elseif $pc.pcs_inhib < 20>>
				<<='You are completely naked. You`re not too comfortable with nudity, but it is a little exciting.'>>
			<<elseif $pc.pcs_inhib >= 90>>
				<<='You are completely naked, which is far better than having to wear clothes.'>>
			<<else>>
				<<='You are completely naked. It`s exciting, and you feel tingly inside.'>>
			<</if>>
		<</if>>
	<</if>>
<</widget>>

<<widget 'stat_bra_msg'>>
	<<if $wardrobe.PCloThinness == 6>>
		<<if $wardrobe.clothes.type == 'swimwear'>>
			<<='Your breasts are completely visible through your transparent swimsuit.'>>
		<<elseif $wardrobe.braworntype == 'salacious'>>
			<<='Your breasts are clearly visible through your transparent bra and top.'>>
		<<elseif $wardrobe.isWearingBra>>
			<<='Your bra is clearly showing through your transparent top.'>>
		<<else>>
			<<='Your breasts are fully on display through your transparent top.'>>
		<</if>>
	<<elseif $wardrobe.PCloThinness == 5>>
		<<if $wardrobe.clothes.type == 'swimwear'>>
			<<='The shape of your nipples is completely visible through your swimsuit.'>>
		<<elseif $wardrobe.braworntype == 'salacious'>>
			<<='The shape of your nipples is completely visible through your thin top and bra.'>>
		<<elseif $wardrobe.isWearingBra>>
			<<if $wardrobe.PCloDress == 1>>
				<<='The shape and color of your bra is visible through your dress.'>>
			<<else>>
				<<='The shape and color of your bra is visible through your top.'>>
			<</if>>
		<<elseif !$wardrobe.isWearingBra and $pc.horny >= 50>>
			<<='Your aroused nipples are hard and showing through your top.'>>
		<<elseif !$wardrobe.isWearingBra and $weather.temperature < 14>>
			<<='Your nipples are freezing cold and visibly hard through your top.'>>
		<<elseif $wardrobe.PCloBra == 1>>
			<<='Your top is replacing a bra.'>>
		<<elseif !$wardrobe.isWearingBra>>
			<<if $wardrobe.PCloDress == 1>>
				<<='The shape of your nipples is completely visible through your thin dress.'>>
			<<else>>
				<<='The shape of your nipples is completely visible through your thin top.'>>
			<</if>>
		<</if>>
	<<elseif $wardrobe.PCloThinness == 4>>
		<<if $wardrobe.clothes.type == 'swimwear'>>
			<<='Your nipples are slightly poking through your swimsuit.'>>
		<<elseif $wardrobe.braworntype == 'salacious'>>
			<<='You are wearing such a thin bra that your nipples are still being faintly outlined through your top.'>>
		<<elseif $wardrobe.isWearingBra>>
			<<='Your bra is being outlined through your top.'>>
		<<elseif !$wardrobe.isWearingBra and $pc.horny >= 50>>
			<<='Your aroused nipples are visibly hard.'>>
		<<elseif !$wardrobe.isWearingBra and $weather.temperature < 14>>
			<<='Your nipples are freezing cold and visibly hard through your top.'>>
		<<elseif $wardrobe.PCloBra == 1>>
			<<='Your top is replacing a bra.'>>
		<<elseif !$wardrobe.isWearingBra>>
			<<if getvar("$CloDress") == 1>>
				<<='The shape of your nipples is faintly visible through your dress.'>>
			<<else>>
				<<='The shape of your nipples is faintly visible through your top.'>>
			<</if>>
		<</if>>
	<<elseif $wardrobe.PCloBra == 1>>
		<<='Your top is replacing a bra.'>>
	<<elseif !$wardrobe.isWearingBra and $pc.horny >= 50>>
		<<='You are not wearing a bra and your aroused nipples are rock hard.'>>
	<<elseif !$wardrobe.isWearingBra and $weather.temperature < 14>>
		<<='You are not wearing a bra and your nipples are freezing cold.'>>
	<<elseif !$wardrobe.isWearingBra>>
		<<if $pc.pcs_cupsize <= 5>>
			<<='You are not wearing a bra and your flat chest feels comfortable against the inside of your clothes.'>>
			<!-- !!			$pc.titsize = 'AA cup'-->
		<<elseif $pc.pcs_cupsize <= 10>>
			<<='You are not wearing a bra and your modest breasts ever so slightly bounce as you walk.'>>
			<!-- !!			$pc.titsize = 'A cup'-->
		<<elseif $pc.pcs_cupsize <= 15>>
			<<='You are not wearing a bra and your pert breasts jiggle softly as you walk.'>>
			<!-- !!			$pc.titsize = 'B cup'-->
		<<elseif $pc.pcs_cupsize <= 20>>
			<<='You are not wearing a bra and your breasts bounce with every step.'>>
			<!-- !!			$pc.titsize = 'C cup'-->
		<<elseif $pc.pcs_cupsize <= 30>>
			<<='You are not wearing a bra and your large breasts bounce with every step.'>>
			<!-- !!			$pc.titsize = 'E cup'-->
		<<else>>
			<<='You are not wearing a bra and your enormous breasts bounce dramatically with every step.'>>
			<!-- !!			$pc.titsize = 'K cup'-->
		<</if>>
	<</if>>
<</widget>>

<<widget 'stat_panty_msg'>>
	<<if !$wardrobe.isWearingPanties and !$wardrobe.isWearingSwimwear and $wardrobe.PCloPanties == 0>>
		<<if $wardrobe.PCloStyle == 4>>
			<<='You are not wearing panties, but you are dressed as a hooker, so that`s hardly surprising.'>>
		<<elseif $wardrobe.PCloBimbo == 1 or getvar("$bimbolevel") > 0 and $wardrobe.PCloSkirt > 3 and $cheatBimbo == 0>>
			<<='You like, totally forgot to put on any panties. You are such a bimbo.'>>
		<<elseif $wardrobe.PCloSkirt > 3 and $pc.trait('commando_lvl') > 0>>
			<<='You feel liberated not wearing panties as your naked ass flashes from under your short skirt.'>>
		<<elseif $wardrobe.PCloSkirt > 3 and $pc.trait('commando_lvl') < 1>>
			<<if $pc.pcs_inhib <= 50>>
				<<='Your face is flushed with shame. You are not wearing panties, and your naked ass flashes from under your short skirt.'>>
			<<else>>
				<<='It feels odd and a bit uncomfortable not wearing panties with such a short skirt. Your naked ass flashes from under it.'>>
			<</if>>
		<<elseif $wardrobe.PCloPants > 0 and $pc.trait('commando_lvl') == 2>>
			<<='You are comfortably commando, not bothered at all by your bare pussy rubbing against the inside of your pants.'>>
		<<elseif $wardrobe.PCloPants > 0 and $pc.trait('commando_lvl') == 3>>
			<<='You are happily commando, feeling very comfortable with your ass and pussy touching the inside of your pants.'>>
		<<elseif $wardrobe.PCloPants > 0 and !$wardrobe.isWearingBra>>
			<<='You aren`t wearing underwear, and your bare pussy is rubbing against your clothing.'>>
		<<elseif $wardrobe.PCloPants > 0 and $wardrobe.isWearingBra>>
			<<='You aren`t wearing panties, and your bare pussy is rubbing against your clothing.'>>
		<<elseif getvar("$towel") == 1>>
			<<='Your naked body is covered only by a short towel.'>>
		<<elseif $wardrobe.clothingworntype != 'nude' and $pc.trait('commando_lvl') < 1>>
			<<='You are not wearing panties and it makes you uncomfortable.'>>
		<<else>>
			<<='You are not wearing panties.'>>
		<</if>>
	<<elseif $wardrobe.pantyworntype == 'salacious' and !$wardrobe.isWearingSwimwear>>
		<<if $wardrobe.PCloStyle == 4>>
			<<='You are wearing see-through panties, but you are dressed as a hooker, so that`s hardly surprising.'>>
		<<elseif $wardrobe.PCloSkirt > 3 and $pc.pcs_inhib > 50>>
			<<='Your ass is clearly visible through your panties, is flashing from under your short skirt.'>>
		<<elseif $wardrobe.PCloSkirt > 3 and $pc.pcs_inhib <= 50>>
		<<elseif $wardrobe.PCloPants > 0 and $pc.trait('commando_lvl') == 3>>
			<<='You wearing transparent panties, but that you`re wearing any at all is bringing down your mood.'>>
		<</if>>
	<<elseif $wardrobe.isWearingPanties and $pc.trait('commando_lvl') == 3>>
		<<='You wearing panties and it makes you uncomfortable.'>>
	<</if>>
<</widget>>


:: Topbar[include]
<div class="buttons">

	<<if State.length >= 2>>
		<<button '🡄'>>
			<<run Engine.backward()>>
		<</button>>
	<<else>>
		<<class 'disabled'>>
			<<button '🡄'>><</button>>
		<</class>>
	<</if>>
	<<if State.length !== State.size>>
		<<button '🡆'>>
			<<run Engine.forward()>>
		<</button>>
	<<else>>
		<<class 'disabled'>>
			<<button '🡆'>><</button>>
		<</class>>
	<</if>>


	<<button '🖫'>>
		<<run UI.saves();>>
	<</button>>

	<<button '🖹'>>
		<<run Dialog.setup("UI Settings", "uiSettings");Dialog.wiki(Story.get("UISettingsDialog").processText());Dialog.open();>>
	<</button>>

	<<button '⭯'>>
		<<run UI.restart();>>
	<</button>>
</div>

:: UISettingsDialog[include]
Font Size:
<<set _userStyle = setup.UserStyle.fromLocalStorage()>>
<<attr 'min' 6 'max' 120>>
	<<numberbox "_userStyle.fontSize" _userStyle.fontSize>>
<</attr>>


Font: 

<<listbox "_userStyle.font" autoselect>>
	<<option "Arial" "Arial">>
	<<option "Georgia" "Georgia, serif;">>
	<<option "Helmet" "Helmet, Freesans, sans-serif">>
	<<option "Lucida Console" '"Lucida Console", Courier, monospace'>>
	<<option "Times" 'Times, "Times New Roman", Georgia, serif'>>
<</listbox>>
