From f11ae5c80c832e6bbb3b2f056d41f4efec15b0a2 Mon Sep 17 00:00:00 2001 From: Arkerthan <arkerthan@gmail.com> Date: Sat, 21 Dec 2019 13:51:45 +0100 Subject: [PATCH] fix albinismOverride hero slaves --- src/js/heroCreator.js | 6 ++++++ src/js/statsChecker/eyeChecker.js | 2 +- src/npc/databases/customSlavesDatabase.tw | 4 ++++ src/npc/databases/dSlavesDatabase.tw | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/js/heroCreator.js b/src/js/heroCreator.js index cfc178de66e..2f78670c4df 100644 --- a/src/js/heroCreator.js +++ b/src/js/heroCreator.js @@ -43,7 +43,13 @@ App.Utils.getHeroSlave = function(heroSlave, baseHeroSlave) { } const newSlave = clone(baseHeroSlave); + let albinismOverride = null + if (heroSlave.albinismOverride !== null) { + albinismOverride = heroSlave.albinismOverride; + delete heroSlave.albinismOverride; + } deepAssign(newSlave, heroSlave); + newSlave.albinismOverride = albinismOverride; repairLimbs(newSlave); generatePuberty(newSlave); return newSlave; diff --git a/src/js/statsChecker/eyeChecker.js b/src/js/statsChecker/eyeChecker.js index 058e3c10169..a98ddd2201a 100644 --- a/src/js/statsChecker/eyeChecker.js +++ b/src/js/statsChecker/eyeChecker.js @@ -242,7 +242,7 @@ window.getGeneticEyeColor = function(slave, side) { if (side !== "left" && side !== "right") { return "ERROR:" + side; } if (slave.geneticQuirks.albinism === 2) { - return "red"; + return slave.albinismOverride.eyeColor; } else { if (side === "left" && typeof slave.geneticQuirks.heterochromia === "string") { return slave.geneticQuirks.heterochromia; diff --git a/src/npc/databases/customSlavesDatabase.tw b/src/npc/databases/customSlavesDatabase.tw index 099827349cf..afa77f6c1a3 100644 --- a/src/npc/databases/customSlavesDatabase.tw +++ b/src/npc/databases/customSlavesDatabase.tw @@ -1,3 +1,7 @@ :: custom Slaves Database <<set _i = 1000000>> + +<<set _HS = App.Entity.SlaveState.makeSkeleton()>> +<<set _HS.slaveName = "Snowball", _HS.slaveSurname = 0, _HS.ID = _i++, _HS.health = 100, _HS.trust = 30, _HS.devotion = 10, _HS.weight = 20, _HS.muscles = -50, _HS.height = 138, _HS.nationality = "Chinese", _HS.race = "asian", _HS.hLength = 150, _HS.hStyle = "luxurious", _HS.pubicHStyle = "hairless", _HS.waist = 10, _HS.voice = 3, _HS.accent = 3, _HS.shoulders = -2, _HS.boobs = 400, _HS.boobShape = "perky", _HS.nipples = "partially inverted", _HS.hips = 1, _HS.butt = 3, _HS.face = 100, _HS.faceShape = "cute", _HS.ovaries = 1, _HS.makeup = 2, _HS.nails = 2, _HS.intelligence = 30, _HS.behavioralQuirk = "insecure", _HS.sexualFlaw = "idealistic", _HS.geneticQuirks = {albinism: 2}, _HS.albinismOverride = {eyeColor: "red", hColor: "white", skin: "pure white"}>> +<<set $heroSlaves.push(_HS)>> diff --git a/src/npc/databases/dSlavesDatabase.tw b/src/npc/databases/dSlavesDatabase.tw index 170d82a3094..476815c0ca3 100644 --- a/src/npc/databases/dSlavesDatabase.tw +++ b/src/npc/databases/dSlavesDatabase.tw @@ -497,7 +497,7 @@ <<set $heroSlaves.push(_HS)>> <<set _HS = App.Entity.SlaveState.makeSkeleton()>> -<<set _HS.slaveName = "'Virago' Kissa", _HS.birthName = "", _HS.birthSurname = "", _HS.origin = "In spite of the great demand for $his kind, $he has apparently eluded enslavement until recently.", _HS.career = "a wanderer", _HS.ID = _i++, _HS.prestige = 1, _HS.prestigeDesc = "$He is a natural albino.", _HS.birthWeek = random(0,51), _HS.health = 100, _HS.devotion = 100, _HS.muscles = 50, _HS.height = 190, _HS.nationality = "Ugandan", _HS.race = "black", _HS.eye.origColor = "pale grey", _HS.origHColor = "white", _HS.pubicHColor = "white", _HS.origSkin = "extremely pale", _HS.hLength = 100, _HS.hStyle = "extremely long and bushy", _HS.pubicHStyle = "bushy", _HS.waist = -55, _HS.boobs = 600, _HS.face = 55, _HS.lips = 35, _HS.vaginaLube = 1, _HS.clitPiercing = 3, _HS.clitSetting = "oral", _HS.ovaries = 1, _HS.anusTat = "bleached", _HS.skill.oral = 100, _HS.skill.whoring =100, _HS.skill.entertainment = 100, _HS.skill.combat = 3, _HS.rules.living = "luxurious", _HS.rules.speech = "permissive", _HS.rules.release = "permissive", _HS.collar = "pretty jewelry", _HS.shoes = "flats", _HS.intelligence = 100, _HS.intelligenceImplant = 30, _HS.attrXY = 40, _HS.fetish = "cumslut", _HS.fetishKnown = 1, _HS.behavioralFlaw = "odd", _HS.geneticQuirks = {albinism: 2}, _HS.custom.tattoo = "$His entire body is tattooed with a detailed map of $his arteries which, combined with $his albinism, gives $him a quasi-translucent quality.", _HS.custom.desc = "$His eyes are unsettling; though $his irises are a pale grey color, in some lights the whole eye takes on a red cast.">> +<<set _HS.slaveName = "'Virago' Kissa", _HS.birthName = "", _HS.birthSurname = "", _HS.origin = "In spite of the great demand for $his kind, $he has apparently eluded enslavement until recently.", _HS.career = "a wanderer", _HS.ID = _i++, _HS.prestige = 1, _HS.prestigeDesc = "$He is a natural albino.", _HS.birthWeek = random(0,51), _HS.health = 100, _HS.devotion = 100, _HS.muscles = 50, _HS.height = 190, _HS.nationality = "Ugandan", _HS.race = "black", _HS.hLength = 100, _HS.hStyle = "extremely long and bushy", _HS.pubicHStyle = "bushy", _HS.waist = -55, _HS.boobs = 600, _HS.face = 55, _HS.lips = 35, _HS.vaginaLube = 1, _HS.clitPiercing = 3, _HS.clitSetting = "oral", _HS.ovaries = 1, _HS.anusTat = "bleached", _HS.skill.oral = 100, _HS.skill.whoring =100, _HS.skill.entertainment = 100, _HS.skill.combat = 3, _HS.rules.living = "luxurious", _HS.rules.speech = "permissive", _HS.rules.release = "permissive", _HS.collar = "pretty jewelry", _HS.shoes = "flats", _HS.intelligence = 100, _HS.intelligenceImplant = 30, _HS.attrXY = 40, _HS.fetish = "cumslut", _HS.fetishKnown = 1, _HS.behavioralFlaw = "odd", _HS.geneticQuirks = {albinism: 2}, _HS.albinismOverride = {eyeColor: "pale grey", hColor: "white", skin: "extremely pale"}, _HS.custom.tattoo = "$His entire body is tattooed with a detailed map of $his arteries which, combined with $his albinism, gives $him a quasi-translucent quality.", _HS.custom.desc = "$His eyes are unsettling; though $his irises are a pale grey color, in some lights the whole eye takes on a red cast.">> <<set $heroSlaves.push(_HS)>> <<set _HS = App.Entity.SlaveState.makeSkeleton()>> -- GitLab