:: RA widgets [widget nobr]




/%
 Call as <<RAChangeActivation>>
%/
<<widget "RAChangeActivation">>

<<replace #activation>>
__($currentRule.activation):__
<br>
<<if $currentRule.activation == "custom" >>
	<<textarea "$currentRule.customActivationText" $currentRule.customActivationText>>
	<<link "Save activation">>
	<<RAChangeSave>>
	<<RAChangeApply>>
	<</link>>
<<elseif ($currentRule.activation != "none") && ($currentRule.activation != "always")>>
<span id="lower">
<<if ($currentRule.thresholdLower is "none")>>
(no lower limit)
<<else>>
<<if $currentRule.eqLower>>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>> ''or more''
<<else>>
When ''$currentRule.activation'' is ''more than''
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>>
<</if>>
<</if>>
</span>
      <<link ">">>
<<set $currentRule.eqLower to false>>
<<replace "#lower">>
When ''$currentRule.activation'' is ''more than''
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>>
<</replace>>
<</link>>
 |
<<link ">=">>
<<set $currentRule.eqLower to true>>
<<replace "#lower">>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>> ''or more''
<</replace>>
<</link>>
 |
<<link "No lower limit">>
<<set $currentRule.thresholdLower to "none">>
<<replace "#lower">>
(no lower limit)
<</replace>>
<</link>>
<br>and<br>
<span id="upper">
<<if ($currentRule.thresholdUpper is "none")>>
(no upper limit)
<<else>>
<<if $currentRule.eqUpper>>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>> ''or less''
<<else>>
When ''$currentRule.activation'' is ''less than''
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>>
<</if>>
<</if>>
</span>
      <<link "<">>
<<set $currentRule.eqUpper to false>>
<<replace "#upper">>
When ''$currentRule.activation'' is ''less than''
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>>
<</replace>>
<</link>>
 |
<<link "<=">>
<<set $currentRule.eqUpper to true>>
<<replace "#upper">>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>> ''or less''
<</replace>>
<</link>>
|
<<link "No upper limit">>
<<set $currentRule.thresholdUpper to "none">>
<<replace "#upper">>
(no upper limit)
<</replace>>
<</link>>
<<if ($currentRule.thresholdLower is "none") && ( $currentRule.thresholdUpper is "none")>>
	<<set $currentRule.activation to "always">>
<<elseif ($currentRule.thresholdLower != "none") && ( $currentRule.thresholdUpper != "none")>>
	<<if (def $currentRule.thresholdLower and $currentRule.thresholdLower > $currentRule.thresholdUpper)>>
	<<set $currentRule.thresholdLower to $currentRule.thresholdUpper>>
	<</if>>
	<<if (def $currentRule.thresholdUpper and $currentRule.thresholdUpper < $currentRule.thresholdLower)>>
	<<set $currentRule.thresholdUpper to $currentRule.thresholdLower>>
	<</if>>
<</if>>
<</if>>
<<switch $currentRule.activation>>
<<case "none">>
''None.''
<<case "always">>
''Always.''
<<case "devotion">>
<br>@@color:darkviolet;Very hateful@@: under -95, @@color:darkviolet;Hateful@@: -95 to under -50, @@color:mediumorchid;Resistant@@: -50 to under -20,
<br>@@color:yellow;Ambivalent@@: -20 to 20, @@color:hotpink;Accepting@@: over 20 to 50, @@color:deeppink;Devoted@@: over 50 to 95, @@color:magenta;Worshipful@@: over 95
<<case "trust">>
<br>@@color:goldenrod;Extremely terrified@@: under -95, @@color:goldenrod;Terrified@@: -95 to under -50, @@color:gold;Frightened@@: -50 to under -20,
<br>@@color:yellow;Fearful@@: -20 to 20, @@color:mediumaquamarine;Careful@@: over 40 to 50, @@color:mediumseagreen;Trusting@@: 50 to 95, @@color:seagreen;Total trust@@: over 95
<<case "health">>
<br>@@color:red;Death@@: under -100, @@color:red;Near death@@: -100 to less than -90, @@color:red;Extremely unhealthy@@: -90 to less than -50, @@color:red;Unhealthy@@: -50 to less than -20 @@color:green;Healthy@@: -20 to 20, @@color:green;Very healthy@@: 20 to 50, @@color:green;Extremely healthy@@: over 50 to 90, @@color:green;Unnaturally healthy@@: over 90
<<case "sex drive">>
<br>@@color:red;Frigid@@: 20 or under, @@color:red;Poor@@: 21 to 40, @@color:yellow;Average@@: 41 to 60, @@color:green;Powerful@@: 61 to 80, @@color:green;Sex addict@@: 81 to 99, @@color:green;Nympho@@: 100
<<case "weight">>
<br>@@color:red;Emaciated@@: under -95, @@color:red;Skinny@@: -95 to less than -30, Thin: -30 to less than -10 Average weight: -10 to 10, Plush: over 10 to 30, @@color:red;Fat@@: over 30 to 95, @@color:red;Overweight@@: over 95
<<case "lactation">>
<br>// 0 - none, 1 - natural, 2 - lactation implant. //
<<case "pregnancy week">>
<br>// >1 - pregnancy week(s), 0 - not pregnant, -1 - on contraceptives, -2 - barren. //
<<case "pregnancy foetuses">>
<br>// Fetus count, rule can be applied only after week 10 of pregnancy. //
<<case "belly implant volume">>
<br>// Volume of belly implant in ccs. 0 - none. //
<<case "custom">>
<br>// Enter custom condition. //
<</switch>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeApplyAssignment>>
%/
<<widget "RAChangeApplyAssignment">>
<<replace #applyassignment>>
Apply to assignments:
<br>
<<if ndef $currentRule.assignment>>
	<<set $currentRule.assignment to []>>
<</if>>
<<set _rest to false>>
<<set _fucktoy to false>>
<<set _servant to false>>
<<set _confined to false>>
<<set _whore to false>>
<<set _public to false>>
<<set _milked to false>>
<<set _subordinate to false>>
<<set _gloryhole to false>>

<<for _a to $currentRule.assignment.length; _a >= 0; _a-->>
<<if $currentRule.assignment[_a] is "rest">>
	<<set _rest to true>>
<</if>>
<<if $currentRule.assignment[_a] is "please you">>
	<<set _fucktoy to true>>
<</if>>
<<if $currentRule.assignment[_a] is "be a servant">>
	<<set _servant to true>>
<</if>>
<<if $currentRule.assignment[_a] is "whore">>
	<<set _whore to true>>
<</if>>
<<if $currentRule.assignment[_a] is "work a glory hole">>
	<<set _gloryhole to true>>
<</if>>
<<if $currentRule.assignment[_a] is "get milked">>
	<<set _milked to true>>
<</if>>
<<if $currentRule.assignment[_a] is "serve the public">>
	<<set _public to true>>
<</if>>
<<if $currentRule.assignment[_a] is "be a subordinate slave">>
	<<set _subordinate to true>>
<</if>>
<<if $currentRule.assignment[_a] is "stay confined">>
	<<set _confined to true>>
<</if>>
<</for>>

<<if _rest or _fucktoy or _servant or _confined or _whore  or _public or _milked or _subordinate or _gloryhole>>
	<<link "None">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
	''None'' |
<</if>>

<<if !_rest>>
	<<link "Rest">>
		<<set $currentRule.assignment.push("rest")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Rest''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "rest")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_fucktoy>>
	<<link "Fucktoy">>
		<<set $currentRule.assignment.push("please you")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Fucktoy''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "please you")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_subordinate>>
	<<link "Subordinate Slave">>
		<<set $currentRule.assignment.push("be a subordinate slave")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Subordinate Slave''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "be a subordinate slave")>>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|

<<if !_servant>>
	<<link "House Servant">>
		<<set $currentRule.assignment.push("be a servant")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''House Servant''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "be a servant")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_confined>>
	<<link "Confined">>
		<<set $currentRule.assignment.push("stay confined")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Confined''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "stay confined")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_whore>>
	<<link "Whore">>
		<<set $currentRule.assignment.push("whore")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Whore''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "whore")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_public>>
	<<link "Public Servant">>
		<<set $currentRule.assignment.push("serve the public")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Public Servant''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "serve the public")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_milked>>
	<<link "Milking">>
		<<set $currentRule.assignment.push("get milked")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Milking''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "get milked")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_gloryhole>>
	<<link "Gloryhole">>
		<<set $currentRule.assignment.push("work a glory hole")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Gloryhole''
	<<link Stop>>
		<<set removeFromArray($currentRule.assignment, "work a glory hole")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeExcludeAssignment>>
%/
<<widget "RAChangeExcludeAssignment">>
<<replace #excludeassignment>>
Exclude assignments:
<br>
<<if ndef $currentRule.excludeAssignment>>
	<<set $currentRule.excludeAssignment to []>>
<</if>>
<<set _rest to false>>
<<set _fucktoy to false>>
<<set _servant to false>>
<<set _confined to false>>
<<set _whore to false>>
<<set _public to false>>
<<set _milked to false>>
<<set _subordinate to false>>
<<set _gloryhole to false>>
<<for _a to $currentRule.excludeAssignment.length; _a >= 0; _a-->>
<<if $currentRule.excludeAssignment[_a] is "rest">>
	<<set _rest to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "please you">>
	<<set _fucktoy to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "be a servant">>
	<<set _servant to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "whore">>
	<<set _whore to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "work a glory hole">>
	<<set _gloryhole to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "get milked">>
	<<set _milked to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "serve the public">>
	<<set _public to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "be a subordinate slave">>
	<<set _subordinate to true>>
<</if>>
<<if $currentRule.excludeAssignment[_a] is "stay confined">>
	<<set _confined to true>>
<</if>>
<</for>>
<<if _rest or _fucktoy or _servant or _confined or _whore  or _public or _milked or _subordinate or _gloryhole>>
	<<link "None">>
		<<set $currentRule.excludeAssignment to []>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
	''None'' |
<</if>>
<<if !_rest>>
	<<link "Rest">>
		<<set $currentRule.excludeAssignment.push("rest")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Rest''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "rest")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_fucktoy>>
	<<link "Fucktoy">>
		<<set $currentRule.excludeAssignment.push("please you")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Fucktoy''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "please you")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_subordinate>>
	<<link "Subordinate Slave">>
		<<set $currentRule.excludeAssignment.push("be a subordinate slave")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Subordinate Slave''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "be a subordinate slave")>>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_servant>>
	<<link "House Servant">>
		<<set $currentRule.excludeAssignment.push("be a servant")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''House Servant''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "be a servant")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_confined>>
	<<link "Confined">>
		<<set $currentRule.excludeAssignment.push("stay confined")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Confined''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "stay confined")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_whore>>
	<<link "Whore">>
		<<set $currentRule.excludeAssignment.push("whore")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Whore''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "whore")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_public>>
	<<link "Public Servant">>
		<<set $currentRule.excludeAssignment.push("serve the public")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Public Servant''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "serve the public")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_milked>>
	<<link "Milking">>
		<<set $currentRule.excludeAssignment.push("get milked")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Milking''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "get milked")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
|
<<if !_gloryhole>>
	<<link "Gloryhole">>
		<<set $currentRule.excludeAssignment.push("work a glory hole")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Gloryhole''
	<<link Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "work a glory hole")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeApplyFacility>>
%/
<<widget "RAChangeApplyFacility">>

<<replace #applyfacility>>
<<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>>
<br><br>
Apply to facilities:
<br>
<<if (_facility.length > 0)>>
	<<link "None">>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if !ruleFacility(_facility,"hgsuite")>>
	<<link $HGSuiteNameCaps>>
		<<set _facility.push("hgsuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$HGSuiteNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "hgsuite")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if !ruleFacility(_facility,"brothel")>>
	<<link $brothelNameCaps>>
		<<set _facility.push("brothel")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$brothelNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "brothel")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if !ruleFacility(_facility,"club")>>
	<<link $clubNameCaps>>
		<<set _facility.push("club")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$clubNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "club")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if !ruleFacility(_facility,"arcade")>>
	<<link $arcadeNameCaps>>
		<<set _facility.push("arcade")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$arcadeNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "arcade")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if !ruleFacility(_facility,"dairy")>>
	<<link $dairyNameCaps>>
		<<set _facility.push("dairy")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$dairyNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "dairy")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if !ruleFacility(_facility,"servantsquarters")>>
	<<link $servantsQuartersNameCaps>>
		<<set _facility.push("servantsquarters")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$servantsQuartersNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "servantsquarters")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if !ruleFacility(_facility,"mastersuite")>>
	<<link $masterSuiteNameCaps>>
		<<set _facility.push("mastersuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$masterSuiteNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "mastersuite")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if !ruleFacility(_facility,"schoolroom")>>
	<<link $schoolroomNameCaps>>
		<<set _facility.push("schoolroom")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$schoolroomNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "schoolroom")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if !ruleFacility(_facility,"spa")>>
	<<link $spaNameCaps>>
		<<set _facility.push("spa")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$spaNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "spa")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if !ruleFacility(_facility,"clinic")>>
	<<link $clinicNameCaps>>
		<<set _facility.push("clinic")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
''$clinicNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "clinic")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if !ruleFacility(_facility,"cellblock")>>
	<<link $cellblockNameCaps>>
		<<set _facility.push("cellblock")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$cellblockNameCaps''
	<<link Stop>>
		<<set removeFromArray(_facility, "cellblock")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<</if>>
<<if (def _facility) && (_facility.length > 0)>>
<br>
  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<link False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''False'' |
	<<link True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeExcludeFacility>>
%/
<<widget "RAChangeExcludeFacility">>
<<replace #excludefacility>>
<<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>>
<br>
Exclude facilities:
<br>
<<if (_excludeFacility.length > 0)>>
	<<link "None">>
		<<set _excludeFacility to []>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if !ruleFacility(_excludeFacility,"hgsuite")>>
	<<link $HGSuiteNameCaps>>
		<<set _excludeFacility.push("hgsuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$HGSuiteNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "hgsuite")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if !ruleFacility(_excludeFacility,"brothel")>>
	<<link $brothelNameCaps>>
		<<set _excludeFacility.push("brothel")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$brothelNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "brothel")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if !ruleFacility(_excludeFacility,"club")>>
	<<link $clubNameCaps>>
		<<set _excludeFacility.push("club")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$clubNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "club")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if !ruleFacility(_excludeFacility,"arcade")>>
	<<link $arcadeNameCaps>>
		<<set _excludeFacility.push("arcade")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$arcadeNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "arcade")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if !ruleFacility(_excludeFacility,"dairy")>>
	<<link $dairyNameCaps>>
		<<set _excludeFacility.push("dairy")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$dairyNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "dairy")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if !ruleFacility(_excludeFacility,"servantsquarters")>>
	<<link $servantsQuartersNameCaps>>
		<<set _excludeFacility.push("servantsquarters")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$servantsQuartersNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "servantsquarters")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if !ruleFacility(_excludeFacility,"mastersuite")>>
	<<link $masterSuiteNameCaps>>
		<<set _excludeFacility.push("mastersuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$masterSuiteNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "mastersuite")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if !ruleFacility(_excludeFacility,"schoolroom")>>
	<<link $schoolroomNameCaps>>
		<<set _excludeFacility.push("schoolroom")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$schoolroomNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "schoolroom")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if !ruleFacility(_excludeFacility,"spa")>>
	<<link $spaNameCaps>>
		<<set _excludeFacility.push("spa")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$spaNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "spa")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if !ruleFacility(_excludeFacility,"clinic")>>
	<<link $clinicNameCaps>>
		<<set _excludeFacility.push("clinic")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
''$clinicNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "clinic")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if !ruleFacility(_excludeFacility,"cellblock")>>
	<<link $cellblockNameCaps>>
		<<set _excludeFacility.push("cellblock")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$cellblockNameCaps''
	<<link Stop>>
		<<set removeFromArray(_excludeFacility, "cellblock")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeSetAssignment>>
%/
<<widget "RAChangeSetAssignment">>

<<replace #setassignment>>
<<if ($currentRule.setAssignment != "none")>>
''Automatically set assignment:''
<br>
	<<link "None">>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
Automatically set assignment:
<br>
	''None''
<</if>>
|
<<if ($currentRule.setAssignment != "rest")>>
	<<link "Rest">>
		<<set $currentRule.setAssignment to "rest">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Rest''
<</if>>
|
<<if ($currentRule.setAssignment != "please you")>>
	<<link "Fucktoy">>
		<<set $currentRule.setAssignment to "please you">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Fucktoy''
<</if>>
|
<<if ($currentRule.setAssignment != "be a servant")>>
	<<link "House Servant">>
		<<set $currentRule.setAssignment to "be a servant">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''House Servant''
<</if>>
|
<<if ($currentRule.setAssignment != "stay confined")>>
	<<link "Confined">>
		<<set $currentRule.setAssignment to "stay confined">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Confined''
<</if>>
|
<<if ($currentRule.setAssignment != "whore")>>
	<<link "Whore">>
		<<set $currentRule.setAssignment to "whore">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Whore''
<</if>>
|
<<if ($currentRule.setAssignment != "serve the public")>>
	<<link "Public Servant">>
		<<set $currentRule.setAssignment to "serve the public">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Public Servant''
<</if>>
|
<<if ($currentRule.setAssignment != "get milked")>>
	<<link "Milking">>
		<<set $currentRule.setAssignment to "get milked">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Milking''
<</if>>
|
<<if ($currentRule.setAssignment != "work a glory hole")>>
	<<link "Gloryhole">>
		<<set $currentRule.setAssignment to "work a glory hole">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''Gloryhole''
<</if>>
<<if ($currentRule.setAssignment != "none")>>
<br>
  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<link False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''False'' |
	<<link True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeAssignFacility>>
%/
<<widget "RAChangeAssignFacility">>

<<replace #assignfacility>>
<<if ($HGSuite > 0) || ($brothel > 0) || ($club > 0) || ($arcade > 0) || ($dairy > 0) || ($servantsQuarters > 0) || ($masterSuite > 0) || ($schoolroom > 0) || ($spa > 0) || ($clinic > 0) || ($cellblock > 0)>>
<br><br>
<<if ($currentRule.assignFacility != "none")>>
''Automatically assign slaves to facility:''
<br>
	<<link "None">>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
Automatically assign slaves to facility:
<br>
	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if ($currentRule.assignFacility != "hgsuite")>>
	<<link $HGSuiteNameCaps>>
		<<set $currentRule.assignFacility to "hgsuite">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$HGSuiteNameCaps''
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if ($currentRule.assignFacility != "brothel")>>
	<<link $brothelNameCaps>>
		<<set $currentRule.assignFacility to "brothel">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$brothelNameCaps''
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if ($currentRule.assignFacility != "club")>>
	<<link $clubNameCaps>>
		<<set $currentRule.assignFacility to "club">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$clubNameCaps''
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if ($currentRule.assignFacility != "arcade")>>
	<<link $arcadeNameCaps>>
		<<set $currentRule.assignFacility to "arcade">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$arcadeNameCaps''
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if ($currentRule.assignFacility != "dairy")>>
	<<link $dairyNameCaps>>
		<<set $currentRule.assignFacility to "dairy">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$dairyNameCaps''
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if ($currentRule.assignFacility != "servantsquarters")>>
	<<link $servantsQuartersNameCaps>>
		<<set $currentRule.assignFacility to "servantsquarters">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$servantsQuartersNameCaps''
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if ($currentRule.assignFacility != "mastersuite")>>
	<<link $masterSuiteNameCaps>>
		<<set $currentRule.assignFacility to "mastersuite">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$masterSuiteNameCaps''
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if ($currentRule.assignFacility != "schoolroom")>>
	<<link $schoolroomNameCaps>>
		<<set $currentRule.assignFacility to "schoolroom">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$schoolroomNameCaps''
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if ($currentRule.assignFacility != "spa")>>
	<<link $spaNameCaps>>
		<<set $currentRule.assignFacility to "spa">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$spaNameCaps''
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if ($currentRule.assignFacility != "clinic")>>
	<<link $clinicNameCaps>>
		<<set $currentRule.assignFacility to "clinic">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$clinicNameCaps''
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if ($currentRule.assignFacility != "cellblock")>>
	<<link $cellblockNameCaps>>
		<<set $currentRule.assignFacility to "cellblock">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''$cellblockNameCaps''
<</if>>
<</if>>
<<if ($currentRule.assignFacility != "none")>>
<br>
  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<link False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''False'' |
	<<link True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<br>
  Automatically remove from facility:
<<if $currentRule.facilityRemove>>
	''True'' |
	<<link False>>
		<<set $currentRule.facilityRemove to false>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
	''False'' |
	<<link True>>
		<<set $currentRule.facilityRemove to true>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<</if>>
<br>
  Assignment on removal:
$currentRule.removalAssignment |
<<if ($currentRule.removalAssignment != "rest")>>
	<<link Rest>>
		<<set $currentRule.removalAssignment to "rest">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Rest'' |
<</if>>
<<if ($currentRule.removalAssignment != "please you")>>
	<<link "Please you">>
		<<set $currentRule.removalAssignment to "please you">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Please you'' |
<</if>>
<<if ($currentRule.removalAssignment != "whore")>>
	<<link Whore>>
		<<set $currentRule.removalAssignment to "whore">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Whore'' |
<</if>>
<<if ($currentRule.removalAssignment != "serve the public")>>
	<<link "Public servant">>
		<<set $currentRule.removalAssignment to "serve the public">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Public servant'' |
<</if>>
<<if ($currentRule.removalAssignment != "get milked")>>
	<<link "Get milked">>
		<<set $currentRule.removalAssignment to "get milked">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Get milked'' |
<</if>>
<<if ($currentRule.removalAssignment != "stay confined")>>
	<<link "Stay confined">>
		<<set $currentRule.removalAssignment to "stay confined">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>> |
<<else>>
''Stay confined'' |
<</if>>
<<if ($currentRule.removalAssignment != "work a glory hole")>>
	<<link "Glory hole">>
		<<set $currentRule.removalAssignment to "work a glory hole">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</link>>
<<else>>
''Glory hole''
<</if>>
<</if>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeClothes>>
%/
<<widget "RAChangeClothes">>
<<replace #clothes>>
<<if $currentRule.choosesOwnClothes == 1>>
	''slave's choice.''
	<<set $currentRule.clothes to "choosing her own clothes">>
<<else>>
	''$currentRule.clothes.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeCollar>>
%/
<<widget "RAChangeCollar">>
<<replace #collar>>
Collar: ''$currentRule.collar.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeShoes>>
%/
<<widget "RAChangeShoes">>
<<replace #shoes>>
Shoes: ''$currentRule.shoes.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeBelly>>
%/
<<widget "RAChangeBelly">>
<<replace #baccessory>>
Corsetage: ''$currentRule.bellyAccessory.
<</replace>>
<</widget>>

/%
 Call as <<RAChangeVAccessory>>
 $arg[0] - 0: virgin, 1: anal virgin, else non-virgin.
%/
<<widget "RAChangeVAccessory">>
<<if $args[0] == 0>>
	<<replace #vaccessory>>
		Vaginal accessories for virgins: ''$currentRule.virginAccessory.''
	<</replace>>
<<elseif $args[0] == 1>>
	<<replace #avaccessory>>
		Vaginal accessories for anal virgins: ''$currentRule.aVirginAccessory.''
	<</replace>>
<<else>>
	<<replace #voaccessory>>
		Vaginal accessories for other slaves: ''$currentRule.vaginalAccessory.''
	<</replace>>
<</if>>
<</widget>>

/%
 Call as <<RAChangeDAccessory>>
 $arg[0] - 0: anal virgin, else non-virgin.
%/
<<widget "RAChangeDAccessory">>
<<if $args[0] == 0>>
	<<replace #avdaccessory>>
		Dick accessories for anal virgins: ''$currentRule.aVirginDickAccessory.''
	<</replace>>
<<else>>
	<<replace #daccessory>>
		Dick accessories for other slaves: ''$currentRule.dickAccessory.''
	<</replace>>
<</if>>
<</widget>>

/%
 Call as <<RAChangeBAccessory>>
 $arg[0] - 0: anal virgin, else non-virgin.
%/
<<widget "RAChangeBAccessory">>
<<if $args[0] == 0>>
	<<replace #avbuaccessory>>
		Buttplugs for anal virgins: ''$currentRule.aVirginButtplug.''
	<</replace>>
<<else>>
	<<replace #buaccessory>>
		Buttplugs for other slaves: ''$currentRule.buttplug.''
	<</replace>>
<</if>>
<</widget>>

/%
 Call as <<RAChangeCuratives>>
%/
<<widget "RAChangeCuratives">>
<<replace #curatives>>
<<if $currentRule.curatives == "no default setting">>
	''no default setting.''
<<elseif $currentRule.curatives > 0>>
	<<if $currentRule.curatives > 1>>
		''curatives.''
	<<else>>
		''preventatives.''
	<</if>>
<<else>>
	''none.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeGrowth>>
%/
<<widget "RAChangeGrowth">>
<<replace #growth>>
Growth hormones for healthy slaves:

<<if $currentRule.growth is "girlish">>
	''up to a girlish figure.''
<<elseif $currentRule.growth is "stacked">>
	''up to a stacked figure.''
<<elseif $currentRule.growth is "functional">>
	''as large as will allow a normal life.''
<<elseif $currentRule.growth is "unlimited">>
	''no limits.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeAphrodisiacs>>
%/
<<widget "RAChangeAphrodisiacs">>
<<replace #aphrodisiacs>>
Aphrodisiacs:

<<if $currentRule.aphrodisiacs == "no default setting">>
	''no default setting.''
<<elseif $currentRule.aphrodisiacs > 0>>
	<<if $currentRule.aphrodisiacs > 1>>
		''extreme.''
	<<else>>
		''standard.''
	<</if>>
<<else>>
	''none.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangePreg>>
%/
<<widget "RAChangePreg">>
<<replace #preg>>
Contraceptives for fertile slaves: // Will override hormones and drugs if applicable.//

<<if $currentRule.preg == 0>>
	''fertile.''
<<elseif $currentRule.preg == 1>>
	''very fertile.''
<<elseif $currentRule.preg is 2>>
	''extremely fertile.''
<<elseif $currentRule.preg is 3>>
	''hyper fertile.''
<<elseif $currentRule.preg is 4>>
	''just knock my shit up.''
<<elseif $currentRule.preg is -1>>
	''contraceptives.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeXXHormones>>
%/
<<widget "RAChangeXXHormones">>
<<replace #xxhormones>>
Hormones for female slaves:

<<if $currentRule.XX == 0>>
	''no hormones.''
<<elseif $currentRule.XX == 1>>
	''female.''
<<elseif $currentRule.XX is 2>>
	''intensive female.''
<<elseif $currentRule.XX is -1>>
	''male.''
<<elseif $currentRule.XX is -2>>
	''intensive male.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeXYHormones>>
%/
<<widget "RAChangeXYHormones">>
<<replace #xyhormones>>
Hormones for shemales:

<<if $currentRule.XY == 0>>
	''no hormones.''
<<elseif $currentRule.XY == 1>>
	''female.''
<<elseif $currentRule.XY is 2>>
	''intensive female.''
<<elseif $currentRule.XY is -1>>
	''male.''
<<elseif $currentRule.XY is -2>>
	''intensive male.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeGeldHormones>>
%/
<<widget "RAChangeGeldHormones">>
<<replace #geldhormones>>
Hormones for geldings:

<<if $currentRule.gelding == 0>>
	''no hormones.''
<<elseif $currentRule.gelding == 1>>
	''female.''
<<elseif $currentRule.gelding is 2>>
	''intensive female.''
<<elseif $currentRule.gelding is -1>>
	''male.''
<<elseif $currentRule.gelding is -2>>
	''intensive male.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeDiet>>
%/
<<widget "RAChangeDiet">>
<<replace #diet>>
Slave diets:

<<if $currentRule.diet == 30>>
	''designed to keep slaves plush.''
<<elseif $currentRule.diet == 0>>
	''designed for average weight.''
<<elseif $currentRule.diet == -30>>
	''designed to keep slaves thin.''
<<elseif $currentRule.diet is "attractive">>
	''fat slaves will slim down to plush; skinny slaves will fill out to thin.''
<<elseif $currentRule.diet == "XY">>
	''designed to promote male development.''
<<elseif $currentRule.diet == "XX">>
	''designed to promote female development.''
<<elseif $currentRule.diet == "XXY">>
	''designed to promote hermaphrodite development.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<<replace #dietsupport>>
<<if $currentRule.diet isnot "no default setting">>	
<br>&nbsp;&nbsp;&nbsp;&nbsp;Diet support for growth drugs:
<<if $currentRule.dietGrowthSupport == 1>>
	''on.''
<<else>>
	''off.''
<</if>>

<<link "On">>
	<<set $currentRule.dietGrowthSupport to 1>>
	<<RAChangeDiet>>
<</link>>
| 
<<link "Off">>
	<<set $currentRule.dietGrowthSupport to 0>>
	<<RAChangeDiet>>
<</link>>
<</if>>
<</replace>>
<<replace #dietBase>>
Diet Base:

<<if $currentRule.dietCum == 2>>
	''Cum-Based.''
<<elseif (($currentRule.dietCum == 1) && ($currentRule.dietMilk == 0))>>
	''Cum Added.''
<<elseif (($currentRule.dietCum == 0) && ($currentRule.dietMilk == 1))>>
	''Milk Added.''
<<elseif (($currentRule.dietCum == 1) && ($currentRule.dietMilk == 1))>>
	''Cum & Milk Added.''
<<elseif ($currentRule.dietMilk == 2)>>
	''Milk Based.''
<<elseif (($currentRule.dietCum == 0) && ($currentRule.dietMilk == 0))>>
	''Normal Diet.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeMuscles>>
%/
<<widget "RAChangeMuscles">>
<<replace #muscles>>
Muscles:

<<if $currentRule.muscles > 95>>
	''massive.''
<<elseif $currentRule.muscles > 30>>
	''ripped.''
<<elseif $currentRule.muscles > 5>>
	''toned.''
<<elseif $currentRule.muscles == 0>>
	''none.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeBraces>>
%/
<<widget "RAChangeBraces">>
<<replace #braces>>
Braces:

<<if $currentRule.teeth is "straighten">>
	''straighten'' teeth, then remove.
<<elseif $currentRule.teeth is "universal">>
	''universally'' applied.
<<elseif $currentRule.teeth is "none">>
	''none.''
<<else>>
	''no default setting.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeAssistantImplants>>
%/
<<widget "RAChangeAssistantImplants">>
<<replace #assistantimplants>>
Assistant-applied implants:

<<if $currentRule.autoSurgery == 1>>
	''ACTIVE, STAND CLEAR.''
	<<link "Off">>
		<<set $currentRule.autoSurgery to 0>>
		<<RAChangeAssistantImplants>>
	<</link>>
<<else>>
	''off.''
	<<link "Activate">>
		<<set $currentRule.autoSurgery to 1>>
		<<RAChangeAssistantImplants>>
	<</link>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeAssignment>>
%/
<<widget "RAChangeAssignment">>
<<replace #chooseassignment>>
Assignments:

<<if $currentRule.choosesOwnAssignment == 0>>
  ''selected by the player.''

<<link "Slave's choice">>
	<<set $currentRule.choosesOwnAssignment to 1>>
	<<RAChangeAssignment>>
<</link>>
<<else>>
  ''selected by the slave.''
<<link "Player control">>
	<<set $currentRule.choosesOwnAssignment to 0>>
	<<RAChangeAssignment>>
<</link>>
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeLiving>>
%/
<<widget "RAChangeLiving">>
<<replace #living>>
Living standard: ''$currentRule.livingRules.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangePunish>>
%/
<<widget "RAChangePunish">>
<<replace #punish>>
Typical punishment: ''$currentRule.standardPunishment.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeReward>>
%/
<<widget "RAChangeReward">>
<<replace #reward>>
Typical reward: ''$currentRule.standardReward.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeMast>>
%/
<<widget "RAChangeMast">>
<<replace #mast>>
Masturbation rules: ''$currentRule.releaseRules.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeSP>>
%/
<<widget "RAChangeSP">>
<<replace #sp>>
Default setting for smart piercings: ''$currentRule.clitSetting.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeSpeech>>
%/
<<widget "RAChangeSpeech">>
<<replace #speech>>
Speech rules: ''$currentRule.speechRules.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeRelationship>>
%/
<<widget "RAChangeRelationship">>
<<replace #relation>>
Relationship rules: ''$currentRule.relationshipRules.''
<</replace>>
<</widget>>

/%
 Call as <<RAChangeFameSpending>>
%/
<<widget "RAChangeFameSpending">>
<<replace #pornfame>>
<<if $currentRule.pornFameSpending is -1>>
  Release of feeds showing excellent slaves' sex lives: ''off.''
<<link "Enable">>
	<<set $currentRule.pornFameSpending to 0>>
	<<RAChangeFameSpending>>
<</link>>
<<else>>
  Weekly porn publicity subsidy for excellent slaves: ''¤$currentRule.pornFameSpending.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeSave>>
%/
<<widget "RAChangeSave">>
<<replace #saveresult>>
<<link _text>>
	<<replace "#saveresult">>
	//Rule saved.//
	<<for _t to 0; _t < $defaultRules.length; _t++>>
		<<if $currentRule.ID is $defaultRules[_t].ID>>
			<<if $currentRule.thresholdLower != "none">>
				<<set $currentRule.thresholdLower to Number($currentRule.thresholdLower)>>
			<</if>>
			<<if $currentRule.thresholdUpper != "none">>
				<<set $currentRule.thresholdUpper to Number($currentRule.thresholdUpper)>>
			<</if>>
			<<set $currentRule.facility to _facility>>
			<<set $currentRule.excludeFacility to _excludeFacility>>
			<<set $defaultRules[_t] to $currentRule>>
			<<break>>
		<</if>>
	<</for>>
	<</replace>>
<</link>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeApply>>
<<RAChangeApply>>
%/
<<widget "RAChangeApply">>
<<replace #apply>>
<span id="applyresult">
<<link "Apply rules">>
	<<replace "#applyresult">>
	//Rules applied.//
	<</replace>>
	<<replace "#applied">>
	<<for _t to 0; _t < $defaultRules.length; _t++>>
		<<if $currentRule.ID is $defaultRules[_t].ID>>
			<<set $currentRule.facility to _facility>>
			<<set $currentRule.excludeFacility to _excludeFacility>>
			<<if $currentRule.thresholdLower != "none">>
				<<set $currentRule.thresholdLower to Number($currentRule.thresholdLower)>>
			<</if>>
			<<if $currentRule.thresholdUpper != "none">>
				<<set $currentRule.thresholdUpper to Number($currentRule.thresholdUpper)>>
			<</if>>
			<<set $defaultRules[_t] to $currentRule>>
		<</if>>
	<</for>>
	<<for $i to 0; $i < $slaves.length; $i++>>
		  <<if $slaves[$i].useRulesAssistant == 1>>
		  <<set $activeSlave to $slaves[$i]>>
		  <<include "Check Auto Rules Activate">>
		  <<include "Default Rules">>
		  /*<<set $slaves[$i] to $activeSlave>>*/
		  <</if>>
	<</for>>

	<<for _t to 0; _t < $defaultRules.length; _t++>>
		<<set _r to $r-1>>
		<<if $defaultRules[_t].ID is $defaultRules[_r].ID>>
			<<set $currentRule to $defaultRules[_t]>>
			<<set _facility to $currentRule.facility>>
			<<set _excludeFacility to $currentRule.excludeFacility>>
			<<break>>
		<</if>>
	<</for>>
	<</replace>>
<</link>>
</span>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeEyewear>>
%/
<<widget "RAChangeEyewear">>
<<replace #eyewear>>
Eyewear: ''$currentRule.eyewear.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeEyecolor>>
%/
<<widget "RAChangeEyecolor">>
<<replace #eyecolor>>
Eye coloring: ''$currentRule.eyeColor.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeMakeup>>
%/
<<widget "RAChangeMakeup">>
<<replace #makeup>>
''
<<if $currentRule.makeup == 0>>
	makeup-free.
<<elseif $currentRule.makeup == 1>>
	minimal makeup.
<<elseif $currentRule.makeup is 2>>
	luxurious, expensive makeup.
<<elseif $currentRule.makeup is 3>>
	color-coordinated.
<<elseif $currentRule.makeup is 4>>
	garish.
<<else>>
	no default setting.
<</if>>
''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeNails>>
%/
<<widget "RAChangeNails">>
<<replace #nails>>
''
<<if $currentRule.nails == 0>>
	clipped.
<<elseif $currentRule.nails == 1>>
	long and elegant.
<<elseif $currentRule.nails is 2>>
	color-coordinated.
<<elseif $currentRule.nails is 3>>
	sharp and claw-like.
<<elseif $currentRule.nails is 4>>
	bright and glittery.
<<elseif $currentRule.nails is 5>>
	garish.
<<else>>
	no default setting.
<</if>>
''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeHColor>>
%/
<<widget "RAChangeHColor">>
<<replace #hcolor>>
Hair color: ''$currentRule.hColor.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeHStyle>>
%/
<<widget "RAChangeHStyle">>
<<replace #hstyle>>
Hair style: ''$currentRule.hStyle.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeHLength>>
%/
<<widget "RAChangeHLength">>
<<replace #hlength>>
Hair length: ''$currentRule.hLength.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangePHColor>>
%/
<<widget "RAChangePHColor">>
<<replace #phcolor>>
Pubic hair color, when present: ''$currentRule.pubicHColor.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangePHStyle>>
%/
<<widget "RAChangePHStyle">>
<<replace #phstyle>>
Pubic hair style: ''$currentRule.pubicHStyle.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeAHColor>>
%/
<<widget "RAChangeAHColor">>
<<replace #ahcolor>>
Underarm hair color, when present: ''$currentRule.underArmHColor.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeAHStyle>>
%/
<<widget "RAChangeAHStyle">>
<<replace #ahstyle>>
Underarm hair style: ''$currentRule.underArmHStyle.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeEarPiercings>>
%/
<<widget "RAChangeEarPiercings">>
<<replace #earpiercing>>
<<if $currentRule.earPiercing is "no default setting">>No default setting.<<elseif $currentRule.earPiercing == 0>>None.<<elseif $currentRule.earPiercing == 1>>Light.
<<elseif $currentRule.earPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeNosePiercings>>
%/
<<widget "RAChangeNosePiercings">>
<<replace #nosepiercing>>
<<if $currentRule.nosePiercing is "no default setting">>No default setting.<<elseif $currentRule.nosePiercing == 0>>None.<<elseif $currentRule.nosePiercing == 1>>Light.
<<elseif $currentRule.nosePiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeEybrowPiercings>>
%/
<<widget "RAChangeEyebrowPiercings">>
<<replace #eyebrowpiercing>>
<<if $currentRule.eyebrowPiercing is "no default setting">>No default setting.<<elseif $currentRule.eyebrowPiercing == 0>>None.<<elseif $currentRule.eyebrowPiercing == 1>>Light.
<<elseif $currentRule.eyebrowPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeNavelPiercings>>
%/
<<widget "RAChangeNavelPiercings">>
<<replace #navelpiercing>>
<<if $currentRule.navelPiercing is "no default setting">>No default setting.<<elseif $currentRule.navelPiercing == 0>>None.<<elseif $currentRule.navelPiercing == 1>>Light.
<<elseif $currentRule.navelPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeNipplePiercings>>
%/
<<widget "RAChangeNipplePiercings">>
<<replace #nipplepiercing>>
<<if $currentRule.nipplesPiercing is "no default setting">>No default setting.<<elseif $currentRule.nipplesPiercing == 0>>None.<<elseif $currentRule.nipplesPiercing == 1>>Light.
<<elseif $currentRule.nipplesPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeAreolaPiercings>>
%/
<<widget "RAChangeAreolaPiercings">>
<<replace #areolapiercing>>
<<if $currentRule.areolaePiercing is "no default setting">>No default setting.<<elseif $currentRule.areolaePiercing == 0>>None.<<elseif $currentRule.areolaePiercing == 1>>Studded.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeLipPiercings>>
%/
<<widget "RAChangeLipPiercings">>
<<replace #lippiercing>>
<<if $currentRule.lipsPiercing is "no default setting">>No default setting.<<elseif $currentRule.lipsPiercing == 0>>None.<<elseif $currentRule.lipsPiercing == 1>>Light.
<<elseif $currentRule.lipsPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeTonguePiercings>>
%/
<<widget "RAChangeTonguePiercings">>
<<replace #tonguepiercing>>
<<if $currentRule.tonguePiercing is "no default setting">>No default setting.<<elseif $currentRule.tonguePiercing == 0>>None.<<elseif $currentRule.tonguePiercing == 1>>Light.
<<elseif $currentRule.tonguePiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeClitPiercings>>
%/
<<widget "RAChangeClitPiercings">>
<<replace #clitpiercing>>
<<if $currentRule.clitPiercing is "no default setting">>No default setting.<<elseif $currentRule.clitPiercing == 0>>None.<<elseif $currentRule.clitPiercing == 1>>Light.
<<elseif $currentRule.clitPiercing is 2>>Heavy.
<<elseif $currentRule.clitPiercing is 3>>Smart.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeVaginaPiercings>>
%/
<<widget "RAChangeVaginaPiercings">>
<<replace #vaginapiercing>>
<<if $currentRule.vaginaPiercing is "no default setting">>No default setting.<<elseif $currentRule.vaginaPiercing == 0>>None.<<elseif $currentRule.vaginaPiercing == 1>>Light.
<<elseif $currentRule.vaginaPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeDickPiercings>>
%/
<<widget "RAChangeDickPiercings">>
<<replace #dickpiercing>>
<<if $currentRule.dickPiercing is "no default setting">>No default setting.<<elseif $currentRule.dickPiercing == 0>>None.<<elseif $currentRule.dickPiercing == 1>>Light.
<<elseif $currentRule.dickPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeAnusPiercings>>
%/
<<widget "RAChangeAnusPiercings">>
<<replace #anuspiercing>>
<<if $currentRule.anusPiercing is "no default setting">>No default setting.<<elseif $currentRule.anusPiercing == 0>>None.<<elseif $currentRule.anusPiercing == 1>>Light.
<<elseif $currentRule.anusPiercing is 2>>Heavy.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeCorsetPiercings>>
%/
<<widget "RAChangeCorsetPiercings">>
<<replace #corsetpiercing>>
<<if $currentRule.corsetPiercing is "no default setting">>No default setting.<<elseif $currentRule.corsetPiercing == 0>>None.<<elseif $currentRule.corsetPiercing == 1>>Applied.<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeBranding>>
%/
<<widget "RAChangeBranding">>
<<replace #branding>>
<<if $currentRule.autoBrand == 1>>
  ''on.''
  <<link "Deactivate">>
<<set $currentRule.autoBrand to 0>>
<<RAChangeBranding>>
<</link>>
<<else>>
  ''off.''
  <<link "Activate">>
<<set $currentRule.autoBrand to 1>>
<<RAChangeBranding>>
<</link>>
<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeBrandTarget>>
%/
<<widget "RAChangeBrandTarget">>
<<replace #brandtarget>>
Your preferred location for brands is the ''$brandTarget.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeBrandDesign>>
%/
<<widget "RAChangeBrandDesign">>
<<replace #branddesign>>
Your brand design is ''$brandDesign.''
<</replace>>
<</widget>>
/%
 Call as <<RAChangeChestTattoos>>
%/
<<widget "RAChangeChestTattoos">>
<<replace #chesttattoo>>
<<if $currentRule.boobsTat == 0>>none<<else>>$currentRule.boobsTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeButtTattoos>>
%/
<<widget "RAChangeButtTattoos">>
<<replace #butttattoo>>
<<if $currentRule.buttTat == 0>>none<<else>>$currentRule.buttTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeFaceTattoos>>
%/
<<widget "RAChangeFaceTattoos">>
<<replace #facetattoo>>
<<if $currentRule.lipsTat == 0>>none<<else>>$currentRule.lipsTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeShoulderTattoos>>
%/
<<widget "RAChangeShoulderTattoos">>
<<replace #shouldertattoo>>
<<if $currentRule.shouldersTat == 0>>none<<else>>$currentRule.shouldersTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeArmTattoos>>
%/
<<widget "RAChangeArmTattoos">>
<<replace #armtattoo>>
<<if $currentRule.armsTat == 0>>none<<else>>$currentRule.armsTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeLegTattoos>>
%/
<<widget "RAChangeLegTattoos">>
<<replace #legtattoo>>
<<if $currentRule.legsTat == 0>>none<<else>>$currentRule.legsTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeBackTattoos>>
%/
<<widget "RAChangeBackTattoos">>
<<replace #backtattoo>>
<<if $currentRule.backTat == 0>>none<<else>>$currentRule.backTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeStampTattoos>>
%/
<<widget "RAChangeStampTattoos">>
<<replace #stamptattoo>>
<<if $currentRule.stampTat == 0>>none<<else>>$currentRule.stampTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeVaginaTattoos>>
%/
<<widget "RAChangeVaginaTattoos">>
<<replace #vaginatattoo>>
<<if $currentRule.vaginaTat == 0>>none<<else>>$currentRule.vaginaTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeDickTattoos>>
%/
<<widget "RAChangeDickTattoos">>
<<replace #dicktattoo>>
<<if $currentRule.dickTat == 0>>none<<else>>$currentRule.dickTat<</if>>.
<</replace>>
<</widget>>
/%
 Call as <<RAChangeAnusTattoos>>
%/
<<widget "RAChangeAnusTattoos">>
<<replace #anustattoo>>
<<if $currentRule.anusTat == 0>>none<<else>>$currentRule.anusTat<</if>>.
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeLacation>>
%/
<<widget "RASurgeryChangeLacation">>
<<replace #lactation>>
	<<if ($currentRule.surgery.lactation is "no default setting")>>
		''no default setting.''
	<<elseif ($currentRule.surgery.lactation == 1)>>
		''implanted.''
	<<else>>
		''implants will be removed.''
	<</if>>

	<br>

	<<if ($currentRule.surgery.lactation isnot "no default setting")>>
		<<link "No default setting">>
			<<set $currentRule.surgery.lactation to "no default setting">>
			<<RASurgeryChangeLacation>>
		<</link>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.lactation isnot 0)>>
		<<link "Removed">>
			<<set $currentRule.surgery.lactation to 0>>
			<<RASurgeryChangeLacation>>
		<</link>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.lactation isnot 1)>>
		<<link "Implanted">>
			<<set $currentRule.surgery.lactation to 1>>
			<<RASurgeryChangeLacation>>
		<</link>>
	<<else>>
		Implanted
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeCosmetic>>
%/
<<widget "RASurgeryChangeCosmetic">>
<<replace #cosmetic>>
	<<if ($currentRule.surgery.cosmetic is 2)>>
		''invasive.''
	<<elseif ($currentRule.surgery.cosmetic == 1)>>
		''subtle.''
	<<else>>
		''none.''
	<</if>>

	<br>

	<<if ($currentRule.surgery.cosmetic isnot 0)>>
		<<link "None">>
			<<set $currentRule.surgery.cosmetic = 0>>
			<<RASurgeryChangeCosmetic>>
		<</link>> |
	<<else>>
		None |
	<</if>>
	<<if ($currentRule.surgery.cosmetic isnot 1)>>
		<<link "Subtle">>
			<<set $currentRule.surgery.cosmetic = 1>>
			<<RASurgeryChangeCosmetic>>
		<</link>> |
	<<else>>
		Subtle |
	<</if>>
	<<if ($currentRule.surgery.cosmetic isnot 2)>>
		<<link "Invasive">>
			<<set $currentRule.surgery.cosmetic = 2>>
			<<RASurgeryChangeCosmetic>>
		<</link>>
	<<else>>
		Invasive
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeLips>>
%/
<<widget "RASurgeryChangeLips">>
<<replace #lips>>
	<<if ($currentRule.surgery.lips is "no default setting")>>
		''no default setting.''
	<<elseif ($currentRule.surgery.lips is 95)>>
		implanted until a ''facepussy.''
	<<elseif ($currentRule.surgery.lips is 70)>>
		implanted until ''huge.''
	<<elseif ($currentRule.surgery.lips is 40)>>
		implanted until ''big.''
	<<elseif ($currentRule.surgery.lips == 20)>>
		implanted until ''plush.''
	<<else>>
		''implants will be removed.''
	<</if>>

	<br>

	<<if ($currentRule.surgery.lips isnot "no default setting")>>
		<<link "No default setting">>
		<<set $currentRule.surgery.lips to "no default setting">>
		<<RASurgeryChangeLips>>
		<</link>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.lips != 0)>>
		<<link "Removed">>
		<<set $currentRule.surgery.lips to 0>>
		<<RASurgeryChangeLips>>
		<</link>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.lips != 20)>>
		<<link "Plush">>
		<<set $currentRule.surgery.lips to 20>>
		<<RASurgeryChangeLips>>
		<</link>> |
	<<else>>
		Plush |
	<</if>>
	<<if ($currentRule.surgery.lips != 40)>>
		<<link "Big">>
		<<set $currentRule.surgery.lips to 40>>
		<<RASurgeryChangeLips>>
		<</link>> |
	<<else>>
		Big |
	<</if>>
	<<if ($currentRule.surgery.lips != 70)>>
		<<link "Huge">>
		<<set $currentRule.surgery.lips to 70>>
		<<RASurgeryChangeLips>>
		<</link>>
	<<else>>
		Huge
	<</if>>
	<<if ($seeExtreme != 0)>>
	<<if ($currentRule.surgery.lips != 95)>>
		| <<link "Facepussy">>
		<<set $currentRule.surgery.lips to 95>>
		<<RASurgeryChangeLips>>
		<</link>>
	<<else>>
		| Facepussy
	<</if>>
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeButt>>
%/
<<widget "RASurgeryChangeButt">>
<<replace #butt>>
	<<if ($currentRule.surgery.butt is "no default setting")>>
		''no default setting.''
	<<elseif ($currentRule.surgery.butt is 9)>>
		implanted until ''maximized.''
	<<elseif ($currentRule.surgery.butt is 6)>>
		implanted until ''huge.''
	<<elseif ($currentRule.surgery.butt is 4)>>
		implanted until ''stacked.''
	<<elseif ($currentRule.surgery.butt is 2)>>
		implanted until ''slim.''
	<<else>>
		''implants will be removed.''
	<</if>>

	<br>

	<<if ($currentRule.surgery.butt isnot "no default setting")>>
		<<link "No default setting">>
		<<set $currentRule.surgery.butt to "no default setting">>
		<<RASurgeryChangeButt>>
		<</link>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.butt != 0)>>
		<<link "Removed">>
		<<set $currentRule.surgery.butt to 0>>
		<<RASurgeryChangeButt>>
		<</link>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.butt != 2)>>
		<<link "Slim">>
		<<set $currentRule.surgery.butt to 2>>
		<<RASurgeryChangeButt>>
		<</link>> |
	<<else>>
		Slim |
	<</if>>
	<<if ($currentRule.surgery.butt != 4)>>
		<<link "Stacked">>
		<<set $currentRule.surgery.butt to 4>>
		<<RASurgeryChangeButt>>
		<</link>> |
	<<else>>
		Stacked |
	<</if>>
	<<if ($currentRule.surgery.butt != 6)>>
		<<link "Huge">>
		<<set $currentRule.surgery.butt to 6>>
		<<RASurgeryChangeButt>>
		<</link>> |
	<<else>>
		Huge |
	<</if>>
	<<if ($currentRule.surgery.butt != 9)>>
		<<link "Maximize">>
		<<set $currentRule.surgery.butt to 9>>
		<<RASurgeryChangeButt>>
		<</link>>
	<<else>>
		Maximize
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeBoobs>>
%/
<<widget "RASurgeryChangeBoobs">>
<<replace #boobs>>
	<<if ($currentRule.surgery.boobs is "no default setting")>>
		''no default setting.''
	<<elseif ($currentRule.surgery.boobs is 24000)>>
		implanted until ''maximized.''
	<<elseif ($currentRule.surgery.boobs is 9000)>>
		implanted to maximally ''functional,'' where more would immobilize the slave.
	<<elseif ($currentRule.surgery.boobs is 2000)>>
		implanted until ''huge.''
	<<elseif ($currentRule.surgery.boobs == 1000)>>
		implanted until ''stacked.''
	<<elseif ($currentRule.surgery.boobs is 400)>>
		implanted until ''slim.''
	<<else>>
		''implants will be removed.''
	<</if>>

	<br>

	<<if ($currentRule.surgery.boobs != "no default setting")>>
		<<link "No default setting">>
		<<set $currentRule.surgery.boobs to "no default setting">>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.boobs != 0)>>
		<<link "Removed">>
		<<set $currentRule.surgery.boobs to 0>>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.boobs != 400)>>
		<<link "Slim">>
		<<set $currentRule.surgery.boobs to 400>>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		Slim |
	<</if>>
	<<if ($currentRule.surgery.boobs != 1000)>>
		<<link "Stacked">>
		<<set $currentRule.surgery.boobs = 1000>>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		Stacked |
	<</if>>
	<<if ($currentRule.surgery.boobs != 2000)>>
		<<link "Huge">>
		<<set $currentRule.surgery.boobs to 2000>>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		Huge |
	<</if>>
	<<if ($currentRule.surgery.boobs != 9000)>>
		<<link "Functional">>
		<<set $currentRule.surgery.boobs to 9000>>
		<<RASurgeryChangeBoobs>>
		<</link>> |
	<<else>>
		Functional |
	<</if>>
	<<if ($currentRule.surgery.boobs != 24000)>>
		<<link "Maximize">>
		<<set $currentRule.surgery.boobs to 24000>>
		<<RASurgeryChangeBoobs>>
		<</link>>
	<<else>>
		Maximize
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RASurgeryChangeHoles>>
%/
<<widget "RASurgeryChangeHoles">>
<<replace #holes>>
	<<if ($currentRule.surgery.holes is 2)>>
		''virginity restoration'' will be applied where possible.
	<<elseif ($currentRule.surgery.holes == 1)>>
		''hole tightening'' will be applied.
	<<else>>
		''none.''
	<</if>>

	<br>
	<<if ($currentRule.surgery.holes != 0)>>
		<<link "Off">>
		<<set $currentRule.surgery.holes to 0>>
		<<RASurgeryChangeHoles>>
		<</link>> |
	<<else>>
		Off |
	<</if>>
	<<if ($currentRule.surgery.holes != 1)>>
		<<link "Tightening">>
		<<set $currentRule.surgery.holes to 1>>
		<<RASurgeryChangeHoles>>
		<</link>> |
	<<else>>
		Tightening |
	<</if>>
	<<if ($currentRule.surgery.holes != 2)>>
		<<link "Virginity">>
		<<set $currentRule.surgery.holes to 2>>
		<<RASurgeryChangeHoles>>
		<</link>>
	<<else>>
		Virginity
	<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RARemoveRule>>
%/
<<widget "RARemoveRule">>
	<<for _s to 0; _s < $activeSlave.currentRules.length; _s++>>
		<<if _currentRule.ID == $activeSlave.currentRules[_s]>>
			<<set $dump to $activeSlave.currentRules.pluck([_s],[_s])>>
		<</if>>
	<</for>>
	<br>Rule _rule (_currentRule.name) is no longer applying to $activeSlave.slaveName.
	<<include "Rules Facility Remove">>
<</widget>>
