diff --git a/devTools/types/FC/human.d.ts b/devTools/types/FC/human.d.ts index 9c3a291b08d4f38a0ff1f840c54c944157bed5ec..58c97c3e5fe22f1aa34a824ffafa5b864fc22555 100644 --- a/devTools/types/FC/human.d.ts +++ b/devTools/types/FC/human.d.ts @@ -431,7 +431,7 @@ declare global { } type EarWear = WithNone<"hearing aids" | "muffling ear plugs" | "deafening ear plugs">; - type EarShape = WithNone<"damaged" | "normal" | "pointy" | "elven" | "cow" | "robot" | "orcish" | "sheep" | "deer" | "gazelle" | "bird" | "dragon">; + type EarShape = WithNone<"holes" | "damaged" | "normal" | "pointy" | "elven" | "cow" | "robot" | "orcish" | "sheep" | "deer" | "gazelle" | "bird" | "dragon">; type EarTopType = WithNone<"normal" | "cat" | "leopard" | "tiger" | "jaguar" | "lion" | "dog" | "wolf" | "jackal" | "fox" | "raccoon" | "rabbit" | "squirrel"| "horse">; type EyebrowStyle = "bald" | "curved" | "elongated" | "high-arched" | "natural" | "rounded" | "shaved" | "shortened" | "slanted inwards" | "slanted outwards" | "straight"; diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index 7833cc6cdc015dae26edd6dc534adee158393597..5ef16aebe97a460ecf404d24c82e1a1dd0c23c0f 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -2,5 +2,5 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "4.0.0-alpha.31", commitHash: null, - release: 1248, // When getting close to 2000, please remove the check located within the onLoad() function defined at line five of src/js/eventHandlers.js. + release: 1249, // 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/data/backwardsCompatibility/updateSlaveObject.js b/src/data/backwardsCompatibility/updateSlaveObject.js index ef2346848cc6cb0fd6ee166a15d36960704c66b3..08f80bc48489dea3c2a774905c93c48923120cf1 100644 --- a/src/data/backwardsCompatibility/updateSlaveObject.js +++ b/src/data/backwardsCompatibility/updateSlaveObject.js @@ -1381,6 +1381,11 @@ App.Update.Slave = function(slave, genepool = false) { slave.earT = earT; } } + if (V.releaseID < 1247) { + if ((slave.earShape === "none") && slave.earT === "none" && slave.race !== "catgirl") { + slave.earShape = "holes"; + } + } if (V.releaseID < 1036) { for (let pmw = 0; pmw < slave.womb.length; pmw++) { if (slave.womb[pmw].genetics.mother !== slave.womb[pmw].motherID || slave.womb[pmw].genetics.father !== slave.womb[pmw].fatherID) { diff --git a/src/js/DefaultRules.js b/src/js/DefaultRules.js index e81019b787e8545a04decce7e3b0c3f9a1906e8f..39b5000482de2333ce4bc9d8808fe0e53bca53fe 100644 --- a/src/js/DefaultRules.js +++ b/src/js/DefaultRules.js @@ -405,12 +405,18 @@ globalThis.DefaultRules = function(slave, options) { if ((rule.earwear !== undefined) && (rule.earwear !== null)) { switch (rule.earwear) { case "correct with hearing aids": - if (slave.hears === -1) { + if (slave.hears === -1 && slave.earShape !== "none") { if (slave.earwear !== "hearing aids") { slave.earwear = "hearing aids"; cashX(forceNeg(V.modCost), "slaveMod", slave); message(`${slave.slaveName} has been given hearing aids.`, sourceRecord.earwear); } + } else if (slave.earShape === "none") { + if (slave.earwear === "hearing aids") { + slave.earwear = "none"; + } + // TODO:@franklygeorge handing of slave.earT as a valid hearing aid target here and in all other places that handle hearing aids + message(`${slave.slaveName} cannot use hearing aids, as they have no ears.`, sourceRecord.earwear); } else { if (slave.earwear !== "none") { slave.earwear = "none"; diff --git a/src/js/rulesAssistantOptions.js b/src/js/rulesAssistantOptions.js index 6f776edeeb5db806a68d30942077dca05ec7ef4f..23b51dd9f153e470b20436d066822ed517eb45e0 100644 --- a/src/js/rulesAssistantOptions.js +++ b/src/js/rulesAssistantOptions.js @@ -4200,6 +4200,7 @@ App.RA.options = (function() { class EarShapeSurgeryList extends RadioSelector { constructor() { + // TODO:@franklygeorge: if this is still used then it needs updating const items = [ ["normal ears", 1], ["small elfin ears", 2], diff --git a/src/js/statsChecker/statsChecker.js b/src/js/statsChecker/statsChecker.js index 7f3ebe834aa68b4f6c214811fcc4ebcabd280788..d3ce9b1c5f03ccdc36a7c8962e72d4f0c7366aec 100644 --- a/src/js/statsChecker/statsChecker.js +++ b/src/js/statsChecker/statsChecker.js @@ -763,13 +763,20 @@ globalThis.canSeePerfectly = function(slave) { /** * @param {FC.HumanState} slave - * @returns {boolean} + * @returns {boolean | null} returns null if the slave doesn't exist, otherwise returns a boolean */ globalThis.canHear = function(slave) { if (!slave) { return null; } - return ((slave.hears > -2) && (slave.earwear !== "deafening ear plugs")); + if (slave.earwear === "deafening ear plugs") { + return false; + } else if (slave.earShape === "none" && (slave.earT === "none" || slave.earImplant === 0)) { + return false; + } else if (slave.hears === -2) { + return false; + } + return true; }; /** diff --git a/src/npc/descriptions/ears.js b/src/npc/descriptions/ears.js index 8d02f128a6df518a619c82eeafe9345cad1e4fef..121e70e22169111a12b3111468720757da9742ea 100644 --- a/src/npc/descriptions/ears.js +++ b/src/npc/descriptions/ears.js @@ -9,16 +9,24 @@ App.Desc.ears = function(slave) { } = getPronouns(slave); // ear shape description here if (slave.earShape === "none") { - if (slave.earImplant === 1) { - if (slave.earT !== "none" && slave.race === "catgirl") { - r.push(`${He} has smooth fur where a normal human's ears would be, as ${he} instead hears out of ${his} twitchy, sensitive cat ears.`); - } else if (slave.earT !== "none" && slave.race !== "catgirl") { - r.push(`${He} has smooth skin where ${his} ears should be as ${his} hearing has been cybernetically rerouted to ${his} secondary ears.`); + if (slave.earT === "none") { + // no ears at all + if (slave.earImplant === 1) { + // but can still hear + r.push(`${He} has nothing but small, perforated metal disks where ${his} ears should be.`); } else { + // smooth egg head + r.push(`${He} has smooth skin where ${his} ears should be.`); + } + } + // top ears are described below + } else if (slave.earShape === "holes") { + if (slave.earwear === "none") { + if (slave.earImplant === 1) { r.push(`${He} has nothing but small, perforated metal disks where ${his} ears should be.`); + } else { + r.push(`${He} has small unsightly holes on the sides of ${his} head.`); // That can't be sanitary. } - } else if (slave.earwear === "none") { - r.push(`${He} has small unsightly holes on the sides of ${his} head.`); // That can't be sanitary. } else { r.push(`The sides of ${his} head are smooth where ${his} ears should be, but upon closer inspection it is revealed that`); if (slave.earwear === "hearing aids") { @@ -285,7 +293,14 @@ App.Desc.ears = function(slave) { } else { r.push(`a pair`); } - r.push(`of non-functioning ears grafted to the top of ${his} head.`); + if (slave.earImplant === 1) { + r.push(`of functioning ears grafted to the top of ${his} head.`); + } else { + r.push(`of non-functional ears grafted to the top of ${his} head.`); + } + } else if (slave.earT !== "none") { + r.push(`On top of ${his} head ${he} has a pair of ${slave.earT} ears.`); + console.error(`Slave top ear "${slave.earT}" not handled in "src/npc/descriptions/ears.js"`); } if (slave.hears < 0) { @@ -294,7 +309,7 @@ App.Desc.ears = function(slave) { } else if (slave.hears < -1) { r.push(`${He} is completely deaf,`); } - if (slave.hears < -1 && slave.earShape === "none") { + if (slave.hears < -1 && slave.earShape === "none" && slave.earT === "none") { r.push(`which is fitting due to ${his} lack of ears.`); } else { r.push(`but this isn't obvious just by looking at ${his} ears.`); diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index 8274f9562402720389848edb7507b7c94c2e1ed6..423814f604c1605d3c2eb300756080a05eb4d01e 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -1101,7 +1101,8 @@ App.StartingGirls.upper = function(slave, cheat = false) { options.addOption("Ear shape", "earShape", slave) .addValueList([ ["Normal", "normal"], - ["None", "none"], + ["Holes", "holes"], + ["None/Smooth", "none"], ["Damaged", "damaged"], ["Pointy", "pointy"], ["Elven", "elven"],