Skip to content
Snippets Groups Projects
Commit 0ddcbdfe authored by Pregmodder's avatar Pregmodder
Browse files

Merge remote-tracking branch 'upstream/pregmod-newcontent1_0' into pregmod-master

parents 5cee8347 9feb453c
No related branches found
No related tags found
No related merge requests found
...@@ -983,3 +983,16 @@ window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) { ...@@ -983,3 +983,16 @@ window.SoftenSexualFlaw = function SoftenSexualFlaw(slave) {
} }
slave.sexualFlaw = "none"; slave.sexualFlaw = "none";
}; };
window.genUUID = function() {
var d = new Date().getTime();
if(Date.now){
d = Date.now(); //high-precision timer
}
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
};
...@@ -87,6 +87,7 @@ window.WombImpregnate = function(actor, fCount, fatherID, age) { ...@@ -87,6 +87,7 @@ window.WombImpregnate = function(actor, fCount, fatherID, age) {
tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call. tf.identical = 0; //Initial, to create property. Updated with actual data during fetalSplit call.
tf.splitted = 0; //marker for already splitted fetus. tf.splitted = 0; //marker for already splitted fetus.
tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information. tf.genetics = generateGenetics(actor, fatherID, i+1); //Stored genetic information.
tf.ID = genUUID();
try { try {
if (actor.womb.length == 0) { if (actor.womb.length == 0) {
...@@ -359,7 +360,14 @@ window.fetalSplit = function(actor, chance) { ...@@ -359,7 +360,14 @@ window.fetalSplit = function(actor, chance) {
s.splitted = 1; //this is marker that this is already splitted fetus (to not split second time in loop), only source fetus needed it. s.splitted = 1; //this is marker that this is already splitted fetus (to not split second time in loop), only source fetus needed it.
nft.identical = 1; //this is marker that this fetus has at least one twin. nft.identical = 1; //this is marker that this fetus has at least one twin.
s.identical = 1; //this is marker that this fetus has at least one twin. s.identical = 1; //this is marker that this fetus has at least one twin.
actor.womb.push(nft);
if (s.twinID == "" || s.twinID == undefined)
s.twinID = genUUID();
nft.twinID = s.twinID;
actor.womb.push(nft);
} }
}); });
WombNormalizePreg(actor); WombNormalizePreg(actor);
...@@ -603,6 +611,10 @@ window.BCReserveInit = function() ...@@ -603,6 +611,10 @@ window.BCReserveInit = function()
ft.reserve = ""; ft.reserve = "";
if (typeof ft.motherID != 'number') //setting missing biological mother ID for fetus. if (typeof ft.motherID != 'number') //setting missing biological mother ID for fetus.
ft.motherID = slave.ID; ft.motherID = slave.ID;
if (ft.ID == undefined)
ft.ID = genUUID();
try { try {
if (slave.reservedChildren > 0) if (slave.reservedChildren > 0)
WombSetGenericReserve(slave, "incubator", reservedChildren); WombSetGenericReserve(slave, "incubator", reservedChildren);
......
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