diff --git a/devNotes/VersionChangeLog-Premod+LoliMod.txt b/devNotes/VersionChangeLog-Premod+LoliMod.txt index b141fc4fc44a6d931ae03aaf0e0ffc012ebd09a0..0328e4f4fdea745167cad591b43fb7a96f12399f 100644 --- a/devNotes/VersionChangeLog-Premod+LoliMod.txt +++ b/devNotes/VersionChangeLog-Premod+LoliMod.txt @@ -5,6 +5,7 @@ 0 -dispensary broken down into pharm fabricator, organ farm, implant manufactory and gene lab -lots of SF work + -better naming support in childgen -fixes -cleaning diff --git a/devNotes/twine JS.txt b/devNotes/twine JS.txt index 988255a90a02d6a52dc85bcca8e01ffe54784914..d029f7a824e18ae40890692f7265a4ffe14a3524 100644 --- a/devNotes/twine JS.txt +++ b/devNotes/twine JS.txt @@ -10651,7 +10651,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } else { child.genes = "XY"; @@ -10694,7 +10741,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } @@ -10795,7 +10889,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } else { GenerateNewSlave("XY"); @@ -10839,7 +10980,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index 6e6c685f269481b9de1f3568f8ffec6a627e4058..cea018b552a71fb7c9d154237f82fb6e73c191b5 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with thi <<set $returnTo = "init", $nextButton = "Continue", $nextLink = "Alpha disclaimer">> <<unset $releaseID>> -<<set $ver = "0.10.7", $pmodVer = "1.3.X", $releaseID = 1036>> -<<if ndef $pmodVer>><<set $pmodVer = "1.3.X">><</if>> +<<set $ver = "0.10.7", $pmodVer = "1.4.X", $releaseID = 1037>> +<<if ndef $pmodVer>><<set $pmodVer = "1.4.X">><</if>> /* This needs to be broken down into individual files that can be added to StoryInit instead. */ @@ -1009,6 +1009,7 @@ DairyRestraintsSetting($dairyRestraintsSetting) <<set $prostheticsUpgrade = 0>> <<set $geneticMappingUpgrade = 0>> <<set $pregnancyMonitoringUpgrade = 0>> +<<set $cloningSystem = 0>> <<set $surgeryUpgrade = 0>> diff --git a/src/js/generateGenetics.tw b/src/js/generateGenetics.tw index 87987638965a41da15fdd0d97fd67cd9fba03392..7de1243a7b0049d50d69f4a2ea2141229a78a6a5 100644 --- a/src/js/generateGenetics.tw +++ b/src/js/generateGenetics.tw @@ -574,7 +574,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } else { child.genes = "XY"; @@ -617,7 +664,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } @@ -718,7 +812,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } else { GenerateNewSlave("XY"); @@ -762,7 +903,54 @@ window.generateChild = function(mother, ova, destination) { } } } else { - child.slaveName = genes.name; + let childName = genes.name; + if (childName.indexOf("ovum") == 0) { + if (genes.mother == -1) { + if (genes.father <= 0) { + child.slaveName = "Your son"; + } else { + child.slaveName = `Your and ${genes.fatherName}'s son`; + } + } else { + if (genes.father == -1) { + child.slaveName = `${genes.motherName} and your son`; + } else if (genes.father > 0) { + child.slaveName = `${genes.motherName} and ${genes.fatherName}'s son`; + } else { + child.slaveName = `${genes.motherName}'s bastard son`; + } + } + } else { + child.slaveName = genes.name; + } + if (genes.mother == -1) { + child.slaveSurname = V.PC.surname; + } else { + if (genes.father == -1) { + child.slaveSurname = V.PC.surname; + } else if (genes.father > 0) { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } else { + let currentFather = getSlave(genes.father); + if (currentFather !== undefined) { + if (currentFather.slaveSurname !== 0 && currentFather.slaveSurname !== "") { + child.slaveSurname = currentFather.slaveSurname; + } + } + } + } else { + let currentMother = getSlave(genes.mother); + if (currentMother !== undefined) { + if (currentMother.slaveSurname !== 0 && currentMother.slaveSurname !== "") { + child.slaveSurname = currentMother.slaveSurname; + } + } + } + } } } diff --git a/src/pregmod/incubator.tw b/src/pregmod/incubator.tw index bc9fa5881f2f1710191fb24009f8d86ff6e13551..89f29527b3bf2888f4706a11105a562bcd773f46 100644 --- a/src/pregmod/incubator.tw +++ b/src/pregmod/incubator.tw @@ -444,7 +444,7 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu Reproduction management systems are offline; $he will undergo normal puberty. <</if>> <</if>> - <br>Rename $him: <<textbox "_tempName" _tempName >> [[Apply |incubator][$tanks[$i].slaveName = _tempName]] // Given name only // + <br>Rename $him: <<textbox "_tempName" _tempName >> [[Apply |Incubator][$tanks[$i].slaveName = _tempName]] // Given name only // <<if $cheatMode == 1>> <br>''Cheatmode:'' <<link "Retrieve immediately">> diff --git a/src/uncategorized/BackwardsCompatibility.tw b/src/uncategorized/BackwardsCompatibility.tw index 189727476338f20d03ff5061def98ac179c4edd3..2978c7481269e4553e54bc921dbaaff7cd06e8e8 100644 --- a/src/uncategorized/BackwardsCompatibility.tw +++ b/src/uncategorized/BackwardsCompatibility.tw @@ -2264,6 +2264,9 @@ Setting missing global variables: <<if ndef $animalMpreg>> <<set $animalMpreg = 0>> <</if>> +<<if ndef $cloningSystem>> + <<set $cloningSystem = 0>> +<</if>> <<if ndef $pregInventor>> <<set $pregInventor = 0>>