code:
:: RA widgets [widget nobr]

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

<<replace #activation>>
__($currentRule.activation):__

<<if ($currentRule.activation != "none") && ($currentRule.activation != "always")>>

<<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>>

      <<click ">">>
<<set $currentRule.eqLower to false>>
<<replace "#lower">>
When ''$currentRule.activation'' is ''more than''
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>>
<</replace>>
<</click>>
 |
<<click ">=">>
<<set $currentRule.eqLower to true>>
<<replace "#lower">>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdLower" $currentRule.thresholdLower>> ''or more''
<</replace>>
<</click>>
 |
<<click "No lower limit">>
<<set $currentRule.thresholdLower to "none">>
<<replace "#lower">>
(no lower limit)
<</replace>>
<</click>>

and

<<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>>

      <<click "<">>
<<set $currentRule.eqUpper to false>>
<<replace "#upper">>
When ''$currentRule.activation'' is ''less than''
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>>
<</replace>>
<</click>>
 |
<<click "<=">>
<<set $currentRule.eqUpper to true>>
<<replace "#upper">>
When ''$currentRule.activation'' is
<<textbox "$currentRule.thresholdUpper" $currentRule.thresholdUpper>> ''or less''
<</replace>>
<</click>>
|
<<click "No upper limit">>
<<set $currentRule.thresholdUpper to "none">>
<<replace "#upper">>
(no upper limit)
<</replace>>
<</click>>
<<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">>

@@color:darkviolet;Very hateful@@: under -95, @@color:darkviolet;Hateful@@: -95 to under -50, @@color:mediumorchid;Resistant@@: -50 to under -20,

@@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">>

@@color:goldenrod;Extremely terrified@@: under -95, @@color:goldenrod;Terrified@@: -95 to under -50, @@color:gold;Frightened@@: -50 to under -20,

@@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">>

@@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">>

@@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">>

@@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">>

// 0 - none, 1 - natural, 2 - lactation implant. //
<<case "pregnancy week">>

// >1 - pregnancy week(s), 0 - not pregnant, -1 - on contraceptives, -2 - barren. //
<<case "pregnancy foetuses">>

// Fetus count, rule can be applied only after week 10 of pregnancy. //
<<case "belly implant volume">>

// Volume of belly implant in ccs. 0 - none. //
<</switch>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeApplyAssignment>>
%/
<<widget "RAChangeApplyAssignment">>
<<replace #applyassignment>>
Apply to assignments:

<<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>>
	<<click "None">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
	''None'' |
<</if>>

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

<<if !_servant>>
	<<click "House Servant">>
		<<set $currentRule.assignment.push("be a servant")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''House Servant''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "be a servant")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_confined>>
	<<click "Confined">>
		<<set $currentRule.assignment.push("stay confined")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Confined''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "stay confined")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_whore>>
	<<click "Whore">>
		<<set $currentRule.assignment.push("whore")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Whore''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "whore")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_public>>
	<<click "Public Servant">>
		<<set $currentRule.assignment.push("serve the public")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Public Servant''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "serve the public")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_milked>>
	<<click "Milking">>
		<<set $currentRule.assignment.push("get milked")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Milking''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "get milked")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_gloryhole>>
	<<click "Gloryhole">>
		<<set $currentRule.assignment.push("work a glory hole")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Gloryhole''
	<<click Stop>>
		<<set removeFromArray($currentRule.assignment, "work a glory hole")>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeExcludeAssignment>>
%/
<<widget "RAChangeExcludeAssignment">>
<<replace #excludeassignment>>
Exclude assignments:

<<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>>
	<<click "None">>
		<<set $currentRule.excludeAssignment to []>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
	''None'' |
<</if>>
<<if !_rest>>
	<<click "Rest">>
		<<set $currentRule.excludeAssignment.push("rest")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Rest''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "rest")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_fucktoy>>
	<<click "Fucktoy">>
		<<set $currentRule.excludeAssignment.push("please you")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Fucktoy''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "please you")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_subordinate>>
	<<click "Subordinate Slave">>
		<<set $currentRule.excludeAssignment.push("be a subordinate slave")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Subordinate Slave''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "be a subordinate slave")>>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_servant>>
	<<click "House Servant">>
		<<set $currentRule.excludeAssignment.push("be a servant")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''House Servant''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "be a servant")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_confined>>
	<<click "Confined">>
		<<set $currentRule.excludeAssignment.push("stay confined")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Confined''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "stay confined")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_whore>>
	<<click "Whore">>
		<<set $currentRule.excludeAssignment.push("whore")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Whore''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "whore")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_public>>
	<<click "Public Servant">>
		<<set $currentRule.excludeAssignment.push("serve the public")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Public Servant''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "serve the public")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_milked>>
	<<click "Milking">>
		<<set $currentRule.excludeAssignment.push("get milked")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Milking''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "get milked")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
|
<<if !_gloryhole>>
	<<click "Gloryhole">>
		<<set $currentRule.excludeAssignment.push("work a glory hole")>>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Gloryhole''
	<<click Stop>>
		<<set removeFromArray($currentRule.excludeAssignment, "work a glory hole")>>
		<<RAChangeExcludeAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</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)>>

Apply to facilities:

<<if (_facility.length > 0)>>
	<<click "None">>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if !ruleFacility(_facility,"hgsuite")>>
	<<click $HGSuiteNameCaps>>
		<<set _facility.push("hgsuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$HGSuiteNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "hgsuite")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if !ruleFacility(_facility,"brothel")>>
	<<click $brothelNameCaps>>
		<<set _facility.push("brothel")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$brothelNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "brothel")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if !ruleFacility(_facility,"club")>>
	<<click $clubNameCaps>>
		<<set _facility.push("club")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$clubNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "club")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if !ruleFacility(_facility,"arcade")>>
	<<click $arcadeNameCaps>>
		<<set _facility.push("arcade")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$arcadeNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "arcade")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if !ruleFacility(_facility,"dairy")>>
	<<click $dairyNameCaps>>
		<<set _facility.push("dairy")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$dairyNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "dairy")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if !ruleFacility(_facility,"servantsquarters")>>
	<<click $servantsQuartersNameCaps>>
		<<set _facility.push("servantsquarters")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$servantsQuartersNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "servantsquarters")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if !ruleFacility(_facility,"mastersuite")>>
	<<click $masterSuiteNameCaps>>
		<<set _facility.push("mastersuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$masterSuiteNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "mastersuite")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if !ruleFacility(_facility,"schoolroom")>>
	<<click $schoolroomNameCaps>>
		<<set _facility.push("schoolroom")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$schoolroomNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "schoolroom")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if !ruleFacility(_facility,"spa")>>
	<<click $spaNameCaps>>
		<<set _facility.push("spa")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$spaNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "spa")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if !ruleFacility(_facility,"clinic")>>
	<<click $clinicNameCaps>>
		<<set _facility.push("clinic")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
''$clinicNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "clinic")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if !ruleFacility(_facility,"cellblock")>>
	<<click $cellblockNameCaps>>
		<<set _facility.push("cellblock")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$cellblockNameCaps''
	<<click Stop>>
		<<set removeFromArray(_facility, "cellblock")>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<</if>>
<<if (def _facility) && (_facility.length > 0)>>

  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<click False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''False'' |
	<<click True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</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)>>

Exclude facilities:

<<if (_excludeFacility.length > 0)>>
	<<click "None">>
		<<set _excludeFacility to []>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if !ruleFacility(_excludeFacility,"hgsuite")>>
	<<click $HGSuiteNameCaps>>
		<<set _excludeFacility.push("hgsuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$HGSuiteNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "hgsuite")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if !ruleFacility(_excludeFacility,"brothel")>>
	<<click $brothelNameCaps>>
		<<set _excludeFacility.push("brothel")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$brothelNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "brothel")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if !ruleFacility(_excludeFacility,"club")>>
	<<click $clubNameCaps>>
		<<set _excludeFacility.push("club")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$clubNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "club")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if !ruleFacility(_excludeFacility,"arcade")>>
	<<click $arcadeNameCaps>>
		<<set _excludeFacility.push("arcade")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$arcadeNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "arcade")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if !ruleFacility(_excludeFacility,"dairy")>>
	<<click $dairyNameCaps>>
		<<set _excludeFacility.push("dairy")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$dairyNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "dairy")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if !ruleFacility(_excludeFacility,"servantsquarters")>>
	<<click $servantsQuartersNameCaps>>
		<<set _excludeFacility.push("servantsquarters")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$servantsQuartersNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "servantsquarters")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if !ruleFacility(_excludeFacility,"mastersuite")>>
	<<click $masterSuiteNameCaps>>
		<<set _excludeFacility.push("mastersuite")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$masterSuiteNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "mastersuite")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if !ruleFacility(_excludeFacility,"schoolroom")>>
	<<click $schoolroomNameCaps>>
		<<set _excludeFacility.push("schoolroom")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$schoolroomNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "schoolroom")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if !ruleFacility(_excludeFacility,"spa")>>
	<<click $spaNameCaps>>
		<<set _excludeFacility.push("spa")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$spaNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "spa")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if !ruleFacility(_excludeFacility,"clinic")>>
	<<click $clinicNameCaps>>
		<<set _excludeFacility.push("clinic")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
''$clinicNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "clinic")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if !ruleFacility(_excludeFacility,"cellblock")>>
	<<click $cellblockNameCaps>>
		<<set _excludeFacility.push("cellblock")>>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeExcludeFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$cellblockNameCaps''
	<<click Stop>>
		<<set removeFromArray(_excludeFacility, "cellblock")>>
		<<RAChangeExcludeFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>
<</if>>
<</if>>
<</replace>>
<</widget>>

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

<<replace #setassignment>>
<<if ($currentRule.setAssignment != "none")>>
''Automatically set assignment:''

	<<click "None">>
		<<set $currentRule.setAssignment to "none">>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
Automatically set assignment:

	''None''
<</if>>
|
<<if ($currentRule.setAssignment != "rest")>>
	<<click "Rest">>
		<<set $currentRule.setAssignment to "rest">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Rest''
<</if>>
|
<<if ($currentRule.setAssignment != "please you")>>
	<<click "Fucktoy">>
		<<set $currentRule.setAssignment to "please you">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Fucktoy''
<</if>>
|
<<if ($currentRule.setAssignment != "be a servant")>>
	<<click "House Servant">>
		<<set $currentRule.setAssignment to "be a servant">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''House Servant''
<</if>>
|
<<if ($currentRule.setAssignment != "stay confined")>>
	<<click "Confined">>
		<<set $currentRule.setAssignment to "stay confined">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Confined''
<</if>>
|
<<if ($currentRule.setAssignment != "whore")>>
	<<click "Whore">>
		<<set $currentRule.setAssignment to "whore">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Whore''
<</if>>
|
<<if ($currentRule.setAssignment != "serve the public")>>
	<<click "Public Servant">>
		<<set $currentRule.setAssignment to "serve the public">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Public Servant''
<</if>>
|
<<if ($currentRule.setAssignment != "get milked")>>
	<<click "Milking">>
		<<set $currentRule.setAssignment to "get milked">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Milking''
<</if>>
|
<<if ($currentRule.setAssignment != "work a glory hole")>>
	<<click "Gloryhole">>
		<<set $currentRule.setAssignment to "work a glory hole">>
		<<set $currentRule.assignFacility to "none">>
		<<set $currentRule.assignment to []>>
		<<RAChangeApplyAssignment>>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''Gloryhole''
<</if>>
<<if ($currentRule.setAssignment != "none")>>

  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<click False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''False'' |
	<<click True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</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)>>

<<if ($currentRule.assignFacility != "none")>>
''Automatically assign slaves to facility:''

	<<click "None">>
		<<set $currentRule.assignFacility to "none">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
Automatically assign slaves to facility:

	''None''
<</if>>
<<if ($HGSuite > 0)>>
|
<<if ($currentRule.assignFacility != "hgsuite")>>
	<<click $HGSuiteNameCaps>>
		<<set $currentRule.assignFacility to "hgsuite">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeApplyFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$HGSuiteNameCaps''
<</if>>
<</if>>
<<if ($brothel > 0)>>
|
<<if ($currentRule.assignFacility != "brothel")>>
	<<click $brothelNameCaps>>
		<<set $currentRule.assignFacility to "brothel">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$brothelNameCaps''
<</if>>
<</if>>
<<if ($club > 0)>>
|
<<if ($currentRule.assignFacility != "club")>>
	<<click $clubNameCaps>>
		<<set $currentRule.assignFacility to "club">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$clubNameCaps''
<</if>>
<</if>>
<<if ($arcade > 0)>>
|
<<if ($currentRule.assignFacility != "arcade")>>
	<<click $arcadeNameCaps>>
		<<set $currentRule.assignFacility to "arcade">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$arcadeNameCaps''
<</if>>
<</if>>
<<if ($dairy > 0)>>
|
<<if ($currentRule.assignFacility != "dairy")>>
	<<click $dairyNameCaps>>
		<<set $currentRule.assignFacility to "dairy">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$dairyNameCaps''
<</if>>
<</if>>
<<if ($servantsQuarters > 0)>>
|
<<if ($currentRule.assignFacility != "servantsquarters")>>
	<<click $servantsQuartersNameCaps>>
		<<set $currentRule.assignFacility to "servantsquarters">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$servantsQuartersNameCaps''
<</if>>
<</if>>
<<if ($masterSuite > 0)>>
|
<<if ($currentRule.assignFacility != "mastersuite")>>
	<<click $masterSuiteNameCaps>>
		<<set $currentRule.assignFacility to "mastersuite">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$masterSuiteNameCaps''
<</if>>
<</if>>
<<if ($schoolroom > 0)>>
|
<<if ($currentRule.assignFacility != "schoolroom")>>
	<<click $schoolroomNameCaps>>
		<<set $currentRule.assignFacility to "schoolroom">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$schoolroomNameCaps''
<</if>>
<</if>>
<<if ($spa > 0)>>
|
<<if ($currentRule.assignFacility != "spa")>>
	<<click $spaNameCaps>>
		<<set $currentRule.assignFacility to "spa">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$spaNameCaps''
<</if>>
<</if>>
<<if ($clinic > 0)>>
|
<<if ($currentRule.assignFacility != "clinic")>>
	<<click $clinicNameCaps>>
		<<set $currentRule.assignFacility to "clinic">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$clinicNameCaps''
<</if>>
<</if>>
<<if ($cellblock > 0)>>
|
<<if ($currentRule.assignFacility != "cellblock")>>
	<<click $cellblockNameCaps>>
		<<set $currentRule.assignFacility to "cellblock">>
		<<set $currentRule.setAssignment to "none">>
		<<set $currentRule.facility to []>>
		<<set _facility to []>>
		<<RAChangeApplyFacility>>
		<<RAChangeAssignFacility>>
		<<RAChangeSetAssignment>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''$cellblockNameCaps''
<</if>>
<</if>>
<<if ($currentRule.assignFacility != "none")>>

  Exclude special slaves:
<<if $currentRule.excludeSpecialSlaves>>
	''True'' |
	<<click False>>
		<<set $currentRule.excludeSpecialSlaves to false>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''False'' |
	<<click True>>
		<<set $currentRule.excludeSpecialSlaves to true>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>

  Automatically remove from facility:
<<if $currentRule.facilityRemove>>
	''True'' |
	<<click False>>
		<<set $currentRule.facilityRemove to false>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<else>>
	''False'' |
	<<click True>>
		<<set $currentRule.facilityRemove to true>>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<</if>>

  Assignment on removal:
$currentRule.removalAssignment |
<<if ($currentRule.removalAssignment != "rest")>>
	<<click Rest>>
		<<set $currentRule.removalAssignment to "rest">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Rest'' |
<</if>>
<<if ($currentRule.removalAssignment != "please you")>>
	<<click "Please you">>
		<<set $currentRule.removalAssignment to "please you">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Please you'' |
<</if>>
<<if ($currentRule.removalAssignment != "whore")>>
	<<click Whore>>
		<<set $currentRule.removalAssignment to "whore">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Whore'' |
<</if>>
<<if ($currentRule.removalAssignment != "serve the public")>>
	<<click "Public servant">>
		<<set $currentRule.removalAssignment to "serve the public">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Public servant'' |
<</if>>
<<if ($currentRule.removalAssignment != "get milked")>>
	<<click "Get milked">>
		<<set $currentRule.removalAssignment to "get milked">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Get milked'' |
<</if>>
<<if ($currentRule.removalAssignment != "stay confined")>>
	<<click "Stay confined">>
		<<set $currentRule.removalAssignment to "stay confined">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>> |
<<else>>
''Stay confined'' |
<</if>>
<<if ($currentRule.removalAssignment != "work a glory hole")>>
	<<click "Glory hole">>
		<<set $currentRule.removalAssignment to "work a glory hole">>
		<<RAChangeAssignFacility>>
		<<RAChangeSave>>
		<<RAChangeApply>>
	<</click>>
<<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">>

    Diet support for growth drugs:
<<if $currentRule.dietGrowthSupport == 1>>
	''on.''
<<else>>
	''off.''
<</if>>

<<click "On">>
	<<set $currentRule.dietGrowthSupport to 1>>
	<<RAChangeDiet>>
<</click>>
|
<<click "Off">>
	<<set $currentRule.dietGrowthSupport to 0>>
	<<RAChangeDiet>>
<</click>>
<</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.''
	<<click "Off">>
		<<set $currentRule.autoSurgery to 0>>
		<<RAChangeAssistantImplants>>
	<</click>>
<<else>>
	''off.''
	<<click "Activate">>
		<<set $currentRule.autoSurgery to 1>>
		<<RAChangeAssistantImplants>>
	<</click>>
<</if>>
<</replace>>
<</widget>>

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

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

<<click "Slave's choice">>
	<<set $currentRule.choosesOwnAssignment to 1>>
	<<RAChangeAssignment>>
<</click>>
<<else>>
  ''selected by the slave.''
<<click "Player control">>
	<<set $currentRule.choosesOwnAssignment to 0>>
	<<RAChangeAssignment>>
<</click>>
<</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.''
<<click "Enable">>
	<<set $currentRule.pornFameSpending to 0>>
	<<RAChangeFameSpending>>
<</click>>
<<else>>
  Weekly porn publicity subsidy for excellent slaves: ''¤$currentRule.pornFameSpending.''
<</if>>
<</replace>>
<</widget>>

/%
 Call as <<RAChangeSave>>
%/
<<widget "RAChangeSave">>
<<replace #saveresult>>
<<click _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>>
<</click>>
<</replace>>
<</widget>>
/%
 Call as <<RAChangeApply>>
<<RAChangeApply>>
%/
<<widget "RAChangeApply">>
<<replace #apply>>

<<click "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]>>
		  <<display "Check Auto Rules Activate">>
		  <<display "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>>
<</click>>

<</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.''
  <<click "Deactivate">>
<<set $currentRule.autoBrand to 0>>
<<RAChangeBranding>>
<</click>>
<<else>>
  ''off.''
  <<click "Activate">>
<<set $currentRule.autoBrand to 1>>
<<RAChangeBranding>>
<</click>>
<</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>>

	<<if ($currentRule.surgery.lactation isnot "no default setting")>>
		<<click "No default setting">>
			<<set $currentRule.surgery.lactation to "no default setting">>
			<<RASurgeryChangeLacation>>
		<</click>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.lactation isnot 0)>>
		<<click "Removed">>
			<<set $currentRule.surgery.lactation to 0>>
			<<RASurgeryChangeLacation>>
		<</click>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.lactation isnot 1)>>
		<<click "Implanted">>
			<<set $currentRule.surgery.lactation to 1>>
			<<RASurgeryChangeLacation>>
		<</click>>
	<<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>>

	<<if ($currentRule.surgery.cosmetic isnot 0)>>
		<<click "None">>
			<<set $currentRule.surgery.cosmetic = 0>>
			<<RASurgeryChangeCosmetic>>
		<</click>> |
	<<else>>
		None |
	<</if>>
	<<if ($currentRule.surgery.cosmetic isnot 1)>>
		<<click "Subtle">>
			<<set $currentRule.surgery.cosmetic = 1>>
			<<RASurgeryChangeCosmetic>>
		<</click>> |
	<<else>>
		Subtle |
	<</if>>
	<<if ($currentRule.surgery.cosmetic isnot 2)>>
		<<click "Invasive">>
			<<set $currentRule.surgery.cosmetic = 2>>
			<<RASurgeryChangeCosmetic>>
		<</click>>
	<<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>>

	<<if ($currentRule.surgery.lips isnot "no default setting")>>
		<<click "No default setting">>
		<<set $currentRule.surgery.lips to "no default setting">>
		<<RASurgeryChangeLips>>
		<</click>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.lips != 0)>>
		<<click "Removed">>
		<<set $currentRule.surgery.lips to 0>>
		<<RASurgeryChangeLips>>
		<</click>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.lips != 20)>>
		<<click "Plush">>
		<<set $currentRule.surgery.lips to 20>>
		<<RASurgeryChangeLips>>
		<</click>> |
	<<else>>
		Plush |
	<</if>>
	<<if ($currentRule.surgery.lips != 40)>>
		<<click "Big">>
		<<set $currentRule.surgery.lips to 40>>
		<<RASurgeryChangeLips>>
		<</click>> |
	<<else>>
		Big |
	<</if>>
	<<if ($currentRule.surgery.lips != 70)>>
		<<click "Huge">>
		<<set $currentRule.surgery.lips to 70>>
		<<RASurgeryChangeLips>>
		<</click>>
	<<else>>
		Huge
	<</if>>
	<<if ($seeExtreme != 0)>>
	<<if ($currentRule.surgery.lips != 95)>>
		| <<click "Facepussy">>
		<<set $currentRule.surgery.lips to 95>>
		<<RASurgeryChangeLips>>
		<</click>>
	<<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>>

	<<if ($currentRule.surgery.butt isnot "no default setting")>>
		<<click "No default setting">>
		<<set $currentRule.surgery.butt to "no default setting">>
		<<RASurgeryChangeButt>>
		<</click>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.butt != 0)>>
		<<click "Removed">>
		<<set $currentRule.surgery.butt to 0>>
		<<RASurgeryChangeButt>>
		<</click>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.butt != 2)>>
		<<click "Slim">>
		<<set $currentRule.surgery.butt to 2>>
		<<RASurgeryChangeButt>>
		<</click>> |
	<<else>>
		Slim |
	<</if>>
	<<if ($currentRule.surgery.butt != 4)>>
		<<click "Stacked">>
		<<set $currentRule.surgery.butt to 4>>
		<<RASurgeryChangeButt>>
		<</click>> |
	<<else>>
		Stacked |
	<</if>>
	<<if ($currentRule.surgery.butt != 6)>>
		<<click "Huge">>
		<<set $currentRule.surgery.butt to 6>>
		<<RASurgeryChangeButt>>
		<</click>> |
	<<else>>
		Huge |
	<</if>>
	<<if ($currentRule.surgery.butt != 9)>>
		<<click "Maximize">>
		<<set $currentRule.surgery.butt to 9>>
		<<RASurgeryChangeButt>>
		<</click>>
	<<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>>

	<<if ($currentRule.surgery.boobs != "no default setting")>>
		<<click "No default setting">>
		<<set $currentRule.surgery.boobs to "no default setting">>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		No default setting |
	<</if>>
	<<if ($currentRule.surgery.boobs != 0)>>
		<<click "Removed">>
		<<set $currentRule.surgery.boobs to 0>>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		Removed |
	<</if>>
	<<if ($currentRule.surgery.boobs != 400)>>
		<<click "Slim">>
		<<set $currentRule.surgery.boobs to 400>>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		Slim |
	<</if>>
	<<if ($currentRule.surgery.boobs != 1000)>>
		<<click "Stacked">>
		<<set $currentRule.surgery.boobs = 1000>>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		Stacked |
	<</if>>
	<<if ($currentRule.surgery.boobs != 2000)>>
		<<click "Huge">>
		<<set $currentRule.surgery.boobs to 2000>>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		Huge |
	<</if>>
	<<if ($currentRule.surgery.boobs != 9000)>>
		<<click "Functional">>
		<<set $currentRule.surgery.boobs to 9000>>
		<<RASurgeryChangeBoobs>>
		<</click>> |
	<<else>>
		Functional |
	<</if>>
	<<if ($currentRule.surgery.boobs != 24000)>>
		<<click "Maximize">>
		<<set $currentRule.surgery.boobs to 24000>>
		<<RASurgeryChangeBoobs>>
		<</click>>
	<<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>>

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

/%
 Call as <<AutoRulesActivate 1>>
$args[0] is whether silent or not
%/
<<widget "AutoRulesActivate">>
	<<if ($args[0] == 0)>>
			<<display "Check Auto Rules Activate">>
			<<display "Default Rules">>
	<<else>>
		<<silently>>
			<<display "Check Auto Rules Activate">>
			<<display "Default Rules">>
		<</silently>>
	<</if>>
<</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>>

Rule _rule (_currentRule.name) is no longer applying to $activeSlave.slaveName.
	<<display "Rules Facility Remove">>
<</widget>>