diff --git a/src/002-config/fc-version.js b/src/002-config/fc-version.js index e4928d8c1b544482ab5376d681d4fab4ec7163bf..2a25d8dc5917bd3f618e24c201794d07512b9334 100644 --- a/src/002-config/fc-version.js +++ b/src/002-config/fc-version.js @@ -1,7 +1,7 @@ App.Version = { base: "0.10.7.1", // The vanilla version the mod is based off of, this should never be changed. pmod: "3.1.0", - release: 1058, + release: 1059, }; /* Use release as save version */ diff --git a/src/js/surgery.js b/src/js/surgery.js index c42c842fc874d732dd9019081e14ddd6c23175a0..5ab49f55679f6470566ed67840029560921b52b9 100644 --- a/src/js/surgery.js +++ b/src/js/surgery.js @@ -625,17 +625,17 @@ window.setEyeColorFull = function setEyeColorFull(slave, iris, pupil, sclera, si if (sclera !== "") { slave.eye[side].sclera = sclera; } -} +}; /** * Set genetic eye color * * @param {App.Entity.SlaveState} slave * @param {string} color - * @param {boolean} heterochroma + * @param {boolean} heterochromia */ -window.setGeneticEyeColor = function(slave, color, heterochroma = false) { - if (heterochroma) { +window.setGeneticEyeColor = function(slave, color, heterochromia = false) { + if (heterochromia) { slave.geneticQuirks.heterochromia = color; } else { slave.eye.origColor = color; diff --git a/src/pregmod/widgets/pregmodWidgets.tw b/src/pregmod/widgets/pregmodWidgets.tw index 250ad8fe4bbc4f7dc8aa4326e8649ab627ac0dd2..f0fe9104830ee1bc4bfd0376892d513ccb7076d7 100644 --- a/src/pregmod/widgets/pregmodWidgets.tw +++ b/src/pregmod/widgets/pregmodWidgets.tw @@ -596,6 +596,27 @@ <</if>> <</if>> +<<if $releaseID < 1059>> + <<set $args[0].eyes = new App.Entity.EyeState()>> + <<run setGeneticEyeColor($args[0], $args[0].origEye)>> + <<if $args[0].eyes === -4>> + <<run eyeSurgery($args[0], "both", "remove")>> + <<else>> + <<if $args[0].eyesImplant === 1>> + <<run eyeSurgery($args[0], "both", "cybernetic")>> + <</if>> + <<if $args[0].eyes === -3>><<run eyeSurgery($args[0], "both", "glass")>> + <<elseif $args[0].eyes === -2>><<run eyeSurgery($args[0], "both", "blind")>> + <<elseif $args[0].eyes === -1>><<run eyeSurgery($args[0], "both", "blur")>> + <</if>> + <<run setEyeColorFull($args[0], $args[0].eyeColor, $args[0].pupil, $args[0].sclerae, "both")>> + <<if typeof $args[0].slave.geneticQuirks.heterochromia === "string")>> + <<run setEyeColor($args[0].geneticQuirks.heterochromia, "left")>> + <</if>> + <</if>> + <<run delete $args[0].eyes, delete $args[0].eyesImplant, delete $args[0].eyeColor, delete $args[0].origEye, delete $args[0].pupil, delete $args[0].sclerae>> +<</if>> + <</widget>> <<widget "setLocalPronouns">> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 347f56a35c37871d76375b82a0e5fbf3a8912b25..3627a69f99461290413af3d2f4f8ead81cb0f4ce 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3363,50 +3363,52 @@ Setting missing slave variables: <</if>> <</if>> -<<if ndef _Slave.eyeColor>> - <<set _Slave.eyeColor = _Slave.eyes>> - <<set _Slave.eyes = 1>> +<<if $releaseID < 1059>> <<if ndef _Slave.eyeColor>> - <<set _Slave.eyeColor = "brown">> + <<set _Slave.eyeColor = _Slave.eyes>> + <<set _Slave.eyes = 1>> + <<if ndef _Slave.eyeColor>> + <<set _Slave.eyeColor = "brown">> + <</if>> <</if>> -<</if>> -<<if ndef _Slave.pupil>> - <<if _Slave.eyeColor == "catlike">> - <<set _Slave.pupil = "catlike">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "serpent-like">> - <<set _Slave.pupil = "serpent-like">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "devilish">> - <<set _Slave.pupil = "devilish">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "demonic">> - <<set _Slave.pupil = "demonic">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "hypnotic">> - <<set _Slave.pupil = "hypnotic">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "heart-shaped">> - <<set _Slave.pupil = "heart-shaped">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "wide-eyed">> - <<set _Slave.pupil = "wide-eyed">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "almond-shaped">> - <<set _Slave.pupil = "almond-shaped">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "bright">> - <<set _Slave.pupil = "bright">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "teary">> - <<set _Slave.pupil = "teary">> - <<set _Slave.eyeColor = "brown">> - <<elseif _Slave.eyeColor == "vacant">> - <<set _Slave.pupil = "vacant">> - <<set _Slave.eyeColor = "brown">> - <<else>> - <<set _Slave.pupil = "circular">> + <<if ndef _Slave.pupil>> + <<if _Slave.eyeColor == "catlike">> + <<set _Slave.pupil = "catlike">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "serpent-like">> + <<set _Slave.pupil = "serpent-like">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "devilish">> + <<set _Slave.pupil = "devilish">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "demonic">> + <<set _Slave.pupil = "demonic">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "hypnotic">> + <<set _Slave.pupil = "hypnotic">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "heart-shaped">> + <<set _Slave.pupil = "heart-shaped">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "wide-eyed">> + <<set _Slave.pupil = "wide-eyed">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "almond-shaped">> + <<set _Slave.pupil = "almond-shaped">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "bright">> + <<set _Slave.pupil = "bright">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "teary">> + <<set _Slave.pupil = "teary">> + <<set _Slave.eyeColor = "brown">> + <<elseif _Slave.eyeColor == "vacant">> + <<set _Slave.pupil = "vacant">> + <<set _Slave.eyeColor = "brown">> + <<else>> + <<set _Slave.pupil = "circular">> + <</if>> <</if>> <</if>> @@ -3757,8 +3759,10 @@ Setting missing slave variables: <<set _Slave.height = random(185,200)>> <</if>> -<<if _Slave.eyeColor == "no default value">> - <<set _Slave.eyeColor = _Slave.origEye>> +<<if $releaseID < 1059>> + <<if _Slave.eyeColor == "no default value">> + <<set _Slave.eyeColor = _Slave.origEye>> + <</if>> <</if>> <<if ndef _Slave.birthSurname>> @@ -3952,22 +3956,24 @@ Updating gene pool records: <</if>> <</if>> - <<if ndef _Slave.eyesImplant>> - <<set _Slave.eyesImplant = 0>> - <</if>> - <<if _Slave.origEye == "implant">> - <<set _Slave.eyesImplant = 1>> - <<set _oldEyes = $genePool.find(function(s) { return s.ID = _Slave.ID; })>> - <<set _Slave.origEye = _oldEyes.origEye>> - <</if>> - <<if _Slave.origEye == "none">> - <<set _Slave.eyes = -3>> - <<set _oldEyes = $genePool.find(function(s) { return s.ID = _Slave.ID; })>> - <<set _Slave.origEye = _oldEyes.origEye>> - <</if>> - <<if _Slave.eyeColor == "empty">> - <<set _Slave.eyeColor = _Slave.origEye>> - <<set _Slave.eyes = -4>> + <<if $releaseID < 1059>> + <<if ndef _Slave.eyesImplant>> + <<set _Slave.eyesImplant = 0>> + <</if>> + <<if _Slave.origEye == "implant">> + <<set _Slave.eyesImplant = 1>> + <<set _oldEyes = $genePool.find(function(s) { return s.ID = _Slave.ID; })>> + <<set _Slave.origEye = _oldEyes.origEye>> + <</if>> + <<if _Slave.origEye == "none">> + <<set _Slave.eyes = -3>> + <<set _oldEyes = $genePool.find(function(s) { return s.ID = _Slave.ID; })>> + <<set _Slave.origEye = _oldEyes.origEye>> + <</if>> + <<if _Slave.eyeColor == "empty">> + <<set _Slave.eyeColor = _Slave.origEye>> + <<set _Slave.eyes = -4>> + <</if>> <</if>> <<if ndef _Slave.custom>> <<set _Slave.custom = {}>> <</if>>