diff --git a/src/js/salon.js b/src/js/salon.js index 51256ca708d52b5c2ef0ac33218b68e94bf3736c..0da2d8ba27a3fb1752a027bd5c6206ab6e259357 100644 --- a/src/js/salon.js +++ b/src/js/salon.js @@ -335,6 +335,7 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo frag.append(wigDye()); } frag.append(wigLength()); + frag.append(wigStyle()); } return jQuery("#salonHair").empty().append(frag); @@ -616,53 +617,26 @@ App.Medicine.Salon.hair = function(slave, {primaryHairColor = 0, secondaryHairCo return frag; } - function hairStyle() { - const frag = new DocumentFragment(); - let p; - let div; - let span; + function wigStyle() { + let div = document.createElement("div"); + div.classList.add("choices"); let method; div = document.createElement("div"); - if (slave.hStyle !== "shaved") { - div.append(`${His} ${slave.hStyle} hair is ${lengthToEitherUnit(slave.hLength)} long. `); - } else { - div.append(`${His} hair is shaved smooth. `); - } - App.UI.DOM.appendNewElement("span", div, `General hairstyles will conform to hair length and clothing choices.`, "note"); - frag.append(div); - - // Normal styles - div = document.createElement("div"); div.classList.add("choices"); - method = (newVal) => { - slave.hStyle = newVal.value; - cashX(forceNeg(V.modCost), "slaveMod", slave); - apply(); - }; - if (slave.hLength > 1) { - div.append(`Style ${his} hair:`); - div.append(createList(App.Medicine.Modification.hairStyles.Normal, method)); + if (slave.hStyle === "bald") { + div.append(`Give ${him} a wig: `); } else { - App.UI.DOM.appendNewElement("span", div, `${His} hair is too short to style meaningfully`, "note"); + div.append(`Set wig style: `); } - frag.append(div); - // Short styles, includes cutting - div = document.createElement("div"); - div.classList.add("choices"); method = (newVal) => { slave.hStyle = newVal.value; - slave.hLength = newVal.hLength; cashX(forceNeg(V.modCost), "slaveMod", slave); apply(); }; - if (slave.hLength > 1) { - div.append(`Cut and style ${his} hair:`); - div.append(createList(App.Medicine.Modification.hairStyles.Cut, method)); - } - frag.append(div); + div.append(createList(App.Medicine.Modification.hairStyles.Normal, method)); - return frag; + return div; } function createList(array, method) {