Skip to content
Snippets Groups Projects
Commit 42e29b23 authored by DCoded's avatar DCoded
Browse files

Spa DOMification

parent a54445f8
No related branches found
No related tags found
1 merge request!9502Spa DOMification
.spa-intro,
.spa-expand,
.spa-upgrades,
.spa-attendant,
.spa-slaves,
.spa-rename {
margin-bottom: 1em;
}
App.Facilities.Spa.spa = function() {
const frag = new DocumentFragment();
const introDiv = App.UI.DOM.makeElement("div", null, ['spa-intro']);
const expandDiv = App.UI.DOM.makeElement("div", null, ['spa-expand']);
const upgradesDiv = App.UI.DOM.makeElement("div", null, ['spa-upgrades']);
const attendantDiv = App.UI.DOM.makeElement("div", null, ['spa-attendant']);
const slavesDiv = App.UI.DOM.makeElement("div", null, ['spa-slaves']);
const renameDiv = App.UI.DOM.makeElement("div", null, ['spa-rename']);
const spaNameCaps = capFirstChar(V.spaName);
const count = App.Entity.facilities.spa.employeesIDs().size;
V.nextButton = "Back to Main";
V.nextLink = "Main";
V.returnTo = "Spa";
V.encyclopedia = "Spa";
frag.append(
intro(),
expand(),
upgrades(),
attendant(),
slaves(),
rename(),
);
return frag;
function intro() {
const text = [];
const spaUtilization = 1 - (V.spaSpots / (V.spa * 20));
text.push(spaNameCaps);
switch (V.spaDecoration) {
case "Roman Revivalist":
text.push(`is built as a Roman bath. The flooring is pleasantly warm due to a modernized version of hypocaust heating, and is covered in mosaic depicting slaves enjoying sex.`);
break;
case "Neo-Imperialist":
text.push(`is built as a modern Imperial garden. Bright green plants mix with the pulsating lights of high technology, and clear, sleek windows fog up with the steam of a central bath heated by the latest hydraulic technology.`);
break;
case "Aztec Revivalist":
text.push(`is built as an Aztec bathhouse. Water steams from the middle of the room and the air is heavy with the scent of herbs and essences. The idols by the door glisten with moisture.`);
break;
case "Egyptian Revivalist":
text.push(`is decorated like an Egyptian water garden. All but the hottest pools include aquatic plants around their edges, and the atmosphere is heavy with perfume.`);
break;
case "Edo Revivalist":
text.push(`is decorated like a traditional onsen. The stone-lined pools are surrounded by meticulously kept gardens, and there are proper provisions for bathing in the old Japanese style.`);
break;
case "Arabian Revivalist":
text.push(`looks like a dream of an Arabian palace garden. Every surface is richly tiled in vibrant colors, and the beguiling scents of perfumes from the Levant hang in the air.`);
break;
case "Chinese Revivalist":
text.push(`is gloomy and hot, filled with an oppressive steam that immediately dulls the senses. Though relaxation is possible and indeed easy here, it is a stultifying relaxation whose humid warmth seems to suppress independence.`);
break;
case "Chattel Religionist":
text.push(`is dedicated to the purification of the body and the spirit. The pools are arranged for the completion of self-purification procedures which include ritual masturbation.`);
break;
case "Degradationist":
text.push(`is utilitarian. There are waterproof cameras positioned throughout the spa so that anyone who wants to can watch the nude slaves. One wall has a screen showing the current viewer count to keep the slaves aware of this.`);
break;
case "Asset Expansionist":
text.push(`is utilitarian. It is equipped with all sorts of devices to help slaves care for huge assets, including lifts to help them in and out of the water, and all around showers to help clean and moisturize difficult to reach spots.`);
break;
case "Transformation Fetishist":
text.push(`is utilitarian. It is equipped with special devices to help speed surgical recovery, including a series of baths designed to prevent scarring.`);
break;
case "Repopulationist":
text.push(`is comfortable, with waterproof cushions lining the pools. It is equipped with all sorts of devices to aid pregnant slaves, including lifts to help them in and out of the water, baths just for their feet, and all around showers to help clean and moisturize difficult to reach spots.`);
break;
case "Eugenics":
text.push(`is comfortable, albeit split in half. One side for the lower classes' slaves, and the other for the Elite and their pets.`);
break;
case "Gender Radicalist":
text.push(`is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing slave girls with all different varieties of genitalia orgasming from penetration, to keep the idea at the forefront of the slaves' minds.`);
break;
case "Gender Fundamentalist":
text.push(`is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring a lot of beautiful women and handsome men for the slaves' edification.`);
break;
case "Physical Idealist":
text.push(`is not the gym, but it does have some workout equipment, mostly low-impact machines designed to speed recovery. There are special hot baths to ease sore muscles.`);
break;
case "Supremacist":
text.push(`is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring $arcologies[0].FSSupremacistRace main characters.`);
break;
case "Subjugationist":
text.push(`is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring $arcologies[0].FSSubjugationistRace characters in comic relief roles.`);
break;
case "Paternalist":
text.push(`is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment written by and intended for smart, loyal slaves.`);
break;
case "Pastoralist":
text.push(`is utilitarian. It is equipped with all sorts of devices to help slaves care for huge assets, including lifts to help them in and out of the water, and all around showers to help clean and moisturize difficult to reach spots.`);
break;
case "Maturity Preferentialist":
text.push(`is comfortable, but surprisingly businesslike. It's all about beautification here; there's a bewildering array of mud baths, resting pools, and massage setups, all designed to keep mature slaves looking their very best.`);
break;
case "Youth Preferentialist":
text.push(`is comfortable and fun. There are hot tubs and massage tables for slaves who feel like relaxing, but there's also a colder pool with pool toys for slaves who want to play. It even has a small waterslide.`);
break;
case "Body Purist":
text.push(`is comfortable, with waterproof cushions lining the pools. Everything is designed for the slaves' comfort; there are even special mud baths to perfect skin clarity.`);
break;
case "Slimness Enthusiast":
text.push(`is comfortable, with waterproof cushions lining the pools. Everything is designed for the slaves' comfort; there are even special mud baths to perfect skin clarity.`);
break;
case "Hedonistic":
text.push(`is comfortable, with waterproof cushions lining the pools. It is equipped with all sorts of devices to aid hefty slaves, including lifts to help them in and out of the water, specialized moisturizers to keep their skin healthy and smooth, and all around showers to help clean difficult to reach spots and between folds. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food and treats are readily available around the tubs so that relaxing slaves never have to strain to grab a bite to eat<<else>>Feeders connected to the slave food reserves line the pools so that so that relaxing slaves never have to strain to suck down their fill of food<</if>>.`);
break;
case "Intellectual Dependency":
text.push(`is comfortable, fun and, most importantly, safe; even the dumbest slave can enjoy the pools without worrying their <<= properTitle()>>. There are screens on the walls showing simple entertainment designed to arouse more than titillate.`);
break;
case "Slave Professionalism":
text.push(`is comfortable, with waterproof cushions lining the pools. It is a place where a weary slave can rest their mind after a hards day's work. There are screens on the walls showing documentaries intended for smart, skilled slaves.`);
break;
case "Petite Admiration":
text.push(`is comfortable, but designed with short slaves in mind. The pools are shallow and easy to slip in and out of; taller slaves are likely to find them more frustrating than enjoyable.`);
break;
case "Statuesque Glorification":
text.push(`is comfortable, but designed with tall slaves in mind. The pools are deep; too deep for a short slave to find relaxing.`);
break;
default:
text.push(`is well-appointed, with massage tables, hot tubs, and a cold pool.`);
break;
}
if (spaUtilization >= 1) {
text.push(`It's crowded in here. Slaves are relaxing in the warm water, splashing around or just floating. Here and there some of the more sex-starved are in the early stages of intercourse, but most prefer to take time off from it all. Unfortunately there is not enough space for all of your slaves to enjoy the spa.`);
} else if (spaUtilization >= 0.5 || (count / V.spa > 0.5)) {
text.push(`It's busy in here. Slaves are relaxing in the warm water, splashing around or just floating. Here and there some of the more sex-starved are in the early stages of intercourse, but most prefer to take time off from it all.`);
} else if (spaUtilization > 0 || count > 0) {
text.push(`It's sparsely populated; though the few slaves here have little company they like having the water to themselves.`);
} else if (S.Attendant) {
const {his} = getPronouns(S.Attendant);
text.push(`${S.Attendant.slaveName} is alone here, and has nothing to do but keep the place (and ${his} own soft, wet body) spotlessly clean.`);
} else {
text.push(`It's empty and quiet.`);
}
App.UI.DOM.appendNewElement("div", introDiv, text.join(' '), ['scene-intro']);
introDiv.append(text.join(' '));
if (count === 0 && !S.Attendant) {
introDiv.append(App.UI.DOM.makeElement("div", App.UI.DOM.passageLink(`Decommission ${V.spaName}`, "Main", () => {
V.spa = 0;
V.spaDecoration = "standard";
V.spaUpgrade = 0;
V.spaFix = 0;
})));
}
return introDiv;
}
function expand() {
const cost = Math.trunc(V.spa * 1000 * V.upgradeMultiplierArcology);
expandDiv.append(
`${spaNameCaps} can house ${V.spa} slaves while they recuperate here. There ${count === 1 ? `is currently ${count} slave` : `are currently ${count} slaves`} recuperating in ${V.spaName}.`,
App.UI.DOM.link(`Expand ${V.spaName}`, () => {
cashX(forceNeg(cost), "capEx");
V.spa += 5;
refresh();
}, [], '', `Costs ${cost} and increases the capacity of ${V.spaName} by 5.`),
);
if (count > 0) {
expandDiv.append(removeFacilityWorkers("spa", "rest", "rest"));
}
return expandDiv;
}
function upgrades() {
if (V.spaUpgrade === 1) {
upgradesDiv.append(`${spaNameCaps} has been upgraded with state of the art temperature treatment options, from hot and cold mineral water pools to baking saunas and dense steam rooms.`);
} else {
const cost = Math.trunc(V.spa * 1000 * V.upgradeMultiplierArcology);
upgradesDiv.append(
`${spaNameCaps} is a standard spa.`,
App.UI.DOM.link(`Upgrade ${V.spaName} with saunas, steam rooms, and mineral water baths`, () => {
cashX(forceNeg(cost), "capEx");
V.spaUpgrade = 1;
refresh();
}, [], '', `Costs ${cost} and increases the effectiveness of ${V.spaName}.`),
);
}
return upgradesDiv;
}
function attendant() {
if (S.Attendant) {
const {him, he, his} = getPronouns(S.Attendant);
const links = [];
if (V.spaFix === 2) {
attendantDiv.append(`${S.Attendant.slaveName} is focusing only on the health and wellness of the slaves under ${his} care, obeying your orders to avoid attempting to right mental flaws.`);
links.push(
App.UI.DOM.disabledLink(`Order ${him} to not fix any flaws`, [`Currently selected.`]),
App.UI.DOM.link(`Order ${him} to only fix mindbroken slaves`, () => changeSetting(1)),
App.UI.DOM.link(`Let ${him} tend as ${he} sees fit`, () => changeSetting(0)),
);
} else if (V.spaFix === 1) {
attendantDiv.append(`${S.Attendant.slaveName} is focusing on the health and wellness of the slaves under ${his} care, as well as trying to bring mindbroken slaves back, while ignoring any mental hang-ups a slave may have.`);
links.push(
App.UI.DOM.link(`Order ${him} to not fix any flaws`, () => changeSetting(2)),
App.UI.DOM.disabledLink(`Order ${him} to only fix mindbroken slaves`, [`Currently selected.`]),
App.UI.DOM.link(`Let ${him} tend as ${he} sees fit`, () => changeSetting(0)),
);
} else {
attendantDiv.append(`${S.Attendant.slaveName} is not following any special orders and is tending to your slaves as ${he} sees fit.`);
links.push(
App.UI.DOM.link(`Order ${him} to not fix any flaws`, () => changeSetting(2)),
App.UI.DOM.link(`Order ${him} to only fix mindbroken slaves`, () => changeSetting(1)),
App.UI.DOM.disabledLink(`Let ${him} tend as ${he} sees fit`, [`Currently selected.`]),
);
}
attendantDiv.append(App.UI.DOM.generateLinksStrip(links));
}
return attendantDiv;
function changeSetting(setting) {
V.spaFix = setting;
refresh();
}
}
function slaves() {
slavesDiv.append(App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.spa, true));
return slavesDiv;
}
function rename() {
renameDiv.append(App.Facilities.rename(App.Entity.facilities.spa, () => {
refresh();
}));
return renameDiv;
}
function refresh() {
App.UI.DOM.replace(introDiv, intro);
App.UI.DOM.replace(expandDiv, expand);
App.UI.DOM.replace(attendantDiv, attendant);
App.UI.DOM.replace(slavesDiv, slaves);
App.UI.DOM.replace(renameDiv, rename);
}
};
:: Spa [nobr jump-to-safe jump-from-safe]
<<set _DL = App.Entity.facilities.spa.employeesIDs().size, $nextButton = "Back to Main", $nextLink = "Main", $returnTo = "Spa", $encyclopedia = "Spa">>
<<set _spaNameCaps = capFirstChar($spaName)>>
<p class="scene-intro">
_spaNameCaps
<<switch $spaDecoration>>
<<case "Roman Revivalist">>
is built as a Roman bath. The flooring is pleasantly warm due to a modernized version of hypocaust heating, and is covered in mosaic depicting slaves enjoying sex.
<<case "Neo-Imperialist">>
is built as a modern Imperial garden. Bright green plants mix with the pulsating lights of high technology, and clear, sleek windows fog up with the steam of a central bath heated by the latest hydraulic technology.
<<case "Aztec Revivalist">>
is built as an Aztec bathhouse. Water steams from the middle of the room and the air is heavy with the scent of herbs and essences. The idols by the door glisten with moisture.
<<case "Egyptian Revivalist">>
is decorated like an Egyptian water garden. All but the hottest pools include aquatic plants around their edges, and the atmosphere is heavy with perfume.
<<case "Edo Revivalist">>
is decorated like a traditional onsen. The stone-lined pools are surrounded by meticulously kept gardens, and there are proper provisions for bathing in the old Japanese style.
<<case "Arabian Revivalist">>
looks like a dream of an Arabian palace garden. Every surface is richly tiled in vibrant colors, and the beguiling scents of perfumes from the Levant hang in the air.
<<case "Chinese Revivalist">>
is gloomy and hot, filled with an oppressive steam that immediately dulls the senses. Though relaxation is possible and indeed easy here, it is a stultifying relaxation whose humid warmth seems to suppress independence.
<<case "Chattel Religionist">>
is dedicated to the purification of the body and the spirit. The pools are arranged for the completion of self-purification procedures which include ritual masturbation.
<<case "Degradationist">>
is utilitarian. There are waterproof cameras positioned throughout the spa so that anyone who wants to can watch the nude slaves. One wall has a screen showing the current viewer count to keep the slaves aware of this.
<<case "Asset Expansionist">>
is utilitarian. It is equipped with all sorts of devices to help slaves care for huge assets, including lifts to help them in and out of the water, and all around showers to help clean and moisturize difficult to reach spots.
<<case "Transformation Fetishist">>
is utilitarian. It is equipped with special devices to help speed surgical recovery, including a series of baths designed to prevent scarring.
<<case "Repopulationist">>
is comfortable, with waterproof cushions lining the pools. It is equipped with all sorts of devices to aid pregnant slaves, including lifts to help them in and out of the water, baths just for their feet, and all around showers to help clean and moisturize difficult to reach spots.
<<case "Eugenics">>
is comfortable, albeit split in half. One side for the lower classes' slaves, and the other for the Elite and their pets.
<<case "Gender Radicalist">>
is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing slave girls with all different varieties of genitalia orgasming from penetration, to keep the idea at the forefront of the slaves' minds.
<<case "Gender Fundamentalist">>
is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring a lot of beautiful women and handsome men for the slaves' edification.
<<case "Physical Idealist">>
is not the gym, but it does have some workout equipment, mostly low-impact machines designed to speed recovery. There are special hot baths to ease sore muscles.
<<case "Supremacist">>
is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring $arcologies[0].FSSupremacistRace main characters.
<<case "Subjugationist">>
is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment featuring $arcologies[0].FSSubjugationistRace characters in comic relief roles.
<<case "Paternalist">>
is comfortable, with waterproof cushions lining the pools. There are screens on the walls showing light entertainment written by and intended for smart, loyal slaves.
<<case "Pastoralist">>
is utilitarian. It is equipped with all sorts of devices to help slaves care for huge assets, including lifts to help them in and out of the water, and all around showers to help clean and moisturize difficult to reach spots.
<<case "Maturity Preferentialist">>
is comfortable, but surprisingly businesslike. It's all about beautification here; there's a bewildering array of mud baths, resting pools, and massage setups, all designed to keep mature slaves looking their very best.
<<case "Youth Preferentialist">>
is comfortable and fun. There are hot tubs and massage tables for slaves who feel like relaxing, but there's also a colder pool with pool toys for slaves who want to play. It even has a small waterslide.
<<case "Body Purist">>
is comfortable, with waterproof cushions lining the pools. Everything is designed for the slaves' comfort; there are even special mud baths to perfect skin clarity.
<<case "Slimness Enthusiast">>
is comfortable, with waterproof cushions lining the pools. Everything is designed for the slaves' comfort; there are even special mud baths to perfect skin clarity.
<<case "Hedonistic">>
is comfortable, with waterproof cushions lining the pools. It is equipped with all sorts of devices to aid hefty slaves, including lifts to help them in and out of the water, specialized moisturizers to keep their skin healthy and smooth, and all around showers to help clean difficult to reach spots and between folds. <<if $arcologies[0].FSHedonisticDecadenceResearch == 1>>Platters of food and treats are readily available around the tubs so that relaxing slaves never have to strain to grab a bite to eat<<else>>Feeders connected to the slave food reserves line the pools so that so that relaxing slaves never have to strain to suck down their fill of food<</if>>.
<<case "Intellectual Dependency">>
is comfortable, fun and, most importantly, safe; even the dumbest slave can enjoy the pools without worrying their <<= properTitle()>>. There are screens on the walls showing simple entertainment designed to arouse more than titillate.
<<case "Slave Professionalism">>
is comfortable, with waterproof cushions lining the pools. It is a place where a weary slave can rest their mind after a hards day's work. There are screens on the walls showing documentaries intended for smart, skilled slaves.
<<case "Petite Admiration">>
is comfortable, but designed with short slaves in mind. The pools are shallow and easy to slip in and out of; taller slaves are likely to find them more frustrating than enjoyable.
<<case "Statuesque Glorification">>
is comfortable, but designed with tall slaves in mind. The pools are deep; too deep for a short slave to find relaxing.
<<default>>
is well-appointed, with massage tables, hot tubs, and a cold pool.
<</switch>>
<<set _spaUtilization = 1 - ($spaSpots / ($spa * 20))>>
<<if _spaUtilization >= 1>>
It's crowded in here. Slaves are relaxing in the warm water, splashing around or just floating. Here and there some of the more sex-starved are in the early stages of intercourse, but most prefer to take time off from it all. Unfortunately there is not enough space for all of your slaves to enjoy the spa.
<<elseif _spaUtilization >= 0.5>>
It's busy in here. Slaves are relaxing in the warm water, splashing around or just floating. Here and there some of the more sex-starved are in the early stages of intercourse, but most prefer to take time off from it all.
<<elseif _spaUtilization > 0>>
It's sparsely populated; though the few slaves here have little company they like having the water to themselves.
<<elseif _DL / $spa > 0.5>>
It's busy in here. Slaves are relaxing in the warm water, splashing around or just floating. Here and there some of the more sex-starved are in the early stages of intercourse, but most prefer to take time off from it all.
<<elseif _DL > 0>>
It's sparsely populated; though the few slaves here have little company they like having the water to themselves.
<<elseif _S.Attendant>>
<<setLocalPronouns _S.Attendant>>
_S.Attendant.slaveName is alone here, and has nothing to do but keep the place (and $his own soft, wet body) spotlessly clean.
<<else>>
It's empty and quiet.
<</if>>
<<if _DL == 0 && !_S.Attendant>>
<div class="choices" style="font-style:normal">
[[Decommission the Spa|Main][$spa = 0, $spaDecoration = "standard", $spaUpgrade = 0, $spaFix = 0]]
</div>
<</if>>
</p>
<div>
<<set _Tmult0 = Math.trunc($spa*1000*$upgradeMultiplierArcology)>>
_spaNameCaps can house $spa slaves while they recuperate here. There <<if _DL == 1>>is<<else>>are<</if>> currently _DL slave<<if _DL != 1>>s<</if>> recuperating in $spaName.
<div class="choices">
[[Expand the spa|Spa][cashX(forceNeg(_Tmult0), "capEx"), $spa += 5]]
<span class="note">
Costs <<print cashFormat(_Tmult0)>>
</span>
</div>
<div class="choices">
<<if _DL > 0>>
<<includeDOM removeFacilityWorkers("spa", "rest", "rest")>>
<</if>>
</div>
</div>
<div>
<<if $spaUpgrade == 1>>
_spaNameCaps has been upgraded with state of the art temperature treatment options, from hot and cold mineral water pools to baking saunas and dense steam rooms.
<<else>>
<<set _Tmult1 = Math.trunc($spa*1000*$upgradeMultiplierArcology)>>
_spaNameCaps is a standard spa.
<div class="choices">
[[Upgrade the spa with saunas, steam rooms, and mineral water baths|Spa][cashX(forceNeg(_Tmult1), "capEx"), $spaUpgrade = 1]]
<span class="note">
Costs <<print cashFormat(_Tmult1)>>
</span>
</div>
<</if>>
</div>
<div>
<<if _S.Attendant>>
<<setLocalPronouns _S.Attendant>>
<<if $spaFix == 2>>
_S.Attendant.slaveName is focusing only on the health and wellness of the slaves under $his care, obeying your orders to avoid attempting to right mental flaws.
<div class="choices">
[["Order " + $him + " to only fix mindbroken slaves"|Spa][$spaFix = 1]] |
[["Let " + $him + " tend as " + $he + " sees fit"|Spa][$spaFix = 0]]
</div>
<<elseif $spaFix == 1>>
_S.Attendant.slaveName is focusing on the health and wellness of the slaves under $his care, as well as trying to bring mindbroken slaves back, while ignoring any mental hang-ups a slave may have.
<div class="choices">
[["Order " + $him + " to not fix flaws"|Spa][$spaFix = 2]] |
[["Let " + $him + " tend as " + $he + " sees fit"|Spa][$spaFix = 0]]
</div>
<<else>>
_S.Attendant.slaveName is not following any special orders and is tending to your slaves as $he sees fit.
<div class="choices">
[["Order " + $him + " to not fix any flaws"|Spa][$spaFix = 2]] |
[["Order " + $him + " to only fix mindbroken slaves"|Spa][$spaFix = 1]]
</div>
<</if>>
<</if>>
</div>
<p>
<<includeDOM App.UI.SlaveList.stdFacilityPage(App.Entity.facilities.spa, true)>>
</p>
<p>
Rename $spaName: <<textbox "$spaName" $spaName "Spa">>
<span class="note">
Use a noun or similar short phrase
</span>
</p>
<<run App.UI.SlaveList.ScrollPosition.restore()>>
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