diff --git a/src/npc/startingGirls/startingGirls.js b/src/npc/startingGirls/startingGirls.js index 49ca6bc9339e1fa0dcea2123a65bf77b27576176..29b43a869910a83ab02bcf03fb550a8bde182c47 100644 --- a/src/npc/startingGirls/startingGirls.js +++ b/src/npc/startingGirls/startingGirls.js @@ -213,3 +213,63 @@ App.StartingGirls.uncommittedFamilyTree = function(slave) { let tSlaves = V.slaves.concat([slave]); // returns a new array renderFamilyTree(tSlaves, slave.ID); }; + +App.StartingGirls.career = function(slave) { + let el = new DocumentFragment(); + let text; + let pullDown; + + if (V.AgePenalty === 1) { + if (slave.actualAge < 16) { + text = "veryYoungCareers: "; + pullDown = render(setup.veryYoungCareers); + } else if (slave.actualAge <= 24) { + text = "youngCareers: "; + pullDown = render(setup.youngCareers); + } else if (slave.intelligenceImplant >= 15) { + text = "educatedCareers: "; + pullDown = render(setup.educatedCareers); + } else { + text = "uneducatedCareers: "; + pullDown = render(setup.uneducatedCareers); + } + } else { + if (slave.actualAge < 16) { + text = "veryYoungCareers: "; + pullDown = render(setup.veryYoungCareers); + } else if (slave.intelligenceImplant >= 15) { + text = "educatedCareers: "; + pullDown = render(setup.educatedCareers); + } else if (slave.actualAge <= 24) { + text = "youngCareers: "; + pullDown = render(setup.youngCareers); + } else { + text = "uneducatedCareers: "; + pullDown = render(setup.uneducatedCareers); + } + } + pullDown.ID = "pullDown"; + function render(options) { + let select = document.createElement("SELECT"); + select.classList.add("rajs-list"); + + + for(let i = 0; i < options.length; i++) { + let opt = options[i]; + let el = document.createElement("option"); + el.textContent = capFirstChar(opt); + el.value = opt; + select.appendChild(el); + } + select.onchange = () => { + let x = document.getElementById("pullDown"); + console.log(x); + slave.career = x.value; + }; + + return select; + } + el.append(text); + el.append(pullDown); + return el; +}; diff --git a/src/npc/startingGirls/startingGirls.tw b/src/npc/startingGirls/startingGirls.tw index 0223876a610a6bd247c5c2f1e8eae1d8786470a7..cd273ebb0b43977f608aebb455257d4b7e55ef12 100644 --- a/src/npc/startingGirls/startingGirls.tw +++ b/src/npc/startingGirls/startingGirls.tw @@ -1062,6 +1062,9 @@ <br>''Birth surname:'' <<textbox "$activeSlave.birthSurname" $activeSlave.birthSurname "Starting Girls">> | ''Slave surname:'' <<textbox "$activeSlave.slaveSurname" $activeSlave.slaveSurname "Starting Girls">> <br>''Career:'' <<textbox "$activeSlave.career" $activeSlave.career "Starting Girls">> + <div id="careers"></span> + <script>jQuery('#careers').empty().append(App.StartingGirls.career(V.activeSlave));</script> + <br>''Hair color:'' <<textbox "$activeSlave.origHColor" $activeSlave.origHColor "Starting Girls">> //This will also set eyebrow, pubic, and underarm hair color.// <br>''Hair Style:'' <<textbox "$activeSlave.hStyle" $activeSlave.hStyle "Starting Girls">> <br>''Hair Length:'' <<textbox "$activeSlave.hLength" $activeSlave.hLength "Starting Girls">>