diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 4c0c6bd21affdb52af6b0fd994b660552961a0f4..911e0a973e5d6fb81985647b38403705f22d7805 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -10458,7 +10458,12 @@ window.WombInit = function(actor) { } //backward compatibility setup. Fully accurate for normal pregnancy only. - if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) { + if (actor.womb.length > 0 && actor.broodmother == 0 && actor.womb[0].genetics == undefined) { + var i; + for (i=0; i<actor.womb.length; i++) { + ft.genetics = generateGenetics(actor.ID, ft.fatherID, i+1); + } + } else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) { WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg); } else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) { //sorry but for already present broodmothers it's impossible to calculate fully, aproximation used. diff --git a/src/js/wombJS.tw b/src/js/wombJS.tw index eac3bdf8d3b80eeca0b99dd8dca7fb2bdd63c61e..ed7437f55f1e2672c7fe553885f86689b2ab0e0e 100644 --- a/src/js/wombJS.tw +++ b/src/js/wombJS.tw @@ -45,7 +45,12 @@ window.WombInit = function(actor) { } //backward compatibility setup. Fully accurate for normal pregnancy only. - if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) { + if (actor.womb.length > 0 && actor.broodmother == 0 && actor.womb[0].genetics == undefined) { + var i; + for (i=0; i<actor.womb.length; i++) { + ft.genetics = generateGenetics(actor.ID, ft.fatherID, i+1); + } + } else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother == 0) { WombImpregnate(actor, actor.pregType, actor.pregSource, actor.preg); } else if (actor.womb.length == 0 && actor.pregType != 0 && actor.broodmother > 0 && actor.broodmotherOnHold < 1) { //sorry but for already present broodmothers it's impossible to calculate fully, aproximation used.