diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index ee4f7e5797d66dbfbd5d95120b2df0f6f5201d8c..556357298d5bbb2fcf10ce1ce868ff826c2b3356 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -10583,33 +10583,33 @@ window.removeJob = function removeJob(slave, assignment) { else { if (V.HeadGirl !== 0 && slave.ID === V.HeadGirl.ID) V.HeadGirl = 0; - if (V.Recruiter !== 0 && slave.ID == V.Recruiter.ID) + else if (V.Recruiter !== 0 && slave.ID === V.Recruiter.ID) V.Recruiter = 0; - if (V.Bodyguard !== 0 && slave.ID === V.Bodyguard.ID) + else if (V.Bodyguard !== 0 && slave.ID === V.Bodyguard.ID) V.Bodyguard = 0; - if (V.Madam !== 0 && slave.ID === V.Madam.ID) + else if (V.Madam !== 0 && slave.ID === V.Madam.ID) V.Madam = 0; - if (V.DJ !== 0 && slave.ID === V.DJ.ID) + else if (V.DJ !== 0 && slave.ID === V.DJ.ID) V.DJ = 0; - if (V.Milkmaid !== 0 && slave.ID === V.Milkmaid.ID) + else if (V.Milkmaid !== 0 && slave.ID === V.Milkmaid.ID) V.Milkmaid = 0; - if (V.Farmer !== 0 && slave.ID === V.Farmer.ID) + else if (V.Farmer !== 0 && slave.ID === V.Farmer.ID) V.Farmer = 0; - if (V.Schoolteacher !== 0 && slave.ID === V.Schoolteacher.ID) + else if (V.Schoolteacher !== 0 && slave.ID === V.Schoolteacher.ID) V.Schoolteacher = 0; - if (V.Attendant !== 0 && slave.ID === V.Attendant.ID) + else if (V.Attendant !== 0 && slave.ID === V.Attendant.ID) V.Attendant = 0; - if (V.Matron !== 0 && slave.ID === V.Matron.ID) + else if (V.Matron !== 0 && slave.ID === V.Matron.ID) V.Matron = 0; - if (V.Nurse !== 0 && slave.ID === V.Nurse.ID) + else if (V.Nurse !== 0 && slave.ID === V.Nurse.ID) V.Nurse = 0; - if (V.Stewardess !== 0 && slave.ID === V.Stewardess.ID) + else if (V.Stewardess !== 0 && slave.ID === V.Stewardess.ID) V.Stewardess = 0; - if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID) + else if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID) V.Wardeness = 0; - if (V.Concubine !== 0 && slave.ID === V.Concubine.ID) + else if (V.Concubine !== 0 && slave.ID === V.Concubine.ID) V.Concubine = 0; - if (V.Collectrix !== 0 && slave.ID === V.Collectrix.ID) + else if (V.Collectrix !== 0 && slave.ID === V.Collectrix.ID) V.Collectrix = 0; /* use .toLowerCase() to get rid of a few dupe conditions. */ diff --git a/src/art/artJS.tw b/src/art/artJS.tw index 83187d5eff5f1991d935cc8e9cd38f0a6876c3f5..1b216ebeefdc3075d2fd1bf4347eb1356751f2d7 100644 --- a/src/art/artJS.tw +++ b/src/art/artJS.tw @@ -1733,6 +1733,7 @@ window.skinColorCatcher = function (artSlave) { }; window.VectorArt = (function (artSlave) { + "use strict"; let V, T, slave; let r; let leftArmType, rightArmType, legSize, torsoSize, buttSize, penisSize, hairLength; diff --git a/src/facilities/farmyard/farmerSelect.tw b/src/facilities/farmyard/farmerSelect.tw index be0a7bcb217fb250343391241d079461a5bb395c..13c285477727f7eb52709eab86b1b3ee31301f06 100644 --- a/src/facilities/farmyard/farmerSelect.tw +++ b/src/facilities/farmyard/farmerSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Farmyard", $showEncyclopedia = 1, $encyclopedia = "Farmer">> <<showallAssignmentFilter>> <<if ($Farmer != 0)>> + <<set $Farmer = getSlave($Farmer.ID)>> <<setLocalPronouns $Farmer>> ''__@@.pink;<<= SlaveFullName($Farmer)>>@@__'' is serving as your Farmer.<br><br>$He will tend to your crops and animals. <<else>> diff --git a/src/facilities/nursery/matronSelect.tw b/src/facilities/nursery/matronSelect.tw index 61def000231a323a36fad60d098743e10f7389da..a51bca44fa9ec762d41b38c9adaadc5312e6a208 100644 --- a/src/facilities/nursery/matronSelect.tw +++ b/src/facilities/nursery/matronSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Nursery", $showEncyclopedia = 1, $encyclopedia = "Matron">> <<showallAssignmentFilter>> <<if ($Matron != 0)>> + <<set $Matron = getSlave($Matron.ID)>> <<setLocalPronouns $Matron>> ''__@@.pink;<<= SlaveFullName($Matron)>>@@__'' is serving as your Matron.<br><br>$He will manage the nursery. <<else>> diff --git a/src/js/assignJS.tw b/src/js/assignJS.tw index 342e01aa19aa8d064d65604d6f91112112a41697..1665ef1787eb7df60fd98e7b72c771cc67fe93f8 100644 --- a/src/js/assignJS.tw +++ b/src/js/assignJS.tw @@ -340,33 +340,33 @@ window.removeJob = function removeJob(slave, assignment) { else { if (V.HeadGirl !== 0 && slave.ID === V.HeadGirl.ID) V.HeadGirl = 0; - if (V.Recruiter !== 0 && slave.ID == V.Recruiter.ID) + else if (V.Recruiter !== 0 && slave.ID === V.Recruiter.ID) V.Recruiter = 0; - if (V.Bodyguard !== 0 && slave.ID === V.Bodyguard.ID) + else if (V.Bodyguard !== 0 && slave.ID === V.Bodyguard.ID) V.Bodyguard = 0; - if (V.Madam !== 0 && slave.ID === V.Madam.ID) + else if (V.Madam !== 0 && slave.ID === V.Madam.ID) V.Madam = 0; - if (V.DJ !== 0 && slave.ID === V.DJ.ID) + else if (V.DJ !== 0 && slave.ID === V.DJ.ID) V.DJ = 0; - if (V.Milkmaid !== 0 && slave.ID === V.Milkmaid.ID) + else if (V.Milkmaid !== 0 && slave.ID === V.Milkmaid.ID) V.Milkmaid = 0; - if (V.Farmer !== 0 && slave.ID === V.Farmer.ID) + else if (V.Farmer !== 0 && slave.ID === V.Farmer.ID) V.Farmer = 0; - if (V.Schoolteacher !== 0 && slave.ID === V.Schoolteacher.ID) + else if (V.Schoolteacher !== 0 && slave.ID === V.Schoolteacher.ID) V.Schoolteacher = 0; - if (V.Attendant !== 0 && slave.ID === V.Attendant.ID) + else if (V.Attendant !== 0 && slave.ID === V.Attendant.ID) V.Attendant = 0; - if (V.Matron !== 0 && slave.ID === V.Matron.ID) + else if (V.Matron !== 0 && slave.ID === V.Matron.ID) V.Matron = 0; - if (V.Nurse !== 0 && slave.ID === V.Nurse.ID) + else if (V.Nurse !== 0 && slave.ID === V.Nurse.ID) V.Nurse = 0; - if (V.Stewardess !== 0 && slave.ID === V.Stewardess.ID) + else if (V.Stewardess !== 0 && slave.ID === V.Stewardess.ID) V.Stewardess = 0; - if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID) + else if (V.Wardeness !== 0 && slave.ID === V.Wardeness.ID) V.Wardeness = 0; - if (V.Concubine !== 0 && slave.ID === V.Concubine.ID) + else if (V.Concubine !== 0 && slave.ID === V.Concubine.ID) V.Concubine = 0; - if (V.Collectrix !== 0 && slave.ID === V.Collectrix.ID) + else if (V.Collectrix !== 0 && slave.ID === V.Collectrix.ID) V.Collectrix = 0; /* use .toLowerCase() to get rid of a few dupe conditions. */ diff --git a/src/uncategorized/attendantSelect.tw b/src/uncategorized/attendantSelect.tw index 77c148e8886f0ef66359b309ad0761c62de20817..18e7dd6c10afe581edda308b5f3a01b0d27ae9ec 100644 --- a/src/uncategorized/attendantSelect.tw +++ b/src/uncategorized/attendantSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Spa", $showEncyclopedia = 1, $encyclopedia = "Attendant">> <<showallAssignmentFilter>> <<if ($Attendant != 0)>> + <<set $Attendant = getSlave($Attendant.ID)>> <<setLocalPronouns $Attendant>> ''__@@.pink;<<= SlaveFullName($Attendant)>>@@__'' is serving as your Attendant.<br><br>$He will help pamper and counsel your slaves. <<else>> diff --git a/src/uncategorized/bgSelect.tw b/src/uncategorized/bgSelect.tw index f500a46ffa0a8cb79625759ac95650ffcf39d0bc..dca3c18ad31bd7c2750199aeb389177e4f3372a8 100644 --- a/src/uncategorized/bgSelect.tw +++ b/src/uncategorized/bgSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back to Main", $nextLink = "Main", $showEncyclopedia = 1, $encyclopedia = "Bodyguard">> <<showallAssignmentFilter>> <<if ($Bodyguard != 0)>> + <<set $Bodyguard = getSlave($Bodyguard.ID)>> <<setLocalPronouns $Bodyguard>> ''__@@.pink;<<= SlaveFullName($Bodyguard)>>@@__'' is serving as your bodyguard.<br><br>$He will remain close to you at all times and guard your person. <<else>> diff --git a/src/uncategorized/concubineSelect.tw b/src/uncategorized/concubineSelect.tw index 7ba78201cccf6746fbb3c2760165367ebfc7e824..b4242ad2b21d37ecee7a40e5c5b7616bf1d00d03 100644 --- a/src/uncategorized/concubineSelect.tw +++ b/src/uncategorized/concubineSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Master Suite", $showEncyclopedia = 1, $encyclopedia = "Concubine">> <<showallAssignmentFilter>> <<if ($Concubine != 0)>> + <<set $Concubine = getSlave($Concubine.ID)>> <<setLocalPronouns $Concubine>> ''__@@.pink;<<= SlaveFullName($Concubine)>>@@__'' is serving as your Concubine.<br><br>$He will take the lead in seeing to your pleasure. <<else>> diff --git a/src/uncategorized/djSelect.tw b/src/uncategorized/djSelect.tw index 4d4cb064d23f7de06940b00aaa571ac831ac5481..f4a6bf3cfcce042d96fa172fda860d559f846c6a 100644 --- a/src/uncategorized/djSelect.tw +++ b/src/uncategorized/djSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Club", $showEncyclopedia = 1>><<set $encyclopedia = "DJ">> <<showallAssignmentFilter>> <<if ($DJ != 0)>> + <<set $DJ = getSlave($DJ.ID)>> <<setLocalPronouns $DJ>> ''__@@.pink;<<= SlaveFullName($DJ)>>@@__'' is serving as your DJ.<br><br>$He will headline entertainment in $clubName. <<else>> diff --git a/src/uncategorized/madamSelect.tw b/src/uncategorized/madamSelect.tw index 16237564f8b58aa6967596221e8cf32b9d90fc23..9da31ff648c3607942f94f9c5afc0eeccc288f2e 100644 --- a/src/uncategorized/madamSelect.tw +++ b/src/uncategorized/madamSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Brothel", $showEncyclopedia = 1, $encyclopedia = "Madam">> <<showallAssignmentFilter>> <<if ($Madam != 0)>> + <<set $Madam = getSlave($Madam.ID)>> ''__@@.pink;<<= SlaveFullName($Madam)>>@@__'' is serving as your Madam.<br><br>She will manage the brothel. <<else>> You have not selected a Madam. diff --git a/src/uncategorized/milkmaidSelect.tw b/src/uncategorized/milkmaidSelect.tw index 3b376235814349e54b2fac05a6b3868795666b50..8664f5a4abaa4296067f5d3d5aba8fe044a11d4f 100644 --- a/src/uncategorized/milkmaidSelect.tw +++ b/src/uncategorized/milkmaidSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Dairy", $showEncyclopedia = 1, $encyclopedia = "Milkmaid">> <<showallAssignmentFilter>> <<if ($Milkmaid != 0)>> + <<set $Milkmaid = getSlave($Milkmaid.ID)>> ''__@@.pink;<<= SlaveFullName($Milkmaid)>>@@__'' is serving as your Milkmaid.<br><br>She will look after your livestock, helping them give milk<<if $seeDicks > 0>> and semen<</if>>. <<else>> You have not selected a Milkmaid. diff --git a/src/uncategorized/nurseSelect.tw b/src/uncategorized/nurseSelect.tw index aec59b4518e647128e6b336362a5b0d381fa43b8..028cd08d534da1043b35aca3a5a702eaa05abed6 100644 --- a/src/uncategorized/nurseSelect.tw +++ b/src/uncategorized/nurseSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Clinic", $showEncyclopedia = 1, $encyclopedia = "Nurse">> <<showallAssignmentFilter>> <<if ($Nurse != 0)>> + <<set $Nurse = getSlave($Nurse.ID)>> <<setLocalPronouns $Nurse>> ''__@@.pink;<<= SlaveFullName($Nurse)>>@@__'' is serving as your Nurse.<br><br>$He will help heal your slaves. <<else>> diff --git a/src/uncategorized/persBusiness.tw b/src/uncategorized/persBusiness.tw index 7a796ee551b524d7859d94143e8a28c40618d7a0..dd833aaaaabfe3311382c5c297d06cf9fea4c37e 100644 --- a/src/uncategorized/persBusiness.tw +++ b/src/uncategorized/persBusiness.tw @@ -802,12 +802,11 @@ Routine upkeep of your demesne costs @@.yellow;<<print cashFormat($costs)>>.@@ <</if>> <</if>> <</if>> -<<if !isInt($costs)>> +<<set $costs = Math.trunc(Math.abs(getCost($slaves)) * 100)/100>> /*overwrite the prediction and actually pay the bill. GetCost should return a negative. Round to two decimal places.*/ +<<if isNaN($costs)>> <br>@@.red;Error, costs is NaN@@ <</if>> -<<set $costs = Math.abs(getCost($slaves))>> /*overwrite the prediction and actually pay the bill. GetCost should return a negative.*/ - <<if $secExp == 1>> <<if $weapManu == 1>> <br> diff --git a/src/uncategorized/recruiterSelect.tw b/src/uncategorized/recruiterSelect.tw index b7450d1150f9fdd404e25bcbf5ca0c6e87db0784..c700e594dc9b9e8833d344a1cea7144ab82fc899 100644 --- a/src/uncategorized/recruiterSelect.tw +++ b/src/uncategorized/recruiterSelect.tw @@ -3,6 +3,8 @@ <<set $nextButton = "Back to Main", $nextLink = "Main", $showEncyclopedia = 1, $encyclopedia = "Recruiter">> <<showallAssignmentFilter>> <<if ($Recruiter != 0)>> + <<set $Recruiter = getSlave($Recruiter.ID)>> + <<setLocalPronouns $Recruiter>> ''__@@.pink;<<= SlaveFullName($Recruiter)>>@@__'' is <<if $recruiterTarget != "other arcologies">> recruiting girls. diff --git a/src/uncategorized/schoolteacherSelect.tw b/src/uncategorized/schoolteacherSelect.tw index 0cc6eab471ae1fb906dfe4f99ab1f92b31e47e14..549b492526feac4be2785a5c955f1f4c1cd93c52 100644 --- a/src/uncategorized/schoolteacherSelect.tw +++ b/src/uncategorized/schoolteacherSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Schoolroom", $showEncyclopedia = 1, $encyclopedia = "Schoolteacher">> <<showallAssignmentFilter>> <<if ($Schoolteacher != 0)>> + <<set $Schoolteacher = getSlave($Schoolteacher.ID)>> <<setLocalPronouns $Schoolteacher>> ''__@@.pink;<<= SlaveFullName($Schoolteacher)>>@@__'' is serving as your Schoolteacher.<br><br>$He will help teach your slaves. <<else>> diff --git a/src/uncategorized/stewardessSelect.tw b/src/uncategorized/stewardessSelect.tw index a328f48ee9cc2f4ea7af3570cfdfaa5877cd264e..021ad7ad5895618cb7a046f3d4f1e87db882b35f 100644 --- a/src/uncategorized/stewardessSelect.tw +++ b/src/uncategorized/stewardessSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Servants' Quarters", $showEncyclopedia = 1, $encyclopedia = "Stewardesses">> <<showallAssignmentFilter>> <<if ($Stewardess != 0)>> + <<set $Stewardess = getSlave($Stewardess.ID)>> <<setLocalPronouns $Stewardess>> ''__@@.pink;<<= SlaveFullName($Stewardess)>>@@__'' is serving as your Stewardess.<br><br>$He will manage the Servants' Quarters. <<else>> diff --git a/src/uncategorized/wardenessSelect.tw b/src/uncategorized/wardenessSelect.tw index fc352b2f0faa6237a306246ff4992156ab1e0bb2..2c87c790bea7c84a1c666165c8c97d61ee097fd8 100644 --- a/src/uncategorized/wardenessSelect.tw +++ b/src/uncategorized/wardenessSelect.tw @@ -3,6 +3,7 @@ <<set $nextButton = "Back", $nextLink = "Cellblock", $showEncyclopedia = 1, $encyclopedia = "Wardeness">> <<showallAssignmentFilter>> <<if ($Wardeness != 0)>> + <<set $Wardeness = getSlave($Wardeness.ID)>> ''__@@.pink;<<= SlaveFullName($Wardeness)>>@@__'' is serving as your Wardeness.<br><br>She will help break your prisoners. <<else>> You have not selected a Wardeness.