:: characterOverview_appearance[menu]
	<<gs 'characterOverviewNavigation' 'appearance'>>
	<<debug>>
		<pre>
		<<=JSON.stringify($pc,null,'\t') >>
		</pre>
	<</debug>>
	<h2>Appearance</h2>
	<<set _appearance = $pc.appearance>>
	
	<p>
		The following modificators affect your appearance.
		They represent a a common consensus of the society you live in.
		For example, even though a male NPC can find obese women more attractive than women with a healthy weight (and act accordingly), he will acknowledge that most of society doesn't share his opinion.
	</p>
	<p>
		Many factors of your appearance are not listed here, because the opinion about them are highly objective.
		These include the color of your hair and eyes, the style of your hair, the style of the clothes you wear, the amount of your piercings and tattoos, and many more.
		Listen closely to the NPCs you interact with to find out what they prefer.
	</p>
	/*<<set _appearanceValues = {genetic:0,lasting:0,temp:0,genetic_max:Infinity,genetic_min:-Infinity,lasting_max:Infinity,lasting_min:-Infinity,temp_max:Infinity,temp_min:-Infinity}>>
	<table class="appearanceOverview">
		<tr>
			<th></th>
			<th colspan="6">
				<<textWithTooltip 'Genetic'>>
					Genetic modificators are inherited from your parents and can not be changed in a meaningful way without a plastic surgery.<br/>
					Examples include the size of your breasts and the proportions of your face.<br/>
					Usually, only NPCs who plan to have a long future with you, such as potential spouses, and people who want to breed offspring with you take this value into account.
				<</textWithTooltip>>
			</th>
			<th colspan="6">
				<<textWithTooltip 'Lasting'>>
					Lasting modificators mostly depend on your lifestyle. They can be changed by changing your lifestyle, but that's a long progress.<br/>
					Examples include your weight and the quality of your skin.<br/>
					Usually, potential boyfriends and talent agencies are interested in this value, since they take your potential beauty into account as well as your current beauty.<br/>
					The genetic modificators are included here as well.
				<</textWithTooltip>>
			</th>
			<th colspan="6">
				<<textWithTooltip 'Temporary'>>
					Temporary modificators may change from day to day or even more frequently.<br/>
					Examples include your makeup, your hygiene and the quality of your clothes.<br/>
					This value is used in most interactions with NPCs.<br/>
					The lasting (and therefore also the genetic) modificators are included here.
				<</textWithTooltip>>
			</th>
		</tr>
		<tr>
			<th></th>
			<<for _i=0; _i<3; _i+=1>>
				<th>
					<<textWithTooltip 'Set'>>Set the current value while ignoring all previous set-, inc- and dec-commands.<</textWithTooltip>>
				</th>
				<th>
					<<textWithTooltip 'Inc'>>Increases the current value by the given number.<</textWithTooltip>>
				</th>
				<th>
					<<textWithTooltip 'Dec'>>Decreases the current value by the given number.<</textWithTooltip>>
				</th>
				<th>
					<<textWithTooltip 'Min'>>
						Sets the minimum number. If the current minimum number is higher than or equal to this, the command is ignored (indicated by brackets).<br/>
						In case of a conflict with max (min being bigger than max) min is applied before max (meaning you get the lower appearance value).
					<</textWithTooltip>>
				</th>
				<th>
					<<textWithTooltip 'Max'>>
						Sets the maximum number. If the current maximum number is lower than or equal to this, the command is ignored (indicated by brackets).<br/>
						In case of a conflict with min (min being bigger than max) min is applied before max (meaning you get the lower appearance value).
					<</textWithTooltip>>
				</th>
				<th class="sum">Sum</th>
			<</for>>
		</tr>
		<<set _apearanceModificators = _appearance.modificators.genetic.concat(_appearance.modificators.lasting,_appearance.modificators.temp).sortByPriority()>>
		<<for _apearanceModificator range _apearanceModificators>>
			<tr>
				<td><<textWithTooltip _apearanceModificator.label>>_apearanceModificator.desc<</textWithTooltip>></td>
				/* Genetic */
				<<if _appearance.modificators.genetic.includes(_apearanceModificator)>>
					<td>
						<<if "set" in _apearanceModificator>>
							_apearanceModificator.set
							<<set _appearanceValues.genetic = _apearanceModificator.set>>
						<</if>>
					</td>
					<td>
						<<if "inc" in _apearanceModificator>>
							+ _apearanceModificator.inc
							<<set _appearanceValues.genetic += _apearanceModificator.inc>>
						<</if>>
					</td>
					<td>
						<<if "dec" in _apearanceModificator>>
							- _apearanceModificator.dec
							<<set _appearanceValues.genetic -= _apearanceModificator.dec>>
						<</if>>
					</td>
					<td>
						<<if "min" in _apearanceModificator>>
							<<if _apearanceModificator.min > _appearanceValues.genetic_min>>
								<<set _appearanceValues.genetic_min = _apearanceModificator.min>>
								_apearanceModificator.min
							<<else>>
								(_apearanceModificator.min)
							<</if>>
						<</if>>
					</td>
					<td>
						<<if "max" in _apearanceModificator>>
							<<if _apearanceModificator.max < _appearanceValues.genetic_max>>
								<<set _appearanceValues.genetic_max = _apearanceModificator.max>>
								_apearanceModificator.max
							<<else>>
								(_apearanceModificator.max)
							<</if>>
						<</if>>
					</td>
				<<else>>
					<td></td><td></td><td></td><td></td><td></td>
				<</if>>
				<td class="sum">_appearanceValues.genetic</td>

				/* Lasting */
				<<if _appearance.modificators.lasting.includes(_apearanceModificator) or _appearance.modificators.genetic.includes(_apearanceModificator)>>
					<td>
						<<if "set" in _apearanceModificator>>
							_apearanceModificator.set
							<<set _appearanceValues.lasting = _apearanceModificator.set>>
						<</if>>
					</td>
					<td>
						<<if "inc" in _apearanceModificator>>
							+ _apearanceModificator.inc
							<<set _appearanceValues.lasting += _apearanceModificator.inc>>
						<</if>>
					</td>
					<td>
						<<if "dec" in _apearanceModificator>>
							- _apearanceModificator.dec
							<<set _appearanceValues.lasting -= _apearanceModificator.dec>>
						<</if>>
					</td>
					<td>
						<<if "min" in _apearanceModificator>>
							<<if _apearanceModificator.min > _appearanceValues.lasting_min>>
								<<set _appearanceValues.lasting_min = _apearanceModificator.min>>
								_apearanceModificator.min
							<<else>>
								(_apearanceModificator.min)
							<</if>>
						<</if>>
					</td>
					<td>
						<<if "max" in _apearanceModificator>>
							<<if _apearanceModificator.max < _appearanceValues.lasting_max>>
								<<set _appearanceValues.lasting_max = _apearanceModificator.max>>
								_apearanceModificator.max
							<<else>>
								(_apearanceModificator.max)
							<</if>>
						<</if>>
					</td>
				<<else>>
					<td></td><td></td><td></td><td></td><td></td>
				<</if>>
				<td class="sum">_appearanceValues.lasting</td>

				/* Temp */
				<<if _appearance.modificators.temp.includes(_apearanceModificator) or _appearance.modificators.lasting.includes(_apearanceModificator) or _appearance.modificators.genetic.includes(_apearanceModificator)>>
					<td>
						<<if "set" in _apearanceModificator>>
							_apearanceModificator.set
							<<set _appearanceValues.temp = _apearanceModificator.set>>
						<</if>>
					</td>
					<td>
						<<if "inc" in _apearanceModificator>>
							+ _apearanceModificator.inc
							<<set _appearanceValues.temp += _apearanceModificator.inc>>
						<</if>>
					</td>
					<td>
						<<if "dec" in _apearanceModificator>>
							- _apearanceModificator.dec
							<<set _appearanceValues.temp -= _apearanceModificator.dec>>
						<</if>>
					</td>
					<td>
						<<if "min" in _apearanceModificator>>
							<<if _apearanceModificator.min > _appearanceValues.temp_min>>
								<<set _appearanceValues.temp_min = _apearanceModificator.min>>
								_apearanceModificator.min
							<<else>>
								(_apearanceModificator.min)
							<</if>>
						<</if>>
					</td>
					<td>
						<<if "max" in _apearanceModificator>>
							<<if _apearanceModificator.max < _appearanceValues.temp_max>>
								<<set _appearanceValues.temp_max = _apearanceModificator.max>>
								_apearanceModificator.max
							<<else>>
								(_apearanceModificator.max)
							<</if>>
						<</if>>
					</td>
					
				<<else>>
					<td colspan="5"></td>
				<</if>>
				<td class="sum">_appearanceValues.temp</td>
			</tr>
		<</for>>
		<tr class="result">
			<td>Result</td>
			<td colspan="6" class="sum">
				<<set _result = _appearanceValues.genetic>>
				<<set _result = Math.min(_result,_appearanceValues.genetic_max)>>
				<<set _result = Math.max(_result,_appearanceValues.genetic_min)>>
				_result
			</td>
			<td colspan="6" class="sum">
				<<set _result = _appearanceValues.lasting>>
				<<set _result = Math.min(_result,_appearanceValues.lasting_max)>>
				<<set _result = Math.max(_result,_appearanceValues.lasting_min)>>
				_result
			</td>
			<td colspan="6" class="sum">
				<<set _result = _appearanceValues.temp>>
				<<set _result = Math.min(_result,_appearanceValues.temp_max)>>
				<<set _result = Math.max(_result,_appearanceValues.temp_min)>>
				_result
			</td>
		</tr>
	</table>*/