mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge branch 'dev' of github.com:danielyxie/bitburner into dev
This commit is contained in:
commit
d45d6c8f3a
@ -15,6 +15,6 @@ export const DarkWebItems: IMap<DarkWebItem> = {
|
|||||||
),
|
),
|
||||||
DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, "Enables 'scan-analyze' with a depth up to 5."),
|
DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, "Enables 'scan-analyze' with a depth up to 5."),
|
||||||
DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, "Enables 'scan-analyze' with a depth up to 10."),
|
DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, "Enables 'scan-analyze' with a depth up to 10."),
|
||||||
AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, "Enables direct connect via 'scan-analyze."),
|
AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, "Enables direct connect via 'scan-analyze'."),
|
||||||
FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, "Unlock access to the formulas API."),
|
FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, "Unlock access to the formulas API."),
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,11 @@ class BitburnerSaveObject {
|
|||||||
const saveString = this.getSaveString();
|
const saveString = this.getSaveString();
|
||||||
|
|
||||||
save(saveString)
|
save(saveString)
|
||||||
.then(() => SnackbarEvents.emit("Game Saved!", "info"))
|
.then(() => {
|
||||||
|
if (!Settings.SuppressSavedGameToast) {
|
||||||
|
SnackbarEvents.emit("Game Saved!", "info")
|
||||||
|
}
|
||||||
|
})
|
||||||
.catch((err) => console.error(err));
|
.catch((err) => console.error(err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -4378,7 +4378,7 @@ export interface NS extends Singularity {
|
|||||||
* @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.
|
* @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.
|
||||||
* @returns Returns the PID of a successfully started script, and 0 otherwise.
|
* @returns Returns the PID of a successfully started script, and 0 otherwise.
|
||||||
*/
|
*/
|
||||||
exec(script: string, host: string, numThreads?: number, ...args: string[]): number;
|
exec(script: string, host: string, numThreads?: number, ...args: Array<string | number | boolean>): number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Terminate current script and start another in 10s.
|
* Terminate current script and start another in 10s.
|
||||||
|
@ -103,6 +103,11 @@ interface IDefaultSettings {
|
|||||||
*/
|
*/
|
||||||
SuppressTIXPopup: boolean;
|
SuppressTIXPopup: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the user should be displayed a toast alert when the game is saved.
|
||||||
|
*/
|
||||||
|
SuppressSavedGameToast: boolean;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Theme colors
|
* Theme colors
|
||||||
*/
|
*/
|
||||||
@ -186,6 +191,7 @@ export const defaultSettings: IDefaultSettings = {
|
|||||||
SuppressTravelConfirmation: false,
|
SuppressTravelConfirmation: false,
|
||||||
SuppressBladeburnerPopup: false,
|
SuppressBladeburnerPopup: false,
|
||||||
SuppressTIXPopup: false,
|
SuppressTIXPopup: false,
|
||||||
|
SuppressSavedGameToast: false,
|
||||||
|
|
||||||
theme: {
|
theme: {
|
||||||
primarylight: "#0f0",
|
primarylight: "#0f0",
|
||||||
@ -251,6 +257,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
|
|||||||
SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,
|
SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,
|
||||||
SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,
|
SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,
|
||||||
SuppressTIXPopup: defaultSettings.SuppressTIXPopup,
|
SuppressTIXPopup: defaultSettings.SuppressTIXPopup,
|
||||||
|
SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,
|
||||||
MonacoTheme: "monokai",
|
MonacoTheme: "monokai",
|
||||||
MonacoInsertSpaces: false,
|
MonacoInsertSpaces: false,
|
||||||
MonacoFontSize: 20,
|
MonacoFontSize: 20,
|
||||||
|
@ -70,6 +70,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
|||||||
);
|
);
|
||||||
const [suppressTIXPopup, setSuppressTIXPopup] = useState(Settings.SuppressTIXPopup);
|
const [suppressTIXPopup, setSuppressTIXPopup] = useState(Settings.SuppressTIXPopup);
|
||||||
const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);
|
const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);
|
||||||
|
const [suppressSavedGameToast, setSuppresSavedGameToast] = useState(Settings.SuppressSavedGameToast);
|
||||||
|
|
||||||
const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);
|
const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);
|
||||||
const [disableASCIIArt, setDisableASCIIArt] = useState(Settings.DisableASCIIArt);
|
const [disableASCIIArt, setDisableASCIIArt] = useState(Settings.DisableASCIIArt);
|
||||||
@ -138,6 +139,11 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
|||||||
Settings.SuppressBladeburnerPopup = event.target.checked;
|
Settings.SuppressBladeburnerPopup = event.target.checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleSuppressSavedGameToastChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||||
|
setSuppresSavedGameToast(event.target.checked);
|
||||||
|
Settings.SuppressSavedGameToast = event.target.checked;
|
||||||
|
}
|
||||||
|
|
||||||
function handleDisableHotkeysChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
function handleDisableHotkeysChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||||
setDisableHotkeys(event.target.checked);
|
setDisableHotkeys(event.target.checked);
|
||||||
Settings.DisableHotkeys = event.target.checked;
|
Settings.DisableHotkeys = event.target.checked;
|
||||||
@ -420,6 +426,24 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
|||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
|
<ListItem>
|
||||||
|
<FormControlLabel
|
||||||
|
control={
|
||||||
|
<Switch checked={suppressSavedGameToast} onChange={handleSuppressSavedGameToastChange} />
|
||||||
|
}
|
||||||
|
label={
|
||||||
|
<Tooltip
|
||||||
|
title={
|
||||||
|
<Typography>
|
||||||
|
If this is set, there will be no "Saved Game" toast appearing after save.
|
||||||
|
</Typography>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Typography>Suppress Saved Game Toast</Typography>
|
||||||
|
</Tooltip>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<FormControlLabel
|
<FormControlLabel
|
||||||
control={<Switch checked={disableHotkeys} onChange={handleDisableHotkeysChange} />}
|
control={<Switch checked={disableHotkeys} onChange={handleDisableHotkeysChange} />}
|
||||||
|
Loading…
Reference in New Issue
Block a user