:: Place In Line
 
<<silently>>

<<set $slavesInLine to []>>

<<if ($activeSlave.assignmentVisible == 1)>>
	<<for $i to 0; $i < $slaves.length; $i++>>
	<<if ($slaves[$i].assignmentVisible == 1)>>
		<<set $slavesInLine.push($slaves[$i])>>
	<</if>>
	<</for>>
<<else>>
	<<for $i to 0; $i < $slaves.length; $i++>>
	<<if ($slaves[$i].assignment is $activeSlave.assignment)>>
		<<set $slavesInLine.push($slaves[$i])>>
	<</if>>
	<</for>>
<</if>>

<<for $i to 0; $i < $slavesInLine.length; $i++>>
	<<if ($slavesInLine[$i].ID is $activeSlave.ID)>>
	<<set $place to $i>>
	<<break>>
	<</if>>
<</for>>

<</silently>>
