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

progress

parent 7eaf4bb1
No related branches found
No related tags found
1 merge request!8402Pc body intro to js and options system
App.Data.player = {
refreshmentType: new Map([
[0, `Smoked`],
[1, `Drank`],
[2, `Eaten`],
[3, `Snorted`],
[4, `Injected`],
[5, `Popped`],
[6, `Dissolved orally`],
])
};
......@@ -10,12 +10,13 @@ App.Intro.PCBodyIntro = function() {
r.push(App.UI.DOM.makeElement("span", `what's under your business attire?`, ["intro", "question"]));
App.Events.addNode(el, r, "p");
el.append(PCBody());
el.append(PCAge());
el.append(body());
el.append(age());
el.append(nameIndulgence());
return el;
function PCBody() {
function body() {
const el = document.createElement("p");
const options = new App.UI.OptionsGroup();
let r = [];
......@@ -117,7 +118,7 @@ App.Intro.PCBodyIntro = function() {
}
}
function PCAge() {
function age() {
const el = document.createElement("p");
const options = new App.UI.OptionsGroup();
......@@ -141,64 +142,68 @@ App.Intro.PCBodyIntro = function() {
return el;
}
};
/*
<p>
<div class="intro question">
r.push(`What is your name and alternate indulgence?`);
</div>
<div>
r.push(`Name your character: `);
<<textbox "V.PC.slaveName" V.PC.slaveName "PC Body Intro">>
r.push(` (surname)`);
function nameIndulgence() {
const el = document.createElement("p");
const options = new App.UI.OptionsGroup();
let r = [];
let comment;
App.UI.DOM.appendNewElement("div", el, `What is your name and alternate indulgence?`, ["intro", "question"]);
options.addOption(`Name your character: `, "slaveName", V.PC).showTextBox().addComment(`As with all text boxes in FC, press the enter key to commit your changes.`);
options.addOption(`Surname: `, "slaveSurname", V.PC).showTextBox();
if (V.PC.slaveSurname) {
<<textbox "V.PC.slaveSurname" V.PC.slaveSurname "PC Body Intro">>
<<link "Go by a single name">>
V.PC.slaveSurname = 0, V.PC.birthSurname = "";
<<goto "PC Body Intro">>
<</link>>
} else {
<<textbox "V.PC.slaveSurname" "" "PC Body Intro">>
options.addOption("Go by a single name")
.customButton(
"Apply",
() => {
V.PC.slaveSurname = 0;
V.PC.birthSurname = "";
},
"PC Body Intro"
);
}
</div>
<div class="indent note">
r.push(`As with all text boxes in FC, press the enter key to commit your changes.`);
</div>
<div>
r.push(`Preferred refreshment: `);
<<textbox "V.PC.refreshment" V.PC.refreshment "PC Body Intro">>
r.push(` [[Cigars|PC Body Intro][${V.PC.refreshment} = "cigar",V.PC.refreshmentType = 0]] | [[Whiskey|PC Body Intro][V.PC.refreshment = "whiskey",V.PC.refreshmentType = 1]]`);
</div>
<div>
r.push(`Preferred method of consumption:`);
<span style="font-weight:Bold">
if (V.PC.refreshmentType === 0) {
r.push(`Smoked`);
} else if (V.PC.refreshmentType === 1) {
r.push(`Drank`);
} else if (V.PC.refreshmentType === 2) {
r.push(`Eaten`);
} else if (V.PC.refreshmentType === 3) {
r.push(`Snorted`);
} else if (V.PC.refreshmentType === 4) {
r.push(`Injected`);
} else if (V.PC.refreshmentType === 5) {
r.push(`Popped`);
} else if (V.PC.refreshmentType === 6) {
r.push(`Dissolved orally`);
}</span>.
</div>
[[Smoked|PC Body Intro][V.PC.refreshmentType = 0]] | [[Drank|PC Body Intro][V.PC.refreshmentType = 1]] | [[Eaten|PC Body Intro][V.PC.refreshmentType = 2]] | [[Snorted|PC Body Intro][V.PC.refreshmentType = 3]] | [[Injected|PC Body Intro][V.PC.refreshmentType = 4]] | [[Popped|PC Body Intro][V.PC.refreshmentType = 5]] | [[Orally Dissolved|PC Body Intro][V.PC.refreshmentType = 6]]
<div class="indent note">
r.push(`Flavor only; no mechanical effect. If entering a custom refreshment, please assign proper usage.`);
if (V.PC.refreshmentType === 0) {"Smoke" must fit into the following sentence: "I smoked a V.PC.refreshment" to fit events properly
} else if (V.PC.refreshmentType === 5) {"Popped" must fit into the following sentence: "I shook the bottle of V.PC.refreshment" to fit events properly
} else if (V.PC.refreshmentType === 6) {"Orally Dissolved" must fit into the following sentence: "I placed a tab of V.PC.refreshment under my tongue" to fit events properly
options.addOption(`Preferred refreshment:`, "refreshment", V.PC).showTextBox()
.customButton(
"Cigars",
() => {
V.PC.refreshment = "cigar";
V.PC.refreshmentType = 0;
},
"PC Body Intro"
)
.customButton(
"Whiskey",
() => {
V.PC.refreshment = "whiskey";
V.PC.refreshmentType = 1;
},
"PC Body Intro"
);
options.addOption(`Preferred method of consumption:`, "refreshmentType", V.PC)
.addValueList(App.Data.player.refreshmentType)
.comment(`Flavor only; no mechanical effect. If entering a custom refreshment, please assign proper usage.`);
el.append(options.render());
if (V.PC.refreshmentType === 0) {
App.UI.DOM.appendNewElement("div", el, `"Smoke" must fit into the following sentence: "I smoked a ${V.PC.refreshment}" to fit events properly`);
} else if (V.PC.refreshmentType === 5) {
App.UI.DOM.appendNewElement("div", el, `"Popped" must fit into the following sentence: "I shook the bottle of ${V.PC.refreshment}" to fit events properly`);
} else if (V.PC.refreshmentType === 6) {
App.UI.DOM.appendNewElement("div", el, `"Orally Dissolved" must fit into the following sentence: "I placed a tab of ${V.PC.refreshment} under my tongue" to fit events properly`);
}
</div>
</p>
return el;
}
};
/*
<p>
if (V.PC.vagina !== -1) {
......
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