:: Penthouse Report [nobr]

<<set _SL = $slaves.length>>
<<if _S.HeadGirl>>
	<<set _HGID = _S.HeadGirl.ID>>
<<else>>
	<<set _HGID = 0>>
<</if>>

<<set _HGSuitSlaves = App.Utils.jobForAssignment(Job.HEADGIRLSUITE).employees()>>

<<for $i = 0; $i < _SL; $i++>>
	<<if assignmentVisible($slaves[$i])>>
		<div><span class='slave-name'><<= SlaveFullName($slaves[$i])>></span>
		<<if $slaves[$i].choosesOwnAssignment == 2>>
			<<include "SA chooses own job">>
			$He
		<</if>>
		<<include "Full Report">>
		<br><br>

		<<if ($slaves[$i].ID == _HGID) && (_HGSuitSlaves.length > 0)>>
			/% We found the Head Girl, now let's find her slave %/
			<<set _iTemp = $i>>
			<<set _ID = _HGSuitSlaves[0].ID, $i = $slaveIndices[_ID]>>

			<<if $slaves[$i].assignment != "live with your Head Girl">>
				<br>@@.red;$slaves[$i].slaveName had been assigned to live with your Head Girl, but this week $he was assigned to $slaves[$i].assignment. $He has been released to your penthouse for reassignment.@@
				<<= removeJob($slaves[$i], "live with your Head Girl")>>
			<<else>>
				<span class='slave-name'><<= SlaveFullName($slaves[$i])>></span>
				<<if $slaves[$i].choosesOwnAssignment == 2>>
					<<include "SA chooses own job">>
					$He
				<</if>>
				<<include "SA live with HG">>
				<br><br>
			<</if>>

			<<set $i = _iTemp>>
		<</if>>
		<br style="clear: both;"></div>
	<</if>>
<</for>>

/* count open spots in facilities after all assignments have been decided for the week */
<<set $brothelSpots = App.Entity.facilities.brothel.freeSpace, $clubSpots = App.Entity.facilities.club.freeSpace, $dairySpots = App.Entity.facilities.dairy.freeSpace, $servantsQuartersSpots = App.Entity.facilities.servantsQuarters.freeSpace>>

src/uncategorized/penthouseReport.tw