diff --git a/src/facilities/wardrobe/wardrobe.tw b/src/facilities/wardrobe/wardrobe.tw index c142b65d3fedef885fa2e1d279ab9c09c1ed3043..56636db39ef96275968236cfa04b805d00db57ac 100644 --- a/src/facilities/wardrobe/wardrobe.tw +++ b/src/facilities/wardrobe/wardrobe.tw @@ -3,104 +3,3 @@ <<set $nextButton = "Back", $nextLink = "Manage Penthouse">> <<includeDOM App.UI.WardrobeShopping("FS")>> - -<h2>Accessories</h2> - -<p> - <<if !isItemAccessible.entry("platform heels", "shoes")>> - [[Order a shipment of platform shoes|Wardrobe][cashX(forceNeg(Math.trunc(7500 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.shoes.heels = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(7500 * $upgradeMultiplierTrade))>></span> - <<else>> - You have shelves dedicated to your collection of platform shoes. - <</if>> -</p> - -<p> - <<if !isItemAccessible.entry("a small empathy belly", "bellyAccessory")>> - [[Order a shipment of fake pregnancy bellies|Wardrobe][cashX(forceNeg(Math.trunc(15000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.clothing.belly = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(15000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with silicone pregnancy bellies modeled after variously sized women. - <</if>> -</p> - -<p> - <div> - <<if $boughtItem.toys.dildos == 0>> - [[Order a shipment of extra long dildos and bullet vibes|Wardrobe][cashX(forceNeg(Math.trunc(10000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.dildos = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with extra long dildos in a variety of sizes, as well as a good amount of bullet vibrators. - <<if $boughtItem.toys.smartVibes == 0>> - <div class="indent"> - [[Order the "smart" variant of the bullet vibrators|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.smartVibes = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierTrade))>></span> - </div> - <<else>> - Some of the bullet vibes are of the "smart" variety. - <</if>> - <</if>> - </div> - - <div> - <<if $boughtItem.toys.vaginalAttachments == 0>> - [[Order a shipment of vibrating dildo attachments|Wardrobe][cashX(forceNeg(Math.trunc(10000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.vaginalAttachments = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with attachments that allow dildos to vibrate. - <</if>> - </div> - - <div> - <<if $boughtItem.toys.buttPlugs == 0>> - [[Order a shipment of extra long buttplugs|Wardrobe][cashX(forceNeg(Math.trunc(10000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.buttPlugs = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(10000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with extra long buttplugs in a variety of sizes. - <</if>> - </div> - - <div> - <<if $boughtItem.toys.buttPlugTails == 0>> - [[Order a shipment of attachable tails|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.buttPlugTails = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with tails to attach to your buttplugs. - <</if>> - </div> - - <div> - <<if $boughtItem.toys.gags == 0>> - [[Order a shipment of massive dildo gags|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.gags = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with massive dildo gags. - <</if>> - </div> -</p> - -<p> - <div> - <<if $boughtItem.toys.buckets == 0>> - [[Gather up everything you need to force-feed slaves|Wardrobe][$boughtItem.toys.buckets = 1]] - <span class="detail">Some supplies from the cafeteria and a slight adjustment to the feeder settings is all it would take.</span> - <<else>> - You have everything you need in one place to force-feed slaves. You've also adjusted the feeders to cheaply produce filler food to save on money. However, said food is just empty calories and probably bad for a slave's waistline. - <</if>> - </div> - - <div> - <<if $boughtItem.toys.enema == 0>> - [[Order enema supplies|Wardrobe][cashX(forceNeg(Math.trunc(5000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.enema = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(5000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are well stocked with specially formulated liquids to be used safely for long term enemas along with the tools needed to keep a slave bloated for extended periods of time. - <<if $boughtItem.toys.medicalEnema == 0>> - [[Order medical enema supplies|Wardrobe][cashX(forceNeg(Math.trunc(25000 * $upgradeMultiplierTrade)), "capEx"), $boughtItem.toys.medicalEnema = 1]] - <span class="detail">Costs <<print cashFormat(Math.trunc(25000 * $upgradeMultiplierTrade))>></span> - <<else>> - You are also well stocked with drugs to be mixed with the enema water for use in medical enemas. - <</if>> - <</if>> - </div> -</p> diff --git a/src/facilities/wardrobe/wardrobeShopping.js b/src/facilities/wardrobe/wardrobeShopping.js index e212a6b792e1531adba1069686ead47e0579b8c6..f42b22be64490fa0c6baddc78ebe355194addf05 100644 --- a/src/facilities/wardrobe/wardrobeShopping.js +++ b/src/facilities/wardrobe/wardrobeShopping.js @@ -47,15 +47,19 @@ App.UI.WardrobeShopping = function() { el.append(categoryBlock("other")); + App.UI.DOM.appendNewElement("H2", el, `Accessories`); + + el.append(accessoryBlock()); + return el; /** - * + * * @param {*} category FS, FSrevivalist, or "other" */ function categoryBlock(category) { - const data = App.Data.WardrobeShopping[category]; + const data = App.Data.WardrobeShopping.Clothing[category]; const model = (V.seeDicks === 100) ? GenerateNewSlave("XY") : GenerateNewSlave("XX"); const el = document.createElement("p"); @@ -71,14 +75,14 @@ App.UI.WardrobeShopping = function() { return el; /** - * + * * @param {string} clothing */ function createCell(clothing, oldOutfit = "") { const el = document.createElement("div"); el.classList.add("wardrobe-shopping-cell"); /** @type {wardrobeItem} */ - const clothingObj = App.Data.WardrobeShopping[category][clothing]; + const clothingObj = App.Data.WardrobeShopping.Clothing[category][clothing]; const cost = Math.trunc(clothingObj.cost * V.upgradeMultiplierTrade); let div; @@ -123,7 +127,7 @@ App.UI.WardrobeShopping = function() { } ) ); - App.UI.DOM.appendNewElement("div", el, `Costs ¤${cost}`, "detail"); + App.UI.DOM.appendNewElement("div", el, ` Costs ¤${cost}`, "detail"); } else { div = App.UI.DOM.disabledLink( `Order ${clothingObj.title}`, @@ -139,8 +143,66 @@ App.UI.WardrobeShopping = function() { return el; } - function refresh() { - jQuery(`#wardrobe-shopping`).empty().append(App.UI.WardrobeShopping()); + } + + function accessoryBlock() { + const el = document.createElement("p"); + + for (const name in App.Data.WardrobeShopping.Accessories) { + el.append(createLine(name)); + } + return el; + + function createLine(name) { + const line = document.createElement("div"); + const purchased = _.get(V.boughtItem, name); + const obj = (App.Data.WardrobeShopping.Accessories[name]); + const cost = Math.trunc(obj.cost * V.upgradeMultiplierTrade); + let div = document.createElement("div"); + + if (purchased !== 0 && purchased !== 1) { + throw `${name} set incorrectly or not found`; + } + + if (obj.hasOwnProperty("rs") && obj.rs !== true) { + return line; + } + + if (!purchased) { + if (cost < V.cash) { + div.append( + App.UI.DOM.link( + `Order ${obj.title}`, + () => { + cashX(forceNeg(cost), "capEx"); + _.set(V.boughtItem, name, 1); + refresh(); + } + ) + ); + App.UI.DOM.appendNewElement("span", div, ` Costs ¤${cost}`, "detail"); + } else { + div.append( + App.UI.DOM.disabledLink( + `Order ${obj.title}`, + [`Cannot afford ¤${cost}`] + ) + ); + App.UI.DOM.appendNewElement("span", div, ` Costs ¤${cost}`, ["red", "detail"]); + } + if (obj.hasOwnProperty("note")) { + App.UI.DOM.appendNewElement("span", div, ` ${obj.note}`, "note"); + } + } else { + div.append(obj.owned); + } + line.append(div); + + return line; } } + + function refresh() { + jQuery(`#wardrobe-shopping`).empty().append(App.UI.WardrobeShopping()); + } }; diff --git a/src/facilities/wardrobe/wardrobeShoppingData.js b/src/facilities/wardrobe/wardrobeShoppingData.js index 8d2f9311be8cfeb4b6eaadf2d0237e9c494a55a0..0a3f34eb551c4109b2e2ede1d99fe9550ed826d1 100644 --- a/src/facilities/wardrobe/wardrobeShoppingData.js +++ b/src/facilities/wardrobe/wardrobeShoppingData.js @@ -1,12 +1,15 @@ +App.Data.WardrobeShopping = {}; -App.Data.WardrobeShopping = { +App.Data.WardrobeShopping.Clothing = { /** * @typedef {object} wardrobeItem * @property {string} title - * @property {Number} cost + * @property {number} cost + * @property {string} [note] italicize note about a purchase * @property {string[]} contains * @property {string} owned * @property {object} [modelUpdate] + * @property {boolean} [rs] requirements met */ /** @@ -19,61 +22,61 @@ App.Data.WardrobeShopping = { contains: ["a bunny outfit"], owned: "You are well stocked with classic bunny suits and bowties.", }, - "conservative" :{ + "conservative": { title: "a shipment of conservative clothes", cost: 7500, contains: ["conservative clothing"], owned: "You are well stocked with modest outfits.", }, - "bimbo" :{ + "bimbo": { title: "a shipment of outfits suitable for bimbos", cost: 7500, contains: ["a bimbo outfit"], owned: "You are well stocked with bimbo attire.", }, - "courtesan" :{ + "courtesan": { title: "a shipment of courtesan dresses", cost: 7500, contains: ["a courtesan dress"], owned: "You are well stocked with courtesan dresses.", }, - "chains" :{ + "chains": { title: "a shipment of chains", cost: 7500, contains: ["chains"], owned: "You are well stocked with various lengths of binding chains.", }, - "western" :{ + "western": { title: "a shipment of western outfits", cost: 7500, contains: ["Western clothing"], owned: "You are well stocked with cowgirl outfits.", }, - "oil" :{ + "oil": { title: "a shipment of body oil", cost: 7500, contains: ["body oil"], owned: "You are well stocked with various body oils.", }, - "lazyClothes" :{ + "lazyClothes": { title: "a shipment of comfortable, rather stretchy, clothes", cost: 7500, contains: ["stretch pants and a crop-top"], owned: "You are well stocked with various comfy pants and rather tight crop-tops.", }, - "habit" :{ + "habit": { title: "a shipment of chattel habits", cost: 7500, contains: ["a chattel habit"], owned: "You are well stocked with habits from the chattel religion.", }, - "maternityDress" :{ + "maternityDress": { title: "a shipment of maternity dresse", cost: 7500, contains: ["a maternity dress"], owned: "You are well stocked with dresses specially tailored for pregnant women.", }, - "maternityLingerie" :{ + "maternityLingerie": { title: "a shipment of maternity lingerie", cost: 7500, contains: ["attractive lingerie for a pregnant woman"], @@ -81,38 +84,38 @@ App.Data.WardrobeShopping = { }, }, FSrevivalist: { - "egypt" :{ + "egypt": { title: "a shipment of Egyptian necklaces", cost: 7500, contains: ["no clothing"], owned: "You are well stocked with ancient Egyptian necklaces.", modelUpdate: {collar: "ancient Egyptian"} }, - "toga" :{ + "toga": { title: "a shipment of togas and stolas", cost: 7500, contains: ["a toga"], owned: "You are well stocked with fine roman-styled togas and stolas.", }, - "huipil" :{ + "huipil": { title: "a shipment of huipil", cost: 7500, contains: ["a huipil"], owned: "You are well stocked with exquisite Aztec huipils.", }, - "kimono" :{ + "kimono": { title: "a shipment of kimonos", cost: 7500, contains: ["a kimono"], owned: "You are well stocked with elegant Japanese kimonos.", }, - "harem" :{ + "harem": { title: "a shipment of harem outfits", cost: 7500, contains: ["harem gauze"], owned: "You are well stocked with Arabic harem garb made from the finest available silks.", }, - "qipao" :{ + "qipao": { title: "a shipment of qipaos", cost: 7500, contains: ["a slutty qipao"], @@ -120,85 +123,85 @@ App.Data.WardrobeShopping = { }, }, other: { - "military" :{ + "military": { title: "a shipment of military themed clothing", cost: 5000, contains: ["a military uniform", "a red army uniform", "battlearmor", "battledress"], owned: "You are well stocked with a variety of military themed garb.", }, - "cultural" :{ + "cultural": { title: "a shipment of cultural outfits", cost: 15000, contains: ["a biyelgee costume", "a dirndl", "a hanbok", "a mounty outfit", "lederhosen"], owned: "You are well stocked with a variety of signature outfits from a variety of countries.", }, - "middleEastern" :{ + "middleEastern": { title: "a shipment of burqas and similar garb", cost: 5000, contains: ["a burqa", "a niqab and abaya"], owned: "You are well stocked with a number of burqas and similar clothing.", }, - "casual" :{ + "casual": { title: "an extra large shipment of casual clothing", cost: 5000, contains: ["a button-up shirt and panties", "a button-up shirt", "a sweater and cutoffs", "a sweater and panties", "a sweater", "a t-shirt and jeans", "a t-shirt and panties", "a t-shirt", "a tank-top and panties", "a tank-top", "a tube top", "an oversized t-shirt", "cutoffs", "jeans", "leather pants and a tube top", "leather pants"], owned: "You are well stocked with casual clothing.", }, - "career" :{ + "career": { title: "a shipment of professional garments", cost: 2500, contains: ["a nice nurse outfit", "a police uniform", "nice business attire"], owned: "You are well stocked with a selection of professional outfits.", }, - "dresses" :{ + "dresses": { title: "a shipment of professionally tailored dresses", cost: 15000, contains: ["a ball gown", "a gothic lolita dress"], owned: "You are well stocked with a selection of fine dresses.", }, - "bodysuits" :{ + "bodysuits": { title: "a shipment of exotic bodysuits", cost: 7500, contains: ["a cybersuit", "a latex catsuit"], owned: "You are well stocked with a selection of bodysuits.", }, - "underwear" :{ + "underwear": { title: "a shipment of undergarments", cost: 5000, contains: ["a bra", "a skimpy loincloth", "a thong", "boyshorts", "kitty lingerie", "panties and pasties", "pasties"], owned: "You are well stocked with underwear.", }, - "sports" :{ + "sports": { title: "a shipment of exercise wear", cost: 2500, contains: ["a sports bra", "sport shorts and a sports bra", "sport shorts"], owned: "You are well stocked with exercise wear.", }, - "swimwear" :{ + "swimwear": { title: "a shipment of swimwear", cost: 3500, contains: ["a monokini", "a one-piece swimsuit"], owned: "You are well stocked with swimwear.", }, - "pony" :{ + "pony": { title: "a shipment of specialized latex ponygirl outfits", cost: 10000, contains: ["a nice pony outfit", "a slutty pony outfit"], owned: "You are well stocked with ponygirl bodysuits.", }, - "pol" :{ + "pol": { title: "a shipment of politically incorrect clothing", cost: 15000, contains: ["a klan robe", "a schutzstaffel uniform", "a slutty klan robe", "a slutty schutzstaffel uniform"], owned: "You are well stocked with a selection of outfits once considered distasteful.", }, - "costume" :{ + "costume": { title: "a shipment of colorful and revealing costumes", cost: 15000, contains: ["a Santa dress"], owned: "You are well stocked with a variety of costume party supplies.", }, - "pantsu" :{ + "pantsu": { title: "a large crate of panties from Japan", cost: 2500, contains: ["a striped bra", "striped panties", "striped underwear"], @@ -206,3 +209,77 @@ App.Data.WardrobeShopping = { }, } }; +/** + * @type {Object.<string, wardrobeItem>} String will be the property checked to see if the item is owned. So for "bunny", it will check V.boughtItem.clothing["bunny"]. + */ +App.Data.WardrobeShopping.Accessories = { + "shoes.heels": { + title: "a shipment of platform shoes", + cost: 7500, + contains: ["platform heels"], + owned: "You have shelves dedicated to your collection of platform shoes.", + }, + "clothing.belly": { + title: "a shipment of fake pregnancy bellies", + cost: 15000, + contains: ["a small empathy belly"], + owned: "You are well stocked with silicone pregnancy bellies modeled after variously sized women.", + }, + "toys.dildos": { + title: "a shipment of extra long dildos and bullet vibes", + cost: 10000, + contains: ["long dildo"], + owned: "You are well stocked with extra long dildos in a variety of sizes, as well as a good amount of bullet vibrators.", + }, + "toys.smartVibes": { + title: `the "smart" variant of the bullet vibrators`, + cost: 5000, + contains: ["long dildo"], + get rs() { return V.boughtItem.toys.dildos !== 0; }, + owned: `Some of the bullet vibes are of the "smart" variety.`, + }, + "toys.vaginalAttachments": { + title: "Order a shipment of vibrating dildo attachments", + cost: 10000, + contains: [], + owned: "You are well stocked with attachments that allow dildos to vibrate.", + }, + "toys.buttPlugs": { + title: "a shipment of extra long buttplugs", + cost: 10000, + contains: [], + owned: "You are well stocked with extra long buttplugs in a variety of sizes.", + }, + "toys.buttPlugTails": { + title: "a shipment of attachable tails", + cost: 5000, + contains: [], + owned: "You are well stocked with tails to attach to your buttplugs.", + }, + "toys.gags": { + title: "a shipment of massive dildo gags", + cost: 5000, + contains: [], + owned: "You are well stocked with massive dildo gags.", + }, + "toys.buckets": { + title: "everything you need to force-feed slaves", + note: `Some supplies from the cafeteria and a slight adjustment to the feeder settings is all it would take.`, + cost: 0, + contains: [], + owned: "You have everything you need in one place to force-feed slaves. You've also adjusted the feeders to cheaply produce filler food to save on money. However, said food is just empty calories and probably bad for a slave's waistline.", + }, + "toys.enema": { + title: "enema supplies", + cost: 5000, + contains: [], + owned: "You are well stocked with specially formulated liquids to be used safely for long term enemas along with the tools needed to keep a slave bloated for extended periods of time", + }, + "toys.medicalEnema": { + title: `medical enema supplies`, + cost: 5000, + contains: [], + get rs() { return (V.boughtItem.toys.enema !== 0); }, + owned: "You are also well stocked with drugs to be mixed with the enema water for use in medical enemas.", + }, +};