mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 05:33:54 +01:00
Added option to suppress TIX limit/stop orders
This commit is contained in:
parent
c915cd06d8
commit
d195b00ab6
22
dist/vendor.bundle.js
vendored
22
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -17,6 +17,7 @@ import { numeralWrapper } from "../ui/numeralFormat";
|
||||
import { Money } from "../ui/React/Money";
|
||||
|
||||
import { dialogBoxCreate } from "../ui/React/DialogBox";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
@ -150,12 +151,14 @@ function executeOrder(order: Order, refs: IProcessOrderRefs): void {
|
||||
for (let i = 0; i < stockOrders.length; ++i) {
|
||||
if (order == stockOrders[i]) {
|
||||
stockOrders.splice(i, 1);
|
||||
if (!Settings.SuppressTIXPopup) {
|
||||
dialogBoxCreate(
|
||||
<>
|
||||
{order.type} for {stock.symbol} @ <Money money={order.price} /> ({pos}) was filled (
|
||||
{numeralWrapper.formatShares(Math.round(order.shares))} shares)
|
||||
</>,
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = useState(
|
||||
Settings.SuppressBuyAugmentationConfirmation,
|
||||
);
|
||||
|
||||
const [suppressTIXPopup, setSuppressTIXPopup] = useState(Settings.SuppressTIXPopup);
|
||||
const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);
|
||||
|
||||
const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);
|
||||
@ -128,6 +128,11 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
Settings.SuppressBuyAugmentationConfirmation = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressTIXPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressTIXPopup(event.target.checked);
|
||||
Settings.SuppressTIXPopup = event.target.checked;
|
||||
}
|
||||
|
||||
function handleSuppressBladeburnerPopupChange(event: React.ChangeEvent<HTMLInputElement>): void {
|
||||
setSuppressBladeburnerPopup(event.target.checked);
|
||||
Settings.SuppressBladeburnerPopup = event.target.checked;
|
||||
@ -382,6 +387,18 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
control={<Switch checked={suppressTIXPopup} onChange={handleSuppressTIXPopupChange} />}
|
||||
label={
|
||||
<Tooltip
|
||||
title={<Typography>If this is set, the stock market will never create any popup.</Typography>}
|
||||
>
|
||||
<Typography>Suppress TIX messages</Typography>
|
||||
</Tooltip>
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
{!!props.player.bladeburner && (
|
||||
<ListItem>
|
||||
<FormControlLabel
|
||||
|
Loading…
Reference in New Issue
Block a user