mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
v0.51.9
This commit is contained in:
parent
218a9dd250
commit
b28f607056
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/engineStyle.bundle.js
vendored
2
dist/engineStyle.bundle.js
vendored
@ -1,2 +1,2 @@
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];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 a=c;r.push([841,0]),o()}({780:function(n,t,o){},782:function(n,t,o){},784:function(n,t,o){},786:function(n,t,o){},788:function(n,t,o){},790:function(n,t,o){},792:function(n,t,o){},794:function(n,t,o){},796:function(n,t,o){},798:function(n,t,o){},800:function(n,t,o){},802:function(n,t,o){},804:function(n,t,o){},806:function(n,t,o){},808:function(n,t,o){},810:function(n,t,o){},812:function(n,t,o){},814:function(n,t,o){},816:function(n,t,o){},818:function(n,t,o){},820:function(n,t,o){},822:function(n,t,o){},824:function(n,t,o){},826:function(n,t,o){},828:function(n,t,o){},830:function(n,t,o){},832:function(n,t,o){},834:function(n,t,o){},836:function(n,t,o){},838:function(n,t,o){},841:function(n,t,o){"use strict";o.r(t);o(840),o(838),o(836),o(834),o(832),o(830),o(828),o(826),o(824),o(822),o(820),o(818),o(816),o(814),o(812),o(810),o(808),o(806),o(804),o(802),o(800),o(798),o(796),o(794),o(792),o(790),o(788),o(786),o(784),o(782),o(780)}});
|
||||
!function(n){function t(t){for(var e,i,f=t[0],c=t[1],l=t[2],p=0,s=[];p<f.length;p++)i=f[p],u[i]&&s.push(u[i][0]),u[i]=0;for(e in c)Object.prototype.hasOwnProperty.call(c,e)&&(n[e]=c[e]);for(a&&a(t);s.length;)s.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var n,t=0;t<r.length;t++){for(var o=r[t],e=!0,f=1;f<o.length;f++){var c=o[f];0!==u[c]&&(e=!1)}e&&(r.splice(t--,1),n=i(i.s=o[0]))}return n}var e={},u={1:0},r=[];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 a=c;r.push([842,0]),o()}({781:function(n,t,o){},783:function(n,t,o){},785:function(n,t,o){},787:function(n,t,o){},789:function(n,t,o){},791:function(n,t,o){},793:function(n,t,o){},795:function(n,t,o){},797:function(n,t,o){},799:function(n,t,o){},801:function(n,t,o){},803:function(n,t,o){},805:function(n,t,o){},807:function(n,t,o){},809:function(n,t,o){},811:function(n,t,o){},813:function(n,t,o){},815:function(n,t,o){},817:function(n,t,o){},819:function(n,t,o){},821:function(n,t,o){},823:function(n,t,o){},825:function(n,t,o){},827:function(n,t,o){},829:function(n,t,o){},831:function(n,t,o){},833:function(n,t,o){},835:function(n,t,o){},837:function(n,t,o){},839:function(n,t,o){},842:function(n,t,o){"use strict";o.r(t);o(841),o(839),o(837),o(835),o(833),o(831),o(829),o(827),o(825),o(823),o(821),o(819),o(817),o(815),o(813),o(811),o(809),o(807),o(805),o(803),o(801),o(799),o(797),o(795),o(793),o(791),o(789),o(787),o(785),o(783),o(781)}});
|
||||
//# sourceMappingURL=engineStyle.bundle.js.map
|
36
dist/vendor.bundle.js
vendored
36
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -3,6 +3,59 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.51.9 - 2021-05-17 offline progress and exports! (hydroflame)
|
||||
---------------------------------------------------------------
|
||||
|
||||
**Alias**
|
||||
|
||||
* several commands can be included in 1 alias. Recursive alias now work to
|
||||
a depth of 10. (@Dawe)
|
||||
|
||||
**Offline**
|
||||
|
||||
* Offline money gain has been reworked (it is more generous)
|
||||
* If you're not working anywhere and go offline the game will work for you
|
||||
at all your factions evenly.
|
||||
|
||||
**Export**
|
||||
|
||||
* Exporting now gives +1 favor to all joined factions every 24h.
|
||||
|
||||
**Corp**
|
||||
|
||||
* Self-fund with an invalid name no longer takes away 150b anyway.
|
||||
* Can no longer export negative amount
|
||||
|
||||
**Bladeburner**
|
||||
|
||||
* No longer waste overflowing time.
|
||||
|
||||
**Text Editors**
|
||||
|
||||
* All settings will now be saved and loaded correctly.
|
||||
|
||||
**Terminal**
|
||||
|
||||
* 'scan' now works for servers that are more than 21 character long.
|
||||
|
||||
**Misc.**
|
||||
|
||||
* ls now correctly lists all files.
|
||||
* importing auto save+reloads (@Dawe)
|
||||
* Fix a bug where .fconf could not be created
|
||||
* Fix formatting inconsistencies for some logs of netscript functions.
|
||||
* Fix a bug where Cashroot starter kit would appear as [object Object] in
|
||||
confirmation dialog.
|
||||
* Fix some ram not displayed as 0.00GB
|
||||
* Fix error message throw undefined variable error
|
||||
* City hall now has some generic text if you can't create a corp yet.
|
||||
* Deleting a file without extension now returns an appropriate error message.
|
||||
* Fixed an issue where bladeburner would miscalculate the cost of hospitalization.
|
||||
* It is now possible to suppress bladeburner "action stopped" popup.
|
||||
* Updated several dependencies (big who cares, I know)
|
||||
* ls no longer prints lingering newline.
|
||||
* Money earned/spent by sleeves is now tracked under Character>Money
|
||||
|
||||
|
||||
v0.51.8 - 2021-05-07 It was there all along (hydroflame)
|
||||
--------------------------------------------------------
|
||||
@ -60,8 +113,8 @@ v0.51.8 - 2021-05-07 It was there all along (hydroflame)
|
||||
* script income transfers to parent on death. This helps keep track of
|
||||
income for scripts that spawn short lived scripts.
|
||||
|
||||
v0.51.7 - 2021-04-28 n00dles
|
||||
----------------------------
|
||||
v0.51.7 - 2021-04-28 n00dles (hydroflame)
|
||||
-----------------------------------------
|
||||
|
||||
**Tutorial servers**
|
||||
|
||||
|
@ -66,7 +66,7 @@ documentation_title = '{0} Documentation'.format(project)
|
||||
# The short X.Y version.
|
||||
version = '0.51'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.51.8'
|
||||
release = '0.51.9'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
10
index.html
10
index.html
@ -506,6 +506,16 @@
|
||||
<input class="optionCheckbox" type="checkbox" name="settingsSuppressHospitalizationPopup" id="settingsSuppressHospitalizationPopup">
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress Bladeburner popups -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressBladeburnerPopup" class="tooltip">Suppress Bladeburner Popup:
|
||||
<span class="tooltiptext">
|
||||
If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.
|
||||
</span>
|
||||
</label>
|
||||
<input class="optionCheckbox" type="checkbox" name="settingsSuppressBladeburnerPopup" id="settingsSuppressBladeburnerPopup">
|
||||
</fieldset>
|
||||
|
||||
<!-- Disable Terminal and Navigation Shortcuts -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableHotkeys" class="tooltip">Disable Hotkeys:
|
||||
|
@ -126,5 +126,5 @@
|
||||
"watch": "webpack --watch --mode production",
|
||||
"watch:dev": "webpack --watch --mode development"
|
||||
},
|
||||
"version": "0.51.8"
|
||||
"version": "0.51.9"
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ export const CONSTANTS: IMap<any> = {
|
||||
|
||||
LatestUpdate:
|
||||
`
|
||||
v0.51.9 - 2021-05-07 untitled yet
|
||||
v0.51.9 - 2021-05-17 offline progress and exports!
|
||||
-------
|
||||
|
||||
Alias
|
||||
@ -251,6 +251,12 @@ export const CONSTANTS: IMap<any> = {
|
||||
Bladeburner
|
||||
* No longer waste overflowing time.
|
||||
|
||||
Text Editors
|
||||
* All settings will now be saved and loaded correctly.
|
||||
|
||||
Terminal
|
||||
* 'scan' now works for servers that are more than 21 character long.
|
||||
|
||||
Misc.
|
||||
* ls now correctly lists all files.
|
||||
* importing auto save+reloads (@Dawe)
|
||||
@ -264,7 +270,7 @@ export const CONSTANTS: IMap<any> = {
|
||||
* Deleting a file without extension now returns an appropriate error message.
|
||||
* Fixed an issue where bladeburner would miscalculate the cost of hospitalization.
|
||||
* It is now possible to suppress bladeburner "action stopped" popup.
|
||||
* Updated several dependencies (who cares, I know)
|
||||
* Updated several dependencies (big who cares, I know)
|
||||
* ls no longer prints lingering newline.
|
||||
* Money earned/spent by sleeves is now tracked under Character>Money
|
||||
`,
|
||||
|
@ -15,7 +15,7 @@ import { GetServerByHostname } from "./Server/ServerHelpers";
|
||||
import { hackWorldDaemon } from "./RedPill";
|
||||
import { StockMarket } from "./StockMarket/StockMarket";
|
||||
import { Stock } from "./StockMarket/Stock";
|
||||
import { Engine, indexedDb } from "./engine";
|
||||
import { Engine } from "./engine";
|
||||
import { saveObject } from "./SaveObject";
|
||||
|
||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||
@ -647,7 +647,7 @@ class DevMenuComponent extends Component {
|
||||
return () => {
|
||||
Player.lastUpdate -= time;
|
||||
Engine._lastUpdate -= time;
|
||||
saveObject.saveGame(indexedDb);
|
||||
saveObject.saveGame(Engine.indexedDb);
|
||||
setTimeout(() => location.reload(), 1000);
|
||||
};
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ export let LastExportBonus: number = 0;
|
||||
const bonusTimer = 24*60*60*1000; // 24h
|
||||
export function canGetBonus(): boolean {
|
||||
const now = (new Date()).getTime()
|
||||
console.log(now);
|
||||
console.log(LastExportBonus);
|
||||
console.log(now - LastExportBonus);
|
||||
if(now - LastExportBonus > bonusTimer) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import { loadStockMarket, StockMarket } from "./StockMarket/StockMarket";
|
||||
import { createStatusText } from "./ui/createStatusText";
|
||||
|
||||
import { setTimeoutRef } from "./utils/SetTimeoutRef";
|
||||
import { LastExportBonus } from "./ExportBonus";
|
||||
import * as ExportBonus from "./ExportBonus";
|
||||
|
||||
import { dialogBoxCreate } from "../utils/DialogBox";
|
||||
import { clearEventListeners } from "../utils/uiHelpers/clearEventListeners";
|
||||
@ -85,7 +85,7 @@ BitburnerSaveObject.prototype.getSaveString = function() {
|
||||
this.SettingsSave = JSON.stringify(Settings);
|
||||
this.FconfSettingsSave = JSON.stringify(FconfSettings);
|
||||
this.VersionSave = JSON.stringify(CONSTANTS.Version);
|
||||
this.LastExportBonus = JSON.stringify(LastExportBonus);
|
||||
this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);
|
||||
if (Player.inGang()) {
|
||||
this.AllGangsSave = JSON.stringify(AllGangs);
|
||||
}
|
||||
@ -246,6 +246,16 @@ function loadGame(saveString) {
|
||||
console.error("ERROR: Failed to parse .fconf Settings.");
|
||||
}
|
||||
}
|
||||
if (saveObj.hasOwnProperty("LastExportBonus")) {
|
||||
try {
|
||||
ExportBonus.LastExportBonus = JSON.parse(saveObj.LastExportBonus);
|
||||
} catch(err) {
|
||||
console.log(saveObj.LastExportBonus);
|
||||
console.log(ExportBonus.LastExportBonus);
|
||||
ExportBonus.LastExportBonus = (new Date()).getTime();
|
||||
console.error("ERROR: Failed to parse .fconf Settings "+ err);
|
||||
}
|
||||
}
|
||||
if (saveObj.hasOwnProperty("VersionSave")) {
|
||||
try {
|
||||
var ver = JSON.parse(saveObj.VersionSave, Reviver);
|
||||
@ -324,6 +334,14 @@ function loadImportedGame(saveObj, saveString) {
|
||||
console.error(`Parsing StockMarket save failed: ${e}`);
|
||||
}
|
||||
}
|
||||
if (saveObj.hasOwnProperty("LastExportBonus")) {
|
||||
try {
|
||||
ExportBonus.LastExportBonus = JSON.parse(saveObj.LastExportBonus);
|
||||
} catch(err) {
|
||||
ExportBonus.LastExportBonus = (new Date()).getTime();
|
||||
console.error("ERROR: Failed to parse .fconf Settings "+ err);
|
||||
}
|
||||
}
|
||||
if (tempSaveObj.hasOwnProperty("VersionSave")) {
|
||||
try {
|
||||
var ver = JSON.parse(tempSaveObj.VersionSave, Reviver);
|
||||
|
@ -233,19 +233,25 @@ class AceEditorWrapper extends ScriptEditor {
|
||||
|
||||
// Highlight Active line
|
||||
const highlightActiveChkBox = safeClearEventListeners("script-editor-option-highlightactiveline", "Active Line Checkbox");
|
||||
highlightActiveChkBox.checked = Settings.EditorHighlightActiveLine;
|
||||
highlightActiveChkBox.onchange = () => {
|
||||
Settings.EditorHighlightActiveLine = highlightActiveChkBox.checked;
|
||||
this.editor.setHighlightActiveLine(highlightActiveChkBox.checked);
|
||||
};
|
||||
|
||||
// Show Invisibles
|
||||
const showInvisiblesChkBox = safeClearEventListeners("script-editor-option-showinvisibles", "Show Invisible Checkbox");
|
||||
showInvisiblesChkBox.checked = Settings.EditorShowInvisibles;
|
||||
showInvisiblesChkBox.onchange = () => {
|
||||
Settings.EditorShowInvisibles = showInvisiblesChkBox.checked;
|
||||
this.editor.setShowInvisibles(showInvisiblesChkBox.checked);
|
||||
};
|
||||
|
||||
// Use Soft Tab
|
||||
const softTabChkBox = safeClearEventListeners("script-editor-option-usesofttab", "Soft Tab Checkbox");
|
||||
softTabChkBox.checked = Settings.EditorUseSoftTab;
|
||||
softTabChkBox.onchange = () => {
|
||||
Settings.EditorUseSoftTab = softTabChkBox.checked;
|
||||
this.editor.getSession().setUseSoftTabs(softTabChkBox.checked);
|
||||
};
|
||||
|
||||
|
@ -375,14 +375,18 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
|
||||
// Highlight Active line
|
||||
const highlightActiveChkBox = safeClearEventListeners("script-editor-option-highlightactiveline", "Active Line Checkbox");
|
||||
highlightActiveChkBox.checked = Settings.EditorHighlightActiveLine;
|
||||
highlightActiveChkBox.onchange = () => {
|
||||
Settings.EditorHighlightActiveLine = highlightActiveChkBox.checked;
|
||||
this.editor.setOption("styleActiveLine", highlightActiveChkBox.checked);
|
||||
};
|
||||
highlightActiveChkBox.onchange();
|
||||
|
||||
// Show Invisibles
|
||||
const showInvisiblesChkBox = safeClearEventListeners("script-editor-option-showinvisibles", "Show Invisible Checkbox");
|
||||
showInvisiblesChkBox.checked = Settings.EditorShowInvisibles;
|
||||
showInvisiblesChkBox.onchange = () => {
|
||||
Settings.EditorShowInvisibles = showInvisiblesChkBox.checked;
|
||||
const overlayMode = {
|
||||
name: 'invisibles',
|
||||
token: function(stream) {
|
||||
@ -428,7 +432,9 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
|
||||
//Use Soft Tab
|
||||
const softTabChkBox = safeClearEventListeners("script-editor-option-usesofttab", "Soft Tab Checkbox");
|
||||
softTabChkBox.checked = Settings.EditorUseSoftTab;
|
||||
softTabChkBox.onchange = () => {
|
||||
Settings.EditorUseSoftTab = softTabChkBox.checked;
|
||||
this.editor.setOption("indentWithTabs", !softTabChkBox.checked);
|
||||
if (softTabChkBox.checked) {
|
||||
this.editor.addKeyMap({
|
||||
@ -482,13 +488,14 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
}));
|
||||
|
||||
const flex1Checkbox = createElement("input", {
|
||||
checked: true,
|
||||
checked: Settings.EditorAutoCloseBrackets,
|
||||
id: flex1Id,
|
||||
name: flex1Id,
|
||||
type: "checkbox",
|
||||
});
|
||||
flex1Fieldset.appendChild(flex1Checkbox);
|
||||
flex1Checkbox.onchange = () => {
|
||||
Settings.EditorAutoCloseBrackets = flex1Checkbox.checked;
|
||||
this.editor.setOption("autoCloseBrackets", flex1Checkbox.checked);
|
||||
};
|
||||
flex1Checkbox.onchange();
|
||||
@ -502,7 +509,7 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
}));
|
||||
|
||||
const flex2Checkbox = createElement("input", {
|
||||
checked: true,
|
||||
checked: Settings.EditorEnableLinting,
|
||||
id: flex2Id,
|
||||
name: flex2Id,
|
||||
type: "checkbox",
|
||||
@ -510,8 +517,10 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
flex2Fieldset.appendChild(flex2Checkbox);
|
||||
flex2Checkbox.onchange = () => {
|
||||
if (flex2Checkbox.checked) {
|
||||
Settings.EditorEnableLinting = true;
|
||||
this.editor.setOption("lint", CodeMirror.lint.netscript);
|
||||
} else {
|
||||
Settings.EditorEnableLinting = false;
|
||||
this.editor.setOption("lint", false);
|
||||
}
|
||||
}
|
||||
@ -526,13 +535,14 @@ class CodeMirrorEditorWrapper extends ScriptEditor {
|
||||
}));
|
||||
|
||||
const flex3Checkbox = createElement("input", {
|
||||
checked: true,
|
||||
checked: Settings.EditorContinueComments,
|
||||
id: flex3Id,
|
||||
name: flex3Id,
|
||||
type: "checkbox",
|
||||
});
|
||||
flex3Fieldset.appendChild(flex3Checkbox);
|
||||
flex3Checkbox.onchange = () => {
|
||||
Settings.EditorContinueComments = flex3Checkbox.checked;
|
||||
this.editor.setOption("continueComments", flex3Checkbox.checked);
|
||||
}
|
||||
flex3Checkbox.onchange();
|
||||
|
@ -111,6 +111,36 @@ interface ISettings extends IDefaultSettings {
|
||||
* What order the Augmentations should be displayed in when purchasing from a Faction
|
||||
*/
|
||||
PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;
|
||||
|
||||
/**
|
||||
* Editor settings to highlight active line.
|
||||
*/
|
||||
EditorHighlightActiveLine: boolean;
|
||||
|
||||
/**
|
||||
* Editor settings to show spaces and tabs.
|
||||
*/
|
||||
EditorShowInvisibles: boolean;
|
||||
|
||||
/**
|
||||
* Editor settings to use tabs or 4 spaces.
|
||||
*/
|
||||
EditorUseSoftTab: boolean;
|
||||
|
||||
/**
|
||||
* Editor settings to add matching bracket.
|
||||
*/
|
||||
EditorAutoCloseBrackets: boolean;
|
||||
|
||||
/**
|
||||
* Editor settings to show linting (like missing semicolons)
|
||||
*/
|
||||
EditorEnableLinting: boolean;
|
||||
|
||||
/**
|
||||
* Editor settings to add extra * when entering new line inside a /* comment.
|
||||
*/
|
||||
EditorContinueComments: boolean;
|
||||
}
|
||||
|
||||
const defaultSettings: IDefaultSettings = {
|
||||
@ -154,6 +184,12 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
|
||||
SuppressMessages: defaultSettings.SuppressMessages,
|
||||
SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,
|
||||
SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,
|
||||
EditorHighlightActiveLine: true,
|
||||
EditorShowInvisibles: false,
|
||||
EditorUseSoftTab: true,
|
||||
EditorAutoCloseBrackets: true,
|
||||
EditorEnableLinting: true,
|
||||
EditorContinueComments: true,
|
||||
init() {
|
||||
Object.assign(Settings, defaultSettings);
|
||||
},
|
||||
|
@ -1881,30 +1881,27 @@ let Terminal = {
|
||||
|
||||
// Displays available network connections using TCP
|
||||
const currServ = Player.getCurrentServer();
|
||||
post("Hostname IP Root Access");
|
||||
for (let i = 0; i < currServ.serversOnNetwork.length; i++) {
|
||||
// Add hostname
|
||||
let entry = getServerOnNetwork(currServ, i);
|
||||
if (entry == null) { continue; }
|
||||
entry = entry.hostname;
|
||||
|
||||
// Calculate padding and add IP
|
||||
let numSpaces = 21 - entry.length;
|
||||
let spaces = Array(numSpaces+1).join(" ");
|
||||
entry += spaces;
|
||||
entry += getServerOnNetwork(currServ, i).ip;
|
||||
|
||||
// Calculate padding and add root access info
|
||||
let hasRoot;
|
||||
if (getServerOnNetwork(currServ, i).hasAdminRights) {
|
||||
hasRoot = 'Y';
|
||||
} else {
|
||||
hasRoot = 'N';
|
||||
const servers = currServ.serversOnNetwork.map((_, i) => {
|
||||
const server = getServerOnNetwork(currServ, i);
|
||||
return {
|
||||
hostname: server.hostname,
|
||||
ip: server.ip,
|
||||
hasRoot: server.hasAdminRights ? "Y" : "N"
|
||||
}
|
||||
numSpaces = 21 - getServerOnNetwork(currServ, i).ip.length;
|
||||
spaces = Array(numSpaces+1).join(" ");
|
||||
entry += spaces;
|
||||
entry += hasRoot;
|
||||
});
|
||||
servers.unshift({
|
||||
hostname: "Hostname",
|
||||
ip: "IP",
|
||||
hasRoot: "Root Access",
|
||||
})
|
||||
const maxHostname = Math.max(...servers.map(s => s.hostname.length));
|
||||
const maxIP = Math.max(...servers.map(s => s.ip.length));
|
||||
for(const server of servers) {
|
||||
let entry = server.hostname;
|
||||
entry += " ".repeat(maxHostname-server.hostname.length+1);
|
||||
entry += server.ip;
|
||||
entry += " ".repeat(maxIP-server.ip.length+1);
|
||||
entry += server.hasRoot;
|
||||
post(entry);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user