Merge pull request #1256 from danielyxie/dev

Fix import not working
This commit is contained in:
hydroflame 2021-09-15 10:56:39 -04:00 committed by GitHub
commit 206edd8df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 28 additions and 204 deletions

@ -81,7 +81,7 @@
flex-flow: column; flex-flow: column;
background-color: gray; background-color: gray;
width: 50%; width: 50%;
position: absolute; position: fixed;
left: 50%; left: 50%;
top: 40%; top: 40%;
margin: -10% 0 0 -25%; margin: -10% 0 0 -25%;

File diff suppressed because one or more lines are too long

@ -1,2 +1,2 @@
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={2:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;u.push([1047,0]),o()}({1047:function(n,t,o){"use strict";o.r(t);o(1048),o(1050),o(1052),o(1054),o(1056),o(1058),o(1060),o(1062),o(1064),o(1066),o(1068),o(1070),o(1072),o(1074),o(1076),o(1078),o(1080),o(1082),o(1084),o(1086),o(1088),o(1090),o(1092),o(1094),o(1096),o(1098),o(1100),o(1102),o(1104),o(1106),o(1108)},1050:function(n,t,o){},1052:function(n,t,o){},1054:function(n,t,o){},1056:function(n,t,o){},1058:function(n,t,o){},1060:function(n,t,o){},1062:function(n,t,o){},1064:function(n,t,o){},1066:function(n,t,o){},1068:function(n,t,o){},1070:function(n,t,o){},1072:function(n,t,o){},1074:function(n,t,o){},1076:function(n,t,o){},1078:function(n,t,o){},1080:function(n,t,o){},1082:function(n,t,o){},1084:function(n,t,o){},1086:function(n,t,o){},1088:function(n,t,o){},1090:function(n,t,o){},1092:function(n,t,o){},1094:function(n,t,o){},1096:function(n,t,o){},1098:function(n,t,o){},1100:function(n,t,o){},1102:function(n,t,o){},1104:function(n,t,o){},1106:function(n,t,o){},1108:function(n,t,o){}}); !function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],a=0,s=[];a<f.length;a++)i=f[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&s.push(r[i][0]),r[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,l||[]),o()}function o(){for(var n,t=0;t<u.length;t++){for(var o=u[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==r[c]&&(e=!1)}e&&(u.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},r={2:0},u=[];function i(t){if(e[t])return e[t].exports;var o=e[t]={i:t,l:!1,exports:{}};return n[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=n,i.c=e,i.d=function(n,t,o){i.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:o})},i.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(o,e,function(t){return n[t]}.bind(null,e));return o},i.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return i.d(t,"a",t),t},i.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},i.p="";var f=window.webpackJsonp=window.webpackJsonp||[],c=f.push.bind(f);f.push=t,f=f.slice();for(var l=0;l<f.length;l++)t(f[l]);var p=c;u.push([1045,0]),o()}({1045:function(n,t,o){"use strict";o.r(t);o(1046),o(1048),o(1050),o(1052),o(1054),o(1056),o(1058),o(1060),o(1062),o(1064),o(1066),o(1068),o(1070),o(1072),o(1074),o(1076),o(1078),o(1080),o(1082),o(1084),o(1086),o(1088),o(1090),o(1092),o(1094),o(1096),o(1098),o(1100),o(1102),o(1104),o(1106)},1048:function(n,t,o){},1050:function(n,t,o){},1052:function(n,t,o){},1054:function(n,t,o){},1056:function(n,t,o){},1058:function(n,t,o){},1060:function(n,t,o){},1062:function(n,t,o){},1064:function(n,t,o){},1066:function(n,t,o){},1068:function(n,t,o){},1070:function(n,t,o){},1072:function(n,t,o){},1074:function(n,t,o){},1076:function(n,t,o){},1078:function(n,t,o){},1080:function(n,t,o){},1082:function(n,t,o){},1084:function(n,t,o){},1086:function(n,t,o){},1088:function(n,t,o){},1090:function(n,t,o){},1092:function(n,t,o){},1094:function(n,t,o){},1096:function(n,t,o){},1098:function(n,t,o){},1100:function(n,t,o){},1102:function(n,t,o){},1104:function(n,t,o){},1106:function(n,t,o){}});
//# sourceMappingURL=engineStyle.bundle.js.map //# sourceMappingURL=engineStyle.bundle.js.map

@ -2439,7 +2439,7 @@ input[type="checkbox"] {
flex-flow: column; flex-flow: column;
background-color: gray; background-color: gray;
width: 50%; width: 50%;
position: absolute; position: fixed;
left: 50%; left: 50%;
top: 40%; top: 40%;
margin: -10% 0 0 -25%; margin: -10% 0 0 -25%;

28
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -106,6 +106,8 @@
</div> </div>
</div> </div>
<input type="file" id="import-game-file-selector" name="file"/>
<!-- Loader (Loading screen) --> <!-- Loader (Loading screen) -->
<div id="loader" class="loaderoverlay"> <div id="loader" class="loaderoverlay">
<div class="loaderspinner"></div> <div class="loaderspinner"></div>

@ -80,6 +80,11 @@ export class Warehouse {
if (params.corp && params.industry) { if (params.corp && params.industry) {
this.updateSize(params.corp, params.industry); this.updateSize(params.corp, params.industry);
} }
// Default smart supply to being enabled if the upgrade is unlocked
if (params.corp?.unlockUpgrades[1]) {
this.smartSupplyEnabled = true;
}
} }
// Re-calculate how much space is being used by this Warehouse // Re-calculate how much space is being used by this Warehouse

@ -61,7 +61,6 @@ import { Sleeve } from "./PersonObjects/Sleeve/Sleeve";
import { createStatusText } from "./ui/createStatusText"; import { createStatusText } from "./ui/createStatusText";
import { CharacterInfo } from "./ui/CharacterInfo"; import { CharacterInfo } from "./ui/CharacterInfo";
import { Page, routing } from "./ui/navigationTracking"; import { Page, routing } from "./ui/navigationTracking";
import { setSettingsLabels } from "./ui/setSettingsLabels";
import { Money } from "./ui/React/Money"; import { Money } from "./ui/React/Money";
import { Hashes } from "./ui/React/Hashes"; import { Hashes } from "./ui/React/Hashes";
import { Reputation } from "./ui/React/Reputation"; import { Reputation } from "./ui/React/Reputation";
@ -72,7 +71,6 @@ import { MainMenuLinks } from "./ui/MainMenu/Links";
import { createPopup } from "./ui/React/createPopup"; import { createPopup } from "./ui/React/createPopup";
import { dialogBoxCreate } from "../utils/DialogBox"; import { dialogBoxCreate } from "../utils/DialogBox";
import { gameOptionsBoxClose, gameOptionsBoxOpen } from "../utils/GameOptions";
import { exceptionAlert } from "../utils/helpers/exceptionAlert"; import { exceptionAlert } from "../utils/helpers/exceptionAlert";
import { removeLoadingScreen } from "../utils/uiHelpers/removeLoadingScreen"; import { removeLoadingScreen } from "../utils/uiHelpers/removeLoadingScreen";
import "./Exploits/tampering"; import "./Exploits/tampering";
@ -857,7 +855,6 @@ const Engine = {
ReactDOM.render(<SidebarRoot engine={this} player={Player} />, document.getElementById("sidebar")); ReactDOM.render(<SidebarRoot engine={this} player={Player} />, document.getElementById("sidebar"));
// Initialize labels on game settings // Initialize labels on game settings
setSettingsLabels();
Terminal.resetTerminalInput(); Terminal.resetTerminalInput();
}, },

@ -113,6 +113,8 @@
</div> </div>
</div> </div>
<input type="file" id="import-game-file-selector" name="file" />
<!-- Loader (Loading screen) --> <!-- Loader (Loading screen) -->
<div id="loader" class="loaderoverlay"> <div id="loader" class="loaderoverlay">
<div class="loaderspinner"></div> <div class="loaderspinner"></div>

@ -1,132 +0,0 @@
import { Engine } from "../engine";
import { Settings } from "../Settings/Settings";
import { numeralWrapper } from "./numeralFormat";
function setSettingsLabels() {
function setAutosaveLabel(elem) {
if (Settings.AutosaveInterval === 0) {
elem.innerHTML = `disabled`;
} else {
elem.innerHTML = `every ${Settings.AutosaveInterval}s`;
}
}
const nsExecTime = document.getElementById("settingsNSExecTimeRangeValLabel");
const nsLogLimit = document.getElementById("settingsNSLogRangeValLabel");
const nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
const suppressMsgs = document.getElementById("settingsSuppressMessages");
const suppressFactionInv = document.getElementById("settingsSuppressFactionInvites");
const suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
const suppressBuyAugmentationConfirmation = document.getElementById("settingsSuppressBuyAugmentationConfirmation");
const suppressHospitalizationPopup = document.getElementById("settingsSuppressHospitalizationPopup");
const suppressBladeburnerPopup = document.getElementById("settingsSuppressBladeburnerPopup");
const autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
const disableHotkeys = document.getElementById("settingsDisableHotkeys");
const disableASCIIArt = document.getElementById("settingsDisableASCIIArt");
const disableTextEffects = document.getElementById("settingsDisableTextEffects");
const locale = document.getElementById("settingsLocale");
//Initialize values on labels
nsExecTime.innerHTML = Settings.CodeInstructionRunTime + "ms";
nsLogLimit.innerHTML = Settings.MaxLogCapacity;
nsPortLimit.innerHTML = Settings.MaxPortCapacity;
suppressMsgs.checked = Settings.SuppressMessages;
suppressFactionInv.checked = Settings.SuppressFactionInvites;
suppressTravelConfirmation.checked = Settings.SuppressTravelConfirmation;
suppressBuyAugmentationConfirmation.checked = Settings.SuppressBuyAugmentationConfirmation;
suppressHospitalizationPopup.checked = Settings.SuppressHospitalizationPopup;
suppressBladeburnerPopup.checked = Settings.SuppressBladeburnerPopup;
setAutosaveLabel(autosaveInterval);
disableHotkeys.checked = Settings.DisableHotkeys;
disableASCIIArt.checked = Settings.CityListView;
disableTextEffects.checked = Settings.DisableTextEffects;
locale.value = Settings.Locale;
numeralWrapper.updateLocale(Settings.Locale); //Initialize locale
//Set handlers for when input changes for sliders
const nsExecTimeInput = document.getElementById("settingsNSExecTimeRangeVal");
const nsLogRangeInput = document.getElementById("settingsNSLogRangeVal");
const nsPortRangeInput = document.getElementById("settingsNSPortRangeVal");
const nsAutosaveIntervalInput = document.getElementById("settingsAutosaveIntervalVal");
nsExecTimeInput.value = Settings.CodeInstructionRunTime;
nsLogRangeInput.value = Settings.MaxLogCapacity;
nsPortRangeInput.value = Settings.MaxPortCapacity;
nsAutosaveIntervalInput.value = Settings.AutosaveInterval;
nsExecTimeInput.oninput = function () {
nsExecTime.innerHTML = this.value + "ms";
Settings.CodeInstructionRunTime = this.value;
};
nsLogRangeInput.oninput = function () {
nsLogLimit.innerHTML = this.value;
Settings.MaxLogCapacity = this.value;
};
nsPortRangeInput.oninput = function () {
nsPortLimit.innerHTML = this.value;
Settings.MaxPortCapacity = this.value;
};
nsAutosaveIntervalInput.oninput = function () {
Settings.AutosaveInterval = Number(this.value);
setAutosaveLabel(autosaveInterval);
if (Number(this.value) === 0) {
Engine.Counters.autoSaveCounter = Infinity;
} else {
Engine.Counters.autoSaveCounter = Number(this.value) * 5;
}
};
//Set handlers for when settings change on checkboxes
suppressMsgs.onclick = function () {
Settings.SuppressMessages = this.checked;
};
suppressFactionInv.onclick = function () {
Settings.SuppressFactionInvites = this.checked;
};
suppressTravelConfirmation.onclick = function () {
Settings.SuppressTravelConfirmation = this.checked;
};
suppressBuyAugmentationConfirmation.onclick = function () {
Settings.SuppressBuyAugmentationConfirmation = this.checked;
};
suppressHospitalizationPopup.onclick = function () {
Settings.SuppressHospitalizationPopup = this.checked;
};
suppressBladeburnerPopup.onclick = function () {
Settings.SuppressBladeburnerPopup = this.checked;
};
disableHotkeys.onclick = function () {
Settings.DisableHotkeys = this.checked;
};
disableASCIIArt.onclick = function () {
Settings.DisableASCIIArt = this.checked;
};
disableTextEffects.onclick = function () {
Settings.DisableTextEffects = this.checked;
};
//Locale selector
locale.onchange = function () {
if (!numeralWrapper.updateLocale(locale.value)) {
console.warn(`Invalid locale for numeral: ${locale.value}`);
let defaultValue = "en";
Settings.Locale = defaultValue;
locale.value = defaultValue;
return;
}
Settings.Locale = locale.value;
};
}
export { setSettingsLabels };

@ -1,50 +0,0 @@
/* GameOptions.js */
import { Player } from "../src/Player";
//Close box when clicking outside
$(document).click(function (event) {
if (gameOptionsOpened) {
if ($(event.target).closest(".game-options-box").get(0) == null) {
gameOptionsBoxClose();
}
}
});
var gameOptionsOpened = false;
function gameOptionsBoxInit() {
return;
//Menu link button
document.getElementById("options-menu-link").addEventListener("click", function () {
gameOptionsBoxOpen();
return false;
});
//Close button
var closeButton = document.getElementById("game-options-close-button");
closeButton.addEventListener("click", function () {
gameOptionsBoxClose();
return false;
});
}
document.addEventListener("DOMContentLoaded", gameOptionsBoxInit, false);
function gameOptionsBoxClose() {
gameOptionsOpened = false;
var box = document.getElementById("game-options-container");
box.style.display = "none";
}
function gameOptionsBoxOpen() {
var box = document.getElementById("game-options-container");
box.style.display = "flex";
// special exception for bladeburner popup because it's only visible later.
document.getElementById("settingsSuppressBladeburnerPopup").closest("fieldset").style.display =
Player.canAccessBladeburner() ? "block" : "none";
setTimeout(function () {
gameOptionsOpened = true;
}, 500);
}
export { gameOptionsBoxOpen, gameOptionsBoxClose };