Skip to content
Snippets Groups Projects
Commit e68ab8d6 authored by lowercasedonkey's avatar lowercasedonkey
Browse files

intro

parent b24d2c65
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@
<<set $nextButton = "Back", $nextLink = "Manage Penthouse">>
DOM
<<includeDOM App.UI.WardrobeShopping("FS")>>
Twine
<<if $seeDicks != 100>>
<<set _model = GenerateNewSlave("XX")>>
<<else>>
......@@ -10,7 +14,7 @@
<h1>Slave Wardrobe</h1>
<<includeDOM App.UI.WardrobeShopping("FS")>>
<p class="scene-intro">
The room containing all the clothes and accessories you have available to dress your slaves in, as well as the supplies and tools your tailor needs to resize them to better fit your slaves. Several mirrors are set up for a slave to try on outfits should they be allowed to dress themselves. The selection includes
......
.wardrobe-shopping-cell {
display: inline-block;
width: "450px";
border: 1px solid white;
}
\ No newline at end of file
width: 20em;
border: 1px solid var(--button-border-color);
}
.wardrobe-shopping-cell:hover { background: var(--button-hover-color) }
\ No newline at end of file
App.UI.WardrobeShopping = function() {
const el = document.createElement("p");
App.UI.DOM.appendNewElement("H1", el, `Slave Wardrobe`);
let r = [];
r.push(`The room containing all the clothes and accessories you have available to dress your slaves in, as well as the supplies and tools your tailor needs to resize them to better fit your slaves.Several mirrors are set up for a slave to try on outfits should they be allowed to dress themselves.The selection includes`);
const ownItAll = (
App.Data.misc.niceClothes.every((i) => isItemAccessible.entry(i.value, "clothing")) &&
App.Data.misc.harshClothes.every((i) => isItemAccessible.entry(i.value, "clothing"))
);
if (ownItAll) {
r.push(`outfits from all manner of cultures and societies; not a single style eludes you.`);
} else {
r.push(`many styles of clothing ranging from exciting to mundane and sexy to practical.`);
}
if (V.boughtItem.shoes.heels === 1) {
r.push(`A large variety of shoes are available to select from.`);
}
if (V.boughtItem.clothing.dildos === 1 && V.boughtItem.toys.gags === 1 && V.boughtItem.clothing.buttPlugs === 1) {
r.push(`Sex toys of all kinds and shapes line the shelves.`);
} else if (V.boughtItem.clothing.dildos === 1 || V.boughtItem.toys.gags === 1 || V.boughtItem.clothing.buttPlugs === 1 || V.boughtItem.clothing.buttPlugTails === 1 || V.boughtItem.clothing.vaginalAttachments === 1) {
r.push(`Some sex toys line the shelves.`);
}
if (V.boughtItem.toys.buckets === 1) {
r.push(`Several buckets of various sizes and a sturdy cup have been set aside for you in feeding slaves to their limit.`);
}
if (V.boughtItem.toys.enema === 1) {
r.push(`A number of drums of specially formulated water for use in enemas line one of the walls.`);
}
if (V.boughtItem.toys.medicalEnema === 1) {
r.push(`Alongside them, multiple drums of mixtures for use in medical enemas.`);
}
App.UI.DOM.appendNewElement("p", el, r.join(" "), "scene-intro");
/**
*
* @param {*} category FS, FSrevivalist, or "other"
*/
App.UI.WardrobeShopping = function(category) {
const data = App.Data.WardrobeShopping[category];
const model = (V.seeDicks === 100) ? GenerateNewSlave("XY") : GenerateNewSlave("XX");
App.UI.DOM.appendNewElement("H2", el, `Future Society styles`);
el.append(categoryBlock("FS"));
const el = document.createElement("p");
el.id = `id${category}`;
Object.keys(data).forEach((clothing) => el.append(createCell(clothing)));
return el;
/**
*
* @param {string} clothing
* @param {*} category FS, FSrevivalist, or "other"
*/
function createCell(clothing) {
const el = document.createElement("div");
el.classList.add("wardrobe-shopping-cell");
/** @type {wardrobeItem} */
const clothingObj = App.Data.WardrobeShopping[category][clothing];
const cost = Math.trunc(clothingObj.cost * V.upgradeMultiplierTrade);
if (V.seeImages === 1) {
// Get a randomly chosen piece of clothing from the set to display:
model.clothes = clothingObj.contains[Math.floor(Math.random() * clothingObj.contains.length)];
App.UI.DOM.appendNewElement("div", el, App.Art.SlaveArtElement(model, 1, 0), ["imageRef", "tinyImg"]);
}
if (!V.boughtItem.clothing[clothing]) {
if (cost > V.cash) {
App.UI.DOM.appendNewElement(
"div",
el,
App.UI.DOM.link(
`Order ${clothingObj.title}`,
() => {
cashX(forceNeg(cost), "capEx");
V.boughtItem.clothing[clothing] = 1;
refresh();
}
)
);
App.UI.DOM.appendNewElement("div", el, `Costs ¤${cost}`, "detail");
function categoryBlock(category) {
const data = App.Data.WardrobeShopping[category];
const model = (V.seeDicks === 100) ? GenerateNewSlave("XY") : GenerateNewSlave("XX");
const el = document.createElement("p");
el.id = `id${category}`;
Object.keys(data).forEach((clothing) => el.append(createCell(clothing)));
return el;
/**
*
* @param {string} clothing
*/
function createCell(clothing) {
const el = document.createElement("div");
el.classList.add("wardrobe-shopping-cell");
/** @type {wardrobeItem} */
const clothingObj = App.Data.WardrobeShopping[category][clothing];
const cost = Math.trunc(clothingObj.cost * V.upgradeMultiplierTrade);
if (V.seeImages === 1) {
// Get a randomly chosen piece of clothing from the set to display:
model.clothes = clothingObj.contains[Math.floor(Math.random() * clothingObj.contains.length)];
App.UI.DOM.appendNewElement("div", el, App.Art.SlaveArtElement(model, 1, 0), ["imageRef", "smlImg"]);
}
if (!V.boughtItem.clothing[clothing]) {
if (cost > V.cash) {
App.UI.DOM.appendNewElement(
"div",
el,
App.UI.DOM.link(
`Order ${clothingObj.title}`,
() => {
cashX(forceNeg(cost), "capEx");
V.boughtItem.clothing[clothing] = 1;
refresh();
}
)
);
App.UI.DOM.appendNewElement("div", el, `Costs ¤${cost}`, "detail");
} else {
App.UI.DOM.appendNewElement(
"div",
el,
App.UI.DOM.disabledLink(
`Order ${clothingObj.title}`,
[`Cannot afford ¤${cost}`]
)
);
App.UI.DOM.appendNewElement("div", el, `Costs ¤${cost}`, ["red", "detail"]);
}
} else {
App.UI.DOM.appendNewElement(
"div",
el,
App.UI.DOM.disabledLink(
`Order ${clothingObj.title}`,
[`Cannot afford ¤${cost}`]
)
);
App.UI.DOM.appendNewElement("div", el, `Costs ¤${cost}`, ["red", "detail"]);
el.append(clothingObj.owned);
}
} else {
el.append(clothingObj.owned);
}
return el;
}
function refresh() {
jQuery(`#id${category}`).empty().append(App.UI.WardrobeShopping(category));
}
};
return el;
}
function refresh() {
jQuery(`#id${category}`).empty().append(App.UI.WardrobeShopping(category));
}
};
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment