diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..248e8c623e76f1777845b5cbc48dd535f718c531 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +# only start pipelines if we are on the main branch, at a git tag or a merge request. +include: + - template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml' + +stages: + - lint + +eslint: + stage: lint + #image: node:current-alpine3.12 + image: node:12-alpine3.12 + tags: [ docker ] + script: + - npm install + #- npm ci ### should use this for automated testing instead of "npm install", but we need a package-lock.json for it. + - npm install eslint-formatter-gitlab + # > /dev/null 2>&1 || FAILED=true to make error type warnings not fail the job + - npx eslint --format gitlab . > /dev/null 2>&1 || FAILED=true + artifacts: + reports: + codequality: gl-codequality.json diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 443b6ae4e3d5a17cd99f528e225a4adeba2c6bd9..8b0e2e6e9c100f67e366ad226e2021756dcb5d7d 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -1,6 +1,6 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. - pmod: "3.8.2", + pmod: "3.8.3", commitHash: null, release: 1112 // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. }; diff --git a/src/facilities/bodyModification/bodyModification.js b/src/facilities/bodyModification/bodyModification.js index 70a831e23d00f44afe17047df1703d0f61bef00d..682f9b9c50cfab76016516595779bca380b4291c 100644 --- a/src/facilities/bodyModification/bodyModification.js +++ b/src/facilities/bodyModification/bodyModification.js @@ -12,11 +12,12 @@ App.UI.bodyModification = function(slave, cheat = false) { } = getPronouns(slave); Enunciate(slave); let piercingLevel; - let modReaction; - let scarApplied; - let tattooChoice; - let brandApplied; - let degradation; + let modReaction = ""; + /** @type {string|0} */ + let tattooChoice = ""; + let scarApplied = false; + let brandApplied = false; + let degradation = 0; container.append(createPage()); return container; @@ -187,9 +188,9 @@ App.UI.bodyModification = function(slave, cheat = false) { } if (modReaction) { r.push(modReaction); - modReaction = false; } } + modReaction = ""; } App.Events.addNode(el, r, "p"); return el; @@ -282,7 +283,6 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.link( "Entire body", () => { - modReaction = ""; for (const location of validPiercingLocations) { if (slave[`${location}Piercing`] !== piercingLevel) { modReaction += App.Medicine.Modification.setPiercing(slave, location, piercingLevel); @@ -303,8 +303,7 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.link( capFirstChar(location), () => { - modReaction = ""; - modReaction += App.Medicine.Modification.setPiercing(slave, location, piercingLevel); + modReaction = App.Medicine.Modification.setPiercing(slave, location, piercingLevel); if (piercingLevel > 1) { degradation += 1; } @@ -472,7 +471,6 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.link( "Entire body", () => { - modReaction = ""; for (const location of validTattooLocations) { if (slave[`${location}tattoo`] !== tattooChoice) { applyTat(location); @@ -490,7 +488,6 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.link( capFirstChar(location), () => { - modReaction = ""; applyTat(location); refresh(); } @@ -527,47 +524,45 @@ App.UI.bodyModification = function(slave, cheat = false) { function oddTattoos() { const el = new DocumentFragment(); - let linkArray; + let linkArray = []; let r = []; + + // Has tat, display option to remove + if (slave.bellyTat !== 0) { + r.push(`${His} navel is tattooed with ${slave.bellyTat}.`); + linkArray.push( + App.UI.DOM.link( + "Remove tattoos", + () => { + tattooChoice = 0; + modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice); + refresh(); + } + ) + ); + } + if (slave.belly >= 10000 && slave.bellyPreg < 450000 && slave.bellyFluid < 5000) { - if (slave.bellyTat === 0) { - r.push(`${He} has no navel tattoos.`); - } else { - r.push(`${His} navel is tattooed with ${slave.bellyTat}.`); - } if (slave.bellyTat === 0) { const bellyTats = new Map([ ["Heart", "a heart"], ["Star", "a star"], ["Butterfly", "a butterfly"], ]); - linkArray = []; + r.push(`${He} has no navel tattoos.`); for (const [title, value] of bellyTats) { linkArray.push( App.UI.DOM.link( title, () => { tattooChoice = value; - applyTat("belly"); + modReaction += App.Medicine.Modification.setTattoo(slave, "belly", tattooChoice); refresh(); } ) ); } } - if (slave.bellyTat !== 0) { - linkArray.push( - App.UI.DOM.link( - "Remove tattoos", - () => { - tattooChoice = 0; - applyTat("belly"); - refresh(); - } - ) - ); - } - r.push(App.UI.DOM.generateLinksStrip(linkArray)); } else if (slave.bellyPreg >= 450000) { r.push(`${His} middle is large and taut enough to be a suitable canvas for a navel focused tattoo, but ${his} brood is too active to permit the needle to do its work.`); } else if (slave.bellyFluid >= 10000) { @@ -575,6 +570,7 @@ App.UI.bodyModification = function(slave, cheat = false) { } else { r.push(`${His} middle isn't large enough to be a suitable canvas for a navel focused tattoo.`); } + r.push(App.UI.DOM.generateLinksStrip(linkArray)); App.Events.addNode(el, r, "div"); r = []; @@ -794,7 +790,7 @@ App.UI.bodyModification = function(slave, cheat = false) { App.UI.DOM.link( "Remove Scar", () => { - scarApplied = 0; + scarApplied = false; delete slave.scar[_scarName]; billSurgery(); degradation -= 10; @@ -957,7 +953,7 @@ App.UI.bodyModification = function(slave, cheat = false) { "left", () => { V.scarTarget.local = _leftTarget; - scarApplied = 1; + scarApplied = true; App.Medicine.Modification.addScar(slave, _leftTarget, V.scarDesign.local); billMod(); degradation += 10; @@ -979,7 +975,7 @@ App.UI.bodyModification = function(slave, cheat = false) { "right", () => { V.scarTarget.local = _rightTarget; - scarApplied = 1; + scarApplied = true; App.Medicine.Modification.addScar(slave, _rightTarget, V.scarDesign.local); billSurgery(); degradation += 10; @@ -1036,7 +1032,7 @@ App.UI.bodyModification = function(slave, cheat = false) { } } billMod(); - scarApplied = 1; + scarApplied = true; degradation += 10; refresh(); } @@ -1053,10 +1049,6 @@ App.UI.bodyModification = function(slave, cheat = false) { const el = new DocumentFragment(); let p = document.createElement('p'); let div = document.createElement('div'); - const { - him, He, - his, His - } = getPronouns(slave); App.UI.DOM.appendNewElement("h2", el, "Branding"); diff --git a/src/facilities/fsPassage.js b/src/facilities/fsPassage.js index 889eb036fb9cd6bd5210afa36f9852a348f92819..86fda835310939f6dd3581be857dc52f43834da3 100644 --- a/src/facilities/fsPassage.js +++ b/src/facilities/fsPassage.js @@ -827,7 +827,7 @@ App.UI.FSPassage = function() { if (arc.FSSlimnessEnthusiast !== "unset") { r.push(App.UI.DOM.makeElement("span", "You are supporting", "bold")); r.push(`enthusiasm for slaves with girlish figures.`); - r.push(activeFS("FSPetiteAdmiration")); + r.push(activeFS("FSSlimnessEnthusiast")); } else { if (_FSCredits > 0) { r.push( diff --git a/src/markets/marketUI.js b/src/markets/marketUI.js index 31a3a2f695b37a639e12a226d5cb40713ac95878..f3c0b1a7e1a7a42948d96910a1fc4720588c15af 100644 --- a/src/markets/marketUI.js +++ b/src/markets/marketUI.js @@ -161,6 +161,7 @@ App.Markets.purchaseFramework = function(slaveMarket, {sTitleSingular = "slave", /** @this {marketGlobal} */ App.Markets.GlobalVariable = function() { + /** @type {FC.SlaveMarketName} */ this.slaveMarket = "kidnappers"; this.introType = ""; this.newSlaves = []; diff --git a/src/npc/startingGirls/commitStartingGirl.tw b/src/npc/startingGirls/commitStartingGirl.tw index 028b716752a937718935e20ca4b9a09b0bcb06be..8ce20e177e3c2bd449da08cea98f5fc2a9465e59 100644 --- a/src/npc/startingGirls/commitStartingGirl.tw +++ b/src/npc/startingGirls/commitStartingGirl.tw @@ -1,6 +1,8 @@ :: Commit Starting Girl [nobr] <<run App.StartingGirls.cleanup($activeSlave)>> +<<set _beforeCareerBonus = clone($activeSlave)>> +<<set _srcID = $activeSlave.ID>> <<if def $slaveIndices[$activeSlave.ID]>> <div>@@.red;Starting Girl ID conflict; slave not committed. Please report this error with a description of your actions.@@</div> @@ -29,19 +31,19 @@ <</link>> <br> <<link "Add another slave, based on the previous slave">> - <<set $activeSlave = clone($activeSlave)>> + <<set $activeSlave = _beforeCareerBonus>> <<set $activeSlave.ID = generateSlaveID()>> <<run nationalityToName($activeSlave), App.StartingGirls.randomizeUnknowns($activeSlave)>> <<set $activeSlave.mother = 0, $activeSlave.father = 0>> <<goto "Starting Girls">> <</link>> - <<set _srcID = $activeSlave.ID>> <br> //Add another slave, related to the previous slave:// <div class="indent"> <<link "Twin">> <<run setMissingParents(getSlave(_srcID))>> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "twin")>> + <<set _beforeCareerBonus.mother = getSlave(_srcID).mother, _beforeCareerBonus.father = getSlave(_srcID).father>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "twin")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -50,7 +52,7 @@ <<if $seeDicks !== 100 && $activeSlave.mother === 0>> <div class="indent"> <<link "Mother">> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "parent", getSlave(_srcID).genes === "XY")>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "parent", _beforeCareerBonus.genes === "XY")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<set getSlave(_srcID).mother = $activeSlave.ID>> <<goto "Starting Girls">> @@ -60,7 +62,7 @@ <<if $seeDicks !== 0 && $activeSlave.father === 0>> <div class="indent"> <<link "Father">> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "parent", getSlave(_srcID).genes === "XX")>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "parent", _beforeCareerBonus.genes === "XX")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<set getSlave(_srcID).father = $activeSlave.ID>> <<goto "Starting Girls">> @@ -73,7 +75,8 @@ <div class="indent"> <<link "Older Sister">> <<run setMissingParents(getSlave(_srcID))>> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "older sibling", getSlave(_srcID).genes === "XY")>> + <<set _beforeCareerBonus.mother = getSlave(_srcID).mother, _beforeCareerBonus.father = getSlave(_srcID).father>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "older sibling", _beforeCareerBonus.genes === "XY")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -83,7 +86,8 @@ <div class="indent"> <<link "Older Brother">> <<run setMissingParents(getSlave(_srcID))>> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "older sibling", getSlave(_srcID).genes === "XX")>> + <<set _beforeCareerBonus.mother = getSlave(_srcID).mother, _beforeCareerBonus.father = getSlave(_srcID).father>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "older sibling", _beforeCareerBonus.genes === "XX")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -95,7 +99,8 @@ <div class="indent"> <<link "Younger Sister">> <<run setMissingParents(getSlave(_srcID))>> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "younger sibling", getSlave(_srcID).genes === "XY")>> + <<set _beforeCareerBonus.mother = getSlave(_srcID).mother, _beforeCareerBonus.father = getSlave(_srcID).father>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "younger sibling", _beforeCareerBonus.genes === "XY")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -105,7 +110,8 @@ <div class="indent"> <<link "Younger Brother">> <<run setMissingParents(getSlave(_srcID))>> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "younger sibling", getSlave(_srcID).genes === "XX")>> + <<set _beforeCareerBonus.mother = getSlave(_srcID).mother, _beforeCareerBonus.father = getSlave(_srcID).father>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "younger sibling", _beforeCareerBonus.genes === "XX")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -116,7 +122,7 @@ <<if $seeDicks !== 100>> <div class="indent"> <<link "Daughter">> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "child", getSlave(_srcID).genes === "XY")>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "child", _beforeCareerBonus.genes === "XY")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>> @@ -125,7 +131,7 @@ <<if $seeDicks !== 0>> <div class="indent"> <<link "Son">> - <<set $activeSlave = generateRelatedSlave(getSlave(_srcID), "child", getSlave(_srcID).genes === "XX")>> + <<set $activeSlave = generateRelatedSlave(_beforeCareerBonus, "child", _beforeCareerBonus.genes === "XX")>> <<run App.StartingGirls.randomizeUnknowns($activeSlave)>> <<goto "Starting Girls">> <</link>>