From c38910114c8dbc7b673fe3e8ba791784e443e87f Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Thu, 5 Dec 2019 20:21:43 +0100 Subject: [PATCH] add hasAny/BothCyberneticEyes() --- src/js/statsChecker/eyeChecker.js | 20 ++++++++++++++++++++ src/pregmod/rePregInventor.tw | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/js/statsChecker/eyeChecker.js b/src/js/statsChecker/eyeChecker.js index b85521a6cef..fd3501d681c 100644 --- a/src/js/statsChecker/eyeChecker.js +++ b/src/js/statsChecker/eyeChecker.js @@ -28,6 +28,16 @@ window.hasAnyProstheticEyes = function(slave) { return getLeftEyeType(slave) > 1 || getRightEyeType(slave) > 1; }; +/** + * True if slave has at least one eye that is cybernetic + * + * @param {App.Entity.SlaveState} slave + * @returns {boolean} + */ +window.hasAnyCyberneticEyes = function(slave) { + return getLeftEyeType(slave) === 3 || getRightEyeType(slave) === 3; +}; + /** * True if slave has both eyes * @@ -58,6 +68,16 @@ window.hasBothProstheticEyes = function(slave) { return getLeftEyeType(slave) > 1 && getRightEyeType(slave) > 1; }; +/** + * True if slave has both eyes and they are cybernetic + * + * @param {App.Entity.SlaveState} slave + * @returns {boolean} + */ +window.hasBothCyberneticEyes = function(slave) { + return getLeftEyeType(slave) === 3 && getRightEyeType(slave) === 3; +}; + /** * True if slave has left eye * diff --git a/src/pregmod/rePregInventor.tw b/src/pregmod/rePregInventor.tw index 4db4592f651..199ccd6a621 100644 --- a/src/pregmod/rePregInventor.tw +++ b/src/pregmod/rePregInventor.tw @@ -121,7 +121,7 @@ <</if>> <</if>> <br><br> - <<if hasAnyProstheticEyes($activeSlave)>> + <<if hasAnyCyberneticEyes($activeSlave)>> $His pretty <<print App.Desc.eyesColor($activeSlave, "bionic")>> flash a shade cooler than normal and you can tell $he's struggling to accept your decision. <<else>> You can see tears brimming in $his <<print App.Desc.eyesColor($activeSlave)>>. @@ -697,7 +697,7 @@ <</if>> <br><br> Your arousal gives you an idea, and you push back on your hyperbroodmother's colossal belly. $He steps away from you until $he is in the center of the pool, a look of confusion on $his face. You take control of the remote and then manipulate the reticulating frame supporting the pool such that it lifts the floor, slowly rendering both you and your colossal-bellied breeder knee deep in the warm gel. You hunker down into an aggressive, combative stance and - <<if hasAnyProstheticEyes($activeSlave)>> + <<if hasAnyCyberneticEyes($activeSlave)>> $his <<print App.Desc.eyesColor($activeSlave, "synthetic")>> flash white for a moment as a look of understanding dawns on $his face. <<else>> a look of understanding lights up in $his <<print App.Desc.eyesColor($activeSlave)>>. -- GitLab