Skip to content
Snippets Groups Projects
Commit c2d46125 authored by Anony's avatar Anony
Browse files

Fix code for incubator organs

parent bb379450
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,14 @@ App.Medicine.OrganFarm.growOrgan = function(slave, organType) {
cashX(-organ.cost, "slaveSurgery", slave);
};
App.Medicine.OrganFarm.growIncubatorOrgan = function(slave, organType) {
const organ = App.Medicine.OrganFarm.Organs[organType];
V.incubatorOrgans.push({type: organType, weeksToCompletion: organ.time, ID: slave.ID});
cashX(-organ.cost, "slaveSurgery", slave);
};
/**
* @param {App.Entity.SlaveState} slave
* @returns {string}
......
......@@ -523,34 +523,34 @@ Target age for release: <<textbox "$targetAge" $targetAge "Incubator">> [[Minimu
<br>
<<if $tanks[$i].ovaries == 0 && $tankOrgans.ovaries != 1>>
<<link "Prepare ovaries">>
<<run App.Medicine.OrganFarm.growOrgan($tanks[$i], "ovaries">>
<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "ovaries")>>
<<goto "Incubator">>
<</link>>
<</if>>
<<if $tanks[$i].dick == 0 && $tankOrgans.penis != 1>>
<<link "Prepare penis">>
<<run App.Medicine.OrganFarm.growOrgan($tanks[$i], "penis">>
<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "penis")>>
<<goto "Incubator">>
<</link>>
<</if>>
<<if $tanks[$i].balls == 0 && $tankOrgans.testicles != 1>>
|
<<link "Prepare testicles">>
<<run App.Medicine.OrganFarm.growOrgan($tanks[$i], "testicles">>
<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "testicles")>>
<<goto "Incubator">>
<</link>>
<</if>>
<<if getBestVision($tanks[$i]) === 0 && $tankOrgans.eyes != 1>>
<br>$He appears to be blind:
<<link "Prepare eyes">>
<<run App.Medicine.OrganFarm.growOrgan($tanks[$i], "rightEye"), App.Medicine.OrganFarm.growOrgan($tanks[$i], "leftEye")>>
<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "rightEye"), App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "leftEye")>>
<<goto "Incubator">>
<</link>>
<</if>>
<<if $tanks[$i].voice == 0 && $tankOrgans.voicebox != 1>>
<br>$He appears to be mute:
<<link "Prepare vocal cords">>
<<run App.Medicine.OrganFarm.growOrgan($tanks[$i], "voicebox">>
<<run App.Medicine.OrganFarm.growIncubatorOrgan($tanks[$i], "voicebox")>>
<<goto "Incubator">>
<</link>>
<</if>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment