From d004c3183aa8966745d47d2538df8c9b6098efdc Mon Sep 17 00:00:00 2001 From: kopareigns <kopareigns@gmail.com> Date: Sat, 14 Apr 2018 00:27:23 -0400 Subject: [PATCH] Added headgirlSuiteAssignmentFilter --- src/pregmod/widgets/assignmentFilterWidget.tw | 4 ++++ src/uncategorized/headGirlSuite.tw | 9 +++++---- src/uncategorized/schoolroom.tw | 2 +- src/uncategorized/servantsQuarters.tw | 2 +- src/uncategorized/spa.tw | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pregmod/widgets/assignmentFilterWidget.tw b/src/pregmod/widgets/assignmentFilterWidget.tw index 4e1cd9dee84..fe7a46ad484 100644 --- a/src/pregmod/widgets/assignmentFilterWidget.tw +++ b/src/pregmod/widgets/assignmentFilterWidget.tw @@ -43,6 +43,10 @@ <<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "work in the dairy" || x.assignment == "be the Milkmaid"}).map(function(y){y.assignmentVisible = 1})>> <</widget>> +<<widget "headgirlSuiteAssignmentFilter">> + <<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "live with your Head Girl"}).map(function(y){y.assignmentVisible = 1})>> +<</widget>> + <<widget "penthouseAssignmentFilter">> <<set $slaves.map(function(y){y.assignmentVisible = 0})>><<set $slaves.filter(function(x){return x.assignment == "rest" || x.assignment == "be a subordinate slave" || x.assignment == "whore" || x.assignment == "serve the public" || x.assignment == "work a glory hole" || x.assignment == "get milked" || x.assignment == "be a servant" || x.assignment == "please you"|| x.assignment == "stay confined" || x.assignment == "take classes" || x.assignment == "choose her own job" || x.assignment == "live with your Head Girl"}).map(function(y){y.assignmentVisible = 1})>> <</widget>> diff --git a/src/uncategorized/headGirlSuite.tw b/src/uncategorized/headGirlSuite.tw index d5b880ea29d..5ddc2096248 100644 --- a/src/uncategorized/headGirlSuite.tw +++ b/src/uncategorized/headGirlSuite.tw @@ -1,11 +1,11 @@ :: Head Girl Suite [nobr] <<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Head Girl Suite", $showEncyclopedia = 1, $encyclopedia = "Head Girl Suite", $HGSuiteSlaves = $HGSuiteiIDs.length, _SL = $slaves.length>> -<<showallAssignmentFilter>> + <<if $HGSuiteName != "the Head Girl Suite">> <<set $HGSuiteNameCaps = $HGSuiteName.replace("the ", "The ")>> <</if>> - +<<headgirlSuiteAssignmentFilter>> <<set _i = $slaves.findIndex(function(s) { return s.assignment == "live with your Head Girl"; })>> <<if $HeadGirl == 0>> @@ -45,8 +45,10 @@ <<if $HGSuiteSlaves > 0>> <br><br>''Bring the Head Girl's girl out of $HGSuiteName:'' + <<headgirlSuiteAssignmentFilter>> <<set $Flag = 1>> <<include "Slave Summary">> + <<resetAssignmentFilter>> <</if>> <<if ($slaves.length > $HGSuiteSlaves) && ($HGSuiteSlaves < 1)>> @@ -54,10 +56,9 @@ <br><br> <<assignmentFilter>> <span id="ComingGoing"> - <<showallAssignmentFilter>> + <<resetAssignmentFilter>> <<set $Flag = 0>> <<include "Slave Summary">> - <<resetAssignmentFilter>> </span> <</if>> diff --git a/src/uncategorized/schoolroom.tw b/src/uncategorized/schoolroom.tw index 30eaa9fcc03..f059045f2a8 100644 --- a/src/uncategorized/schoolroom.tw +++ b/src/uncategorized/schoolroom.tw @@ -1,7 +1,7 @@ :: Schoolroom [nobr] <<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Schoolroom", $showEncyclopedia = 1, $encyclopedia = "Schoolroom", $schoolroomSlaves = $SchlRiIDs.length>> -<<showallAssignmentFilter>> + <<if $schoolroomName != "the Schoolroom">> <<set $schoolroomNameCaps = $schoolroomName.replace("the ", "The ")>> <</if>> diff --git a/src/uncategorized/servantsQuarters.tw b/src/uncategorized/servantsQuarters.tw index e937096e9d1..94ffaaf0900 100644 --- a/src/uncategorized/servantsQuarters.tw +++ b/src/uncategorized/servantsQuarters.tw @@ -1,7 +1,7 @@ :: Servants' Quarters [nobr] <<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Servants' Quarters", $showEncyclopedia = 1, $encyclopedia = "Servants' Quarters", $servantsQuartersSlaves = $ServQiIDs.length>> -<<showallAssignmentFilter>> + <<if $servantsQuartersName != "the Servants' Quarters">> <<set $servantsQuartersNameCaps = $servantsQuartersName.replace("the ", "The ")>> <</if>> diff --git a/src/uncategorized/spa.tw b/src/uncategorized/spa.tw index 0343ba8e9c9..a1e9050838d 100644 --- a/src/uncategorized/spa.tw +++ b/src/uncategorized/spa.tw @@ -1,7 +1,7 @@ :: Spa [nobr] <<set $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Spa", $showEncyclopedia = 1, $encyclopedia = "Spa", $spaSlaves = $SpaiIDs.length>> -<<showallAssignmentFilter>> + <<if $spaName != "the Spa">> <<set $spaNameCaps = $spaName.replace("the ", "The ")>> <</if>> -- GitLab