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

fixes

parent 83bff39b
No related branches found
No related tags found
1 merge request!8402Pc body intro to js and options system
App.Data.player = { App.Data.player = {
refreshmentType: new Map([ // Value is stored in player object as the index of this array: If V.PC.refreshmentType === 0, we should display "Smoked".
[0, `Smoked`], refreshmentType: [
[1, `Drank`], `Smoked`,
[2, `Eaten`], `Drank`,
[3, `Snorted`], `Eaten`,
[4, `Injected`], `Snorted`,
[5, `Popped`], `Injected`,
[6, `Dissolved orally`], `Popped`,
]) `Dissolved orally`,
]
}; };
...@@ -146,8 +146,6 @@ App.Intro.PCBodyIntro = function() { ...@@ -146,8 +146,6 @@ App.Intro.PCBodyIntro = function() {
function nameIndulgence() { function nameIndulgence() {
const el = document.createElement("p"); const el = document.createElement("p");
const options = new App.UI.OptionsGroup(); 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"]); App.UI.DOM.appendNewElement("div", el, `What is your name and alternate indulgence?`, ["intro", "question"]);
...@@ -184,8 +182,8 @@ App.Intro.PCBodyIntro = function() { ...@@ -184,8 +182,8 @@ App.Intro.PCBodyIntro = function() {
); );
options.addOption(`Preferred method of consumption:`, "refreshmentType", V.PC) options.addOption(`Preferred method of consumption:`, "refreshmentType", V.PC)
.addValueList(App.Data.player.refreshmentType) .addValueList(Array.from(App.Data.player.refreshmentType, (v, i) => [v, i]))
.comment(`Flavor only; no mechanical effect. If entering a custom refreshment, please assign proper usage.`); .addComment(`Flavor only; no mechanical effect. If entering a custom refreshment, please assign proper usage.`);
el.append(options.render()); el.append(options.render());
......
...@@ -285,6 +285,7 @@ App.UI.OptionsGroup = (function() { ...@@ -285,6 +285,7 @@ App.UI.OptionsGroup = (function() {
} else { } else {
option.object[option.property] = Number(O.value); option.object[option.property] = Number(O.value);
} }
App.UI.reload();
}; };
buttonGroup.append(select); buttonGroup.append(select);
} }
......
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