diff --git a/src/004-base/facility.js b/src/004-base/facility.js index ad3095f1f5a7ae25535d6252ed53bc2b38e961cb..988a76f0b0919eda8f141ae8a32932a0133b3e5c 100644 --- a/src/004-base/facility.js +++ b/src/004-base/facility.js @@ -7,6 +7,8 @@ App.Data.JobDesc = class { this.fuckdollAccepted = false; /** @type {boolean|undefined} */ this.broodmotherAccepted = false; + /** workers can take part time jobs in addition to their main (full-time) one */ + this.partTime = false; } }; diff --git a/src/facilities/pit/pitFramework.js b/src/facilities/pit/pitFramework.js index 42bec475f68033b5856c16efad19db8c024fc68e..9280cc191ff4eb0c73c592d467a81e2106e53526 100644 --- a/src/facilities/pit/pitFramework.js +++ b/src/facilities/pit/pitFramework.js @@ -6,7 +6,8 @@ App.Data.Facilities.pit = { position: "fighter", assignment: "", publicSexUse: false, - fuckdollAccepted: false + fuckdollAccepted: false, + partTime: true } }, defaultJob: "fighter", diff --git a/src/js/slaveListing.js b/src/js/slaveListing.js index 7f9b9d32fdd7d5e2be395fb70d666404782911ea..74ca168b468877d6c8a57cef114632a0bae45574 100644 --- a/src/js/slaveListing.js +++ b/src/js/slaveListing.js @@ -361,6 +361,8 @@ App.UI.SlaveList.sortingLinks = function(passage) { */ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, showTransfersTab = false, tabCaptions = undefined) { const V = State.variables; + const job = facility.job(); + facilityPassage = facilityPassage || passage(); tabCaptions = tabCaptions || { assign: 'Assign a slave', @@ -378,7 +380,7 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show '</div>'; if (facility.hostedSlaves > 0) { - let facilitySlaves = facility.job().employeesIndices(); + let facilitySlaves = job.employeesIndices(); SlaveSort.indices(facilitySlaves); r += App.UI.tabbar.makeTab("remove", App.UI.SlaveList.render(facilitySlaves, [], App.UI.SlaveList.SlaveInteract.stdInteract, @@ -409,8 +411,10 @@ App.UI.SlaveList.listSJFacilitySlaves = function(facility, facilityPassage, show (slave, index) => App.UI.passageLink(`Send ${getPronouns(slave).object} to ${facility.name}`, "Assign", `$i = ${index}`)); } if (facility.hasFreeSpace) { - // slaves from the penthouse can be transferred here - r += App.UI.tabbar.makeTab("assign", assignableTabContent(App.Entity.facilities.penthouse.employeesIndices())); + const assignableSlaveIdxs = job.desc.partTime ? + Array.apply(null, {length: V.slaves.length}).map(Number.call, Number) : // all slaves can work here + App.Entity.facilities.penthouse.employeesIndices(); // only slaves from the penthouse can be transferred here + r += App.UI.tabbar.makeTab("assign", assignableTabContent(assignableSlaveIdxs)); } else { r += App.UI.tabbar.makeTab("assign", `<strong>${capFirstChar(facility.name)} is full and cannot hold any more slaves</strong>`); }