Skip to content
Snippets Groups Projects
Commit 2ce0aa83 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'endweek' into 'pregmod-master'

End week saving warning

Closes #3205

See merge request pregmodfan/fc-pregmod!9676
parents e4ea2893 191f5c56
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ Config.passages.descriptions = function() { ...@@ -12,7 +12,7 @@ Config.passages.descriptions = function() {
// no arcology yet... // no arcology yet...
return "New Game Setup, Week 0"; return "New Game Setup, Week 0";
} else { } else {
return sv.arcologies[0].name + ", Week " + sv.week + ", " + sv.slaves.length + " Slaves, " + cashFormat(sv.cash); return `${V.endweekFlag ? "EW! " : ""}${sv.arcologies[0].name}, Week ${sv.week}, ${sv.slaves.length} Slaves, ${cashFormat(sv.cash)}`;
} }
}; };
......
...@@ -3,6 +3,9 @@ globalThis.endWeek = (function() { ...@@ -3,6 +3,9 @@ globalThis.endWeek = (function() {
// purge SugarCube's expired state cache // purge SugarCube's expired state cache
State.expired.length = 0; State.expired.length = 0;
// set end week flag
V.endweekFlag = true;
// report setup // report setup
setupLastWeeksCash(); setupLastWeeksCash();
setupLastWeeksRep(); setupLastWeeksRep();
......
...@@ -38,5 +38,9 @@ App.EndWeek.resetGlobals = function() { ...@@ -38,5 +38,9 @@ App.EndWeek.resetGlobals = function() {
// Strings Memory varies. // Strings Memory varies.
V.desc = ""; V.desc = "";
V.event = ""; V.event = "";
// delete endweek flag
delete V.endweekFlag;
// Done with zeroing out, what should be for the most part Temps // Done with zeroing out, what should be for the most part Temps
}; };
...@@ -22,6 +22,13 @@ App.EventHandlers = function() { ...@@ -22,6 +22,13 @@ App.EventHandlers = function() {
* @param {TwineSugarCube.SaveObject} save * @param {TwineSugarCube.SaveObject} save
*/ */
function onSave(save) { function onSave(save) {
if (V.endweekFlag) {
$(document).one(':dialogclosed', () => {
Dialog.setup("Saving during End Week");
Dialog.append("<p>Saves created during End Week should <span class='warning bold'>ONLY</span> be loaded in the <span class='bold'>SAME</span> game version.</p><p>Please save on <span class='bold'>Main</span> or <span class='bold'>Options</span> if you plan on upgrading your game.</p>");
Dialog.open();
});
}
} }
function storyReady() { function storyReady() {
......
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