From a32466c5f85ecea2323dd614bd5ea14e778c8f6b Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Sat, 26 Dec 2020 18:18:19 -0500 Subject: [PATCH] Start toy shop --- js/003-data/gameVariableData.js | 1 + js/003-data/slaveWearData.js | 5 +- src/005-passages/facilitiesPassages.js | 9 ++ src/facilities/toyShop/toyShop.js | 112 +++++++++++++++++++++++++ src/gui/quicklinks.js | 2 + src/uncategorized/managePenthouse.tw | 9 ++ 6 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 src/facilities/toyShop/toyShop.js diff --git a/js/003-data/gameVariableData.js b/js/003-data/gameVariableData.js index b859b9718de..7b45451a8bb 100644 --- a/js/003-data/gameVariableData.js +++ b/js/003-data/gameVariableData.js @@ -1000,6 +1000,7 @@ App.Data.resetOnNGPlus = { animalTesticles: 0, /* {pigTestes: 0, dogTestes: 0, horseTestes: 0, cowTestes: 0} currently unused*/ animalMpreg: 0, /* {pigMpreg: 0, dogMpreg: 0, horseMpreg: 0, cowMpreg: 0} currently unused*/ geneticMappingUpgrade: 0, + toyShop: false, pregnancyMonitoringUpgrade: 0, cloningSystem: 0, geneticFlawLibrary: 0, diff --git a/js/003-data/slaveWearData.js b/js/003-data/slaveWearData.js index ee5f17b6f40..736da4e6383 100644 --- a/js/003-data/slaveWearData.js +++ b/js/003-data/slaveWearData.js @@ -1195,9 +1195,8 @@ App.Data.shoes = new Map([ // TODO: add lift property * @property {string} name * @property {FC.FutureSociety} [fs] Automatically unlocked with this FS. * @property {boolean} [requirements] - * @property {boolean} [harsh] - * @property {0|1|2|3} width height in cm. Adds to heel height. - * @property {0|1|2} length height in cm. Over 4cm they may totter. 21cm and over (8 inch heels) will be painful/extreme + * @property {0|1|2|3} width + * @property {0|1|2} length */ /** diff --git a/src/005-passages/facilitiesPassages.js b/src/005-passages/facilitiesPassages.js index 0a372a4f922..0b437d54950 100644 --- a/src/005-passages/facilitiesPassages.js +++ b/src/005-passages/facilitiesPassages.js @@ -68,3 +68,12 @@ new App.DomPassage("Rules Assistant", return div; }, ["jump-to-safe", "jump-from-safe"] ); + +new App.DomPassage("Toy Shop", + () => { + V.nextButton = "Back"; + V.nextLink = "Manage Penthouse"; + + return App.UI.toyShop(); + }, +); diff --git a/src/facilities/toyShop/toyShop.js b/src/facilities/toyShop/toyShop.js new file mode 100644 index 00000000000..dcd1aa054d5 --- /dev/null +++ b/src/facilities/toyShop/toyShop.js @@ -0,0 +1,112 @@ +/** + * UI for the Body Modification system/studio. Refreshes without refreshing the passage. + */ +App.UI.toyShop = function() { + const container = document.createElement("span"); + let buttPlugName = ""; + let buttPlugData = { + name: "", + width: 0, + length: 0 + }; + + container.append(createPage()); + return container; + + function createPage() { + const el = new DocumentFragment(); + el.append(intro()); + el.append(buttPlugs()); + return el; + } + + function intro() { + const el = new DocumentFragment(); + App.UI.DOM.appendNewElement("h1", el, "Toy Shop"); + App.UI.DOM.appendNewElement("div", el, `The room is filled with the smell of rubber, latex, and various synthetic materials and solvents. A series of screens allows you to design toys of various shapes and sizes, and then produce them at scale. A bin of defects sits in the corner, glistening a bit under a layer of lubrication.`, "scene-intro"); + return el; + } + + + function buttPlugs() { + const el = new DocumentFragment(); + let linkArray; + App.UI.DOM.appendNewElement("h2", el, "Buttplugs"); + + const value = App.UI.DOM.appendNewElement("div", el, `enter value here, "a butt plug"`); + value.append(App.UI.DOM.makeTextBox( + buttPlugName, + v => { + buttPlugName = v; + refresh(); + } + )); + + const title = App.UI.DOM.appendNewElement("div", el, `enter value here, "Butt plug"`); + title.append(App.UI.DOM.makeTextBox( + buttPlugData.name, + v => { + buttPlugData.name = capFirstChar(v); + refresh(); + } + )); + + + const widthOptions = new Map([ + ["standard", 1], + ["large", 2], + ["huge", 3], + ]); + const width = App.UI.DOM.appendNewElement("div", el, `Select width`); + linkArray = []; + for (const [key, value] of widthOptions) { + linkArray.push( + App.UI.DOM.link( + key, + () => { + buttPlugData.width = value; + refresh(); + } + ) + ); + } + width.append(App.UI.DOM.generateLinksStrip(linkArray)); + + // width + + // length + const lengthOptions = new Map([ + ["standard", 1], + ["long", 2], + ]); + const length = App.UI.DOM.appendNewElement("div", el, `Select width`); + linkArray = []; + for (const [key, value] of lengthOptions) { + linkArray.push( + App.UI.DOM.link( + key, + () => { + buttPlugData.length = value; + refresh(); + } + ) + ); + } + length.append(App.UI.DOM.generateLinksStrip(linkArray)); + + return el; + + function buildPlug() { + + } + + function deletePlug() { + + } + } + + + function refresh() { + jQuery(container).empty().append(createPage()); + } +}; diff --git a/src/gui/quicklinks.js b/src/gui/quicklinks.js index c7a5dbb9347..f993e46a203 100644 --- a/src/gui/quicklinks.js +++ b/src/gui/quicklinks.js @@ -65,6 +65,7 @@ App.UI.quickMenu = (function() { "Implant Manufactory": true, "Prosthetic Lab": true, "Wardrobe": true, + "Toy Shop": true, "The Black Market": true, }, Tools: { @@ -96,6 +97,7 @@ App.UI.quickMenu = (function() { "Firebase": () => !V.SF.Toggle || V.SF.Toggle < 1 || V.SF.Active < 1, "Future Society": () => !V.FSAnnounced, "Gene Lab": () => !V.geneticMappingUpgrade, + "Toy Shop": () => !V.toyShop, "Head Girl Suite": () => !V.HGSuite, "Implant Manufactory": () => !V.ImplantProductionUpgrade, "Incubator": () => !V.incubator, diff --git a/src/uncategorized/managePenthouse.tw b/src/uncategorized/managePenthouse.tw index 34163138a6f..7133d8f8266 100644 --- a/src/uncategorized/managePenthouse.tw +++ b/src/uncategorized/managePenthouse.tw @@ -279,6 +279,15 @@ </div> <</if>> + <div> + <<if !$toyShop>> + [[Install a workshop for making custom toys|Manage Penthouse][cashX(-10000, "capEx"), $toyShop = true, $PC.skill.engineering += .1]] + <span class="detail">Costs <<print cashFormat(10000)>></span> + <<else>> + There is a [[workshop|Toy Shop]] for making custom toys. + <</if>> + </div> + <div> <<if $studio == 0>> [[Install a media hub to convert slave video feeds into pornography|Manage Penthouse][cashX(forceNeg(Math.trunc(10000*$upgradeMultiplierArcology)), "capEx"), $studio = 1, $PC.skill.engineering += 1]] -- GitLab