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

distribute evenly, and caps for standard

parent 40050f17
No related branches found
No related tags found
1 merge request!8436Fs pulldown
......@@ -82,7 +82,7 @@ App.UI.facilityRedecoration = function() {
}
select.append(choice);
}
const choice = App.UI.DOM.makeElement("option", "standard", "indent");
const choice = App.UI.DOM.makeElement("option", "Standard", "indent");
if (V[variable] === "standard") {
choice.selected = true;
}
......@@ -90,10 +90,12 @@ App.UI.facilityRedecoration = function() {
select.onchange = () => {
const O = select.options[select.selectedIndex];
if (O.value !== "standard") {
if (O.value !== "Standard") {
cashX(-5000, "capEx");
V[variable] = O.value;
} else {
V[variable] = "standard";
}
V[variable] = O.value;
App.UI.reload();
};
select.append(option);
......@@ -106,7 +108,7 @@ App.UI.facilityRedecoration = function() {
for (const decorationName of decorationNames) {
App.UI.DOM.appendNewElement("option", select, decorationName, "indent");
}
App.UI.DOM.appendNewElement("option", select, "standard", "indent");
App.UI.DOM.appendNewElement("option", select, "Standard", "indent");
App.UI.DOM.appendNewElement("option", select, "Distribute Evenly", "indent");
......@@ -115,17 +117,21 @@ App.UI.facilityRedecoration = function() {
if (O.value === "Distribute Evenly") {
let i = 0;
for (const decoration of activeFacilities.values()) {
if (O.value !== "standard") {
cashX(-5000, "capEx");
cashX(-5000, "capEx");
V[decoration] = decorationNames[i];
i++;
if (i >= decorationNames.length) {
i = 0;
}
V[decoration] = O.value;
}
} else {
for (const decoration of activeFacilities.values()) {
if (O.value !== "standard") {
if (O.value !== "Standard") {
cashX(-5000, "capEx");
V[decoration] = O.value;
} else {
V[decoration] = "standard";
}
V[decoration] = O.value;
}
}
......
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