diff --git a/src/data/backwardsCompatibility/backwardsCompatibility.js b/src/data/backwardsCompatibility/backwardsCompatibility.js index bb258db12d9a57cf4cc1fd68bddb0751b9173788..434d372d8b6f463e0ec283c5fbcd8c6b112e862d 100644 --- a/src/data/backwardsCompatibility/backwardsCompatibility.js +++ b/src/data/backwardsCompatibility/backwardsCompatibility.js @@ -1144,8 +1144,8 @@ App.Update.globalVariables = function(node) { } // Slave death - if (!isNaN(V.slaveDeath)) { - V.slaveDeath = new Map() + if (!(V.slaveDeath instanceof Map)) { + V.slaveDeath = new Map(); } FacilityDatatypeCleanup(); @@ -1554,26 +1554,26 @@ App.Update.RAassistantData = function(node) { App.Update.arcologyLocation = function(node) { if (V.continent === "Europe") { const prompt = App.UI.DOM.appendNewElement('div', node); -prompt.id = "location-prompt"; // so we can replace the whole prompt later after the user clicks a link -V.continent = "Central Europe"; // picks a valid default right now in case the user doesn't interact -const altLocations = [ - "Southern Europe", - "Western Europe", - "Eastern Europe", - "Scandinavia", - "Central Europe" -]; -function makeLinkForLocation(l) { - return App.UI.DOM.link(l, () => { - V.continent = l; - App.UI.DOM.replace("#location-prompt", `Arcology location specified at ${l}.`); - }); -}; -prompt.append(`General Arcology location detected: Europe. Please specify exact location of arcology. Currently selected: ${V.continent}. Other Possibilities: `, - App.UI.DOM.generateLinksStrip(altLocations.map(l => makeLinkForLocation(l)))); - } - else { - node.append(`Done!`); } + prompt.id = "location-prompt"; // so we can replace the whole prompt later after the user clicks a link + V.continent = "Central Europe"; // picks a valid default right now in case the user doesn't interact + const altLocations = [ + "Southern Europe", + "Western Europe", + "Eastern Europe", + "Scandinavia", + "Central Europe" + ]; + prompt.append(`General Arcology location detected: Europe. Please specify exact location of arcology. Currently selected: ${V.continent}. Other Possibilities: `, + App.UI.DOM.generateLinksStrip(altLocations.map(l => makeLinkForLocation(l)))); + } else { + node.append(`Done!`); + } + function makeLinkForLocation(l) { + return App.UI.DOM.link(l, () => { + V.continent = l; + App.UI.DOM.replace("#location-prompt", `Arcology location specified at ${l}.`); + }); + } }; App.Update.oldVersions = function(node) {