Skip to content
Snippets Groups Projects
Commit fb2c7eda authored by pregmodfan's avatar pregmodfan
Browse files

fixed backward compatibility call for genetic (wombJS side only)

parent 9b06860a
No related branches found
No related tags found
No related merge requests found
......@@ -29,12 +29,6 @@ $slave.bellyPreg = WombGetWolume($slave) - return double, with current womb volu
//Init womb system.
window.WombInit = function(actor) {
if (typeof actor != "object")
{
console.log("WombInit - actor is not object!");
return;
}
if (!Array.isArray(actor.womb)) {
//alert("creating new womb"); //debugging
actor.womb = [];
......@@ -53,10 +47,11 @@ window.WombInit = function(actor) {
//backward compatibility setup. Fully accurate for normal pregnancy only.
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, actor.pregSource, i+1);
}
var i=0
actor.womb.forEach(function(ft){
ft.genetics = generateGenetics(actor.ID, actor.pregSource, i);
i++;
});
} 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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment