From 1a1db28060d68c4a5b2cd5051fae3d50168eb8b7 Mon Sep 17 00:00:00 2001 From: Svornost <11434-svornost@users.noreply.gitgud.io> Date: Wed, 29 Apr 2020 20:18:03 -0700 Subject: [PATCH] Formalize naming for @Pit/@Lurcher psuedo-assignments --- src/facilities/pit/pitFramework.js | 2 +- src/js/assignJS.js | 10 +++++----- src/uncategorized/coursingAssociation.tw | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/facilities/pit/pitFramework.js b/src/facilities/pit/pitFramework.js index 40a848ffee4..ca88780f3c6 100644 --- a/src/facilities/pit/pitFramework.js +++ b/src/facilities/pit/pitFramework.js @@ -4,7 +4,7 @@ App.Data.Facilities.pit = { jobs: { fighter: { position: "fighter", - assignment: "Pit", /* pseudo-assignment for addJob/RemoveJob */ + assignment: "@Pit", /* pseudo-assignment for assignmentTransition/assignJob/removeJob */ publicSexUse: false, fuckdollAccepted: false, partTime: true diff --git a/src/js/assignJS.js b/src/js/assignJS.js index 0c8e5b33a29..7a36d101055 100644 --- a/src/js/assignJS.js +++ b/src/js/assignJS.js @@ -10,7 +10,7 @@ globalThis.assignJob = function(slave, job) { let r = ""; let oldJob = slave.assignment; - if (job === "Pit" || job === "Coursing Association") { return r; } + if (job === "@Pit" || job === "@Lurcher") { return r; } // psuedo-assignments must be handled through assignmentTransition for now removeJob(slave, slave.assignment, true); const idx = V.slaveIndices[slave.ID]; @@ -460,9 +460,9 @@ globalThis.removeJob = function(slave, assignment, saveRecord) { const idx = V.slaveIndices[slave.ID]; - if (assignment === "Pit") { + if (assignment === "@Pit") { V.fighterIDs.delete(slave.ID); - } else if (assignment === "Coursing Association") { + } else if (assignment === "@Lurcher") { V.LurcherID = 0; } else { if (V.HeadGirl !== 0 && slave.ID === V.HeadGirl.ID) { @@ -943,12 +943,12 @@ globalThis.assignmentTransition = function(slave, assignTo, passage) { V.activeSlave = slave; // might be needed by the passage we're transitioning to (TODO: get rid of this) switch (assignTo) { - case "Pit": { + case "@Pit": { V.fighterIDs.push(slave.ID); Engine.play(passage); break; } - case "Coursing Association": { + case "@Lurcher": { V.LurcherID = slave.ID; Engine.play(passage); break; diff --git a/src/uncategorized/coursingAssociation.tw b/src/uncategorized/coursingAssociation.tw index 11eabbdcc61..bfc787958a9 100644 --- a/src/uncategorized/coursingAssociation.tw +++ b/src/uncategorized/coursingAssociation.tw @@ -17,12 +17,12 @@ The chasing slaves are known as lurchers, the term once used for the sighthounds <<if $LurcherID != 0>> <br><br>''Fire your Lurcher:'' <<= App.UI.SlaveList.render.listMarkup([App.Utils.slaveIndexForId($LurcherID)], [], - (slave) => App.UI.DOM.passageLink(SlaveFullName(slave), 'Coursing Association', () => removeJob(slave, "Coursing Association")))>> + (slave) => App.UI.DOM.passageLink(SlaveFullName(slave), 'Coursing Association', () => removeJob(slave, "@Lurcher")))>> <</if>> <br><br>''Select a slave to course as a Lurcher:'' <br><br> <<= App.UI.SlaveList.slaveSelectionList( s => $LurcherID !== s.ID && canWalk(s) && canHold(s) && (canSee(s) || canHear(s)) && s.fuckdoll === 0 && isSlaveAvailable(s), - (slave) => App.UI.DOM.link(SlaveFullName(slave), () => assignmentTransition(slave, "Coursing Association", "Coursing Association")) + (slave) => App.UI.DOM.link(SlaveFullName(slave), () => assignmentTransition(slave, "@Lurcher", "Coursing Association")) )>> -- GitLab