diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 23cb9c1fca72077e53238b754f5b2735ec34ee48..122b1f1083b51a261b1a746db959357206d18dda 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -11034,19 +11034,24 @@ window.WombInit = function(actor) { } }; -window.WombImpregnate = function(actor, fCount, fatherID, age) { +window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) { var i; var tf; for (i=0; i<fCount; i++) { tf = {}; //new Object tf.age = age; //initial age - tf.motherID = actor.ID; //Initial biological mother ID setup. tf.fatherID = fatherID; //We can store who is father too. tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. tf.splitted = 0; //marker for already splitted fetus. - tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. + if (surrogate) { + tf.motherID = surrogate.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(surrogate, fatherID, i+1); //Stored genetic information. + } else { + tf.motherID = actor.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. + } tf.ID = generateNewID(); try { @@ -11066,33 +11071,7 @@ window.WombImpregnate = function(actor, fCount, fatherID, age) { }; window.WombSurrogate = function(actor, fCount, mother, fatherID, age) { - var i; - var tf; - for (i=0; i<fCount; i++) { - tf = {}; //new Object - tf.age = age; //initial age - tf.motherID = mother.ID; //Initial biological mother ID setup. - tf.fatherID = fatherID; //We can store who is father too. - tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. - tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. - tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. - tf.splitted = 0; //marker for already splitted fetus. - tf.genetics = generateGenetics(mother, fatherID, i+1); //Stored genetic information. - - try { - if (actor.womb.length == 0) { - actor.pregWeek = age; - actor.preg = age; - } - actor.womb.push(tf); - } catch(err){ - WombInit(actor); - actor.womb.push(tf); - alert("WombImpregnate warning - " + actor.slaveName+" "+err); - } - - } - MissingParentIDCorrection(actor); + WombImpregnate(actor, fCount, fatherID, age, mother); }; window.WombProgress = function(actor, ageToAdd) { diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index 8f89c3159425307ab3c5ef62ce3179171e52080d..108bcdb2b310085a92650ad2b18e3e99938d8c0d 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -80,19 +80,24 @@ window.WombInit = function(actor) { } }; -window.WombImpregnate = function(actor, fCount, fatherID, age) { +window.WombImpregnate = function(actor, fCount, fatherID, age, surrogate) { var i; var tf; for (i=0; i<fCount; i++) { tf = {}; //new Object tf.age = age; //initial age - tf.motherID = actor.ID; //Initial biological mother ID setup. tf.fatherID = fatherID; //We can store who is father too. tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. tf.splitted = 0; //marker for already splitted fetus. - tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. + if (surrogate) { + tf.motherID = surrogate.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(surrogate, fatherID, i+1); //Stored genetic information. + } else { + tf.motherID = actor.ID; //Initial biological mother ID setup. + tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. + } tf.ID = generateNewID(); try { @@ -112,33 +117,7 @@ window.WombImpregnate = function(actor, fCount, fatherID, age) { }; window.WombSurrogate = function(actor, fCount, mother, fatherID, age) { - var i; - var tf; - for (i=0; i<fCount; i++) { - tf = {}; //new Object - tf.age = age; //initial age - tf.motherID = mother.ID; //Initial biological mother ID setup. - tf.fatherID = fatherID; //We can store who is father too. - tf.volume = 1; //Initial, to create property. Updated with actual data after WombGetVolume call. - tf.reserve = ""; //Initial, to create property. Used later to mark if this child is to be kept. - tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. - tf.splitted = 0; //marker for already splitted fetus. - tf.genetics = generateGenetics(mother, fatherID, i+1); //Stored genetic information. - - try { - if (actor.womb.length == 0) { - actor.pregWeek = age; - actor.preg = age; - } - actor.womb.push(tf); - } catch(err){ - WombInit(actor); - actor.womb.push(tf); - alert("WombImpregnate warning - " + actor.slaveName+" "+err); - } - - } - MissingParentIDCorrection(actor); + WombImpregnate(actor, fCount, fatherID, age, mother); }; window.WombProgress = function(actor, ageToAdd) { diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 69a147fd5a7779de8c9bca1366b466ffb15f78b9..9d50eb673d1dfa9f3b99312177dce0bd03849f30 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -3730,10 +3730,6 @@ Done! <</if>> <</for>> -<<if $releaseID < 1032>> - <<set $releaseID = 1032>> -<</if>> - <<if ndef $postSexCleanUp>> <<set $postSexCleanUp = 1>> <</if>> @@ -3754,5 +3750,9 @@ Done! <<set $abbreviateHormoneBalance = 2>> <</if>> +<<if $releaseID < 1036>> + <<set $releaseID = 1036>> +<</if>> + /* reset NaNArray afterward BC is run */ <<set $NaNArray = findNaN()>>