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

do this math just once

parent 2f5f2f34
No related branches found
No related tags found
No related merge requests found
......@@ -44,29 +44,30 @@ App.EndWeek.FSDevelopments = function() {
r.push(`Your <span class="yellowgreen">societal spending</span> helps forward your goals for the arcology's future.`);
broadProgress += Math.trunc(V.FSSpending / (1000 - (500 * arc.FSEdoRevivalistLaw) - (250 * arc.FSArabianRevivalistLaw)));
}
const weeksOfFCTV = V.week - V.FCTV.weekEnabled;
if (V.FCTV.receiver === 3) {
r.push(`Your customized <span class="yellowgreen">FCTV programming</span> strongly influences your citizens, greatly helping define your arcology's culture.`);
if ((V.week - V.FCTV.weekEnabled) > 29) {
if (weeksOfFCTV > 29) {
broadProgress += 3;
} else if ((V.week - V.FCTV.weekEnabled) > 19) {
} else if (weeksOfFCTV > 19) {
broadProgress += 2;
} else if ((V.week - V.FCTV.weekEnabled) > 4) {
} else if (weeksOfFCTV > 4) {
broadProgress += 1;
}
} else if (V.FCTV.receiver === 2) {
r.push(`Your customized <span class="yellowgreen">FCTV programming</span> influences your citizens, helping define your arcology's culture.`);
if ((V.week - V.FCTV.weekEnabled) > 34) {
if (weeksOfFCTV > 34) {
broadProgress += 3;
} else if ((V.week - V.FCTV.weekEnabled) > 23) {
} else if (weeksOfFCTV > 23) {
broadProgress += 2;
} else if ((V.week - V.FCTV.weekEnabled) > 8) {
} else if (weeksOfFCTV > 8) {
broadProgress += 1;
}
} else if (V.FCTV.receiver === 1) {
r.push(`Your customized <span class="yellowgreen">FCTV programming</span> influences a small number of your citizens, slightly helping define your arcology's culture.`);
if ((V.week - V.FCTV.weekEnabled) > 39) {
if (weeksOfFCTV > 39) {
broadProgress += 2;
} else if ((V.week - V.FCTV.weekEnabled) > 24) {
} else if (weeksOfFCTV > 24) {
broadProgress += 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