Replace "stock.short" with "stock.shortStock".

This was preventing `disableLog("ALL")` from stopping these log messages, since that's not the function's name now.
This commit is contained in:
MageKing17 2022-08-18 13:29:21 -07:00 committed by GitHub
parent 9c579e294a
commit 1b8993a3dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -229,7 +229,7 @@ export function shortStock(
} }
if (stock == null || isNaN(shares)) { if (stock == null || isNaN(shares)) {
if (workerScript) { if (workerScript) {
workerScript.log("stock.short", () => `Invalid arguments: stock='${stock}' shares='${shares}'`); workerScript.log("stock.shortStock", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);
} else if (opts.suppressDialog !== true) { } else if (opts.suppressDialog !== true) {
dialogBoxCreate( dialogBoxCreate(
"Failed to initiate a short position in a stock. This is probably " + "Failed to initiate a short position in a stock. This is probably " +
@ -247,7 +247,7 @@ export function shortStock(
if (Player.money < totalPrice) { if (Player.money < totalPrice) {
if (workerScript) { if (workerScript) {
workerScript.log( workerScript.log(
"stock.short", "stock.shortStock",
() => () =>
"You do not have enough " + "You do not have enough " +
"money to purchase this short position. You need " + "money to purchase this short position. You need " +
@ -268,7 +268,7 @@ export function shortStock(
if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) { if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {
if (workerScript) { if (workerScript) {
workerScript.log( workerScript.log(
"stock.short", "stock.shortStock",
() => () =>
`This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${ `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${
stock.symbol stock.symbol
@ -301,7 +301,7 @@ export function shortStock(
CONSTANTS.StockMarketCommission, CONSTANTS.StockMarketCommission,
)} ` + )} ` +
`in commission fees.`; `in commission fees.`;
workerScript.log("stock.short", () => resultTxt); workerScript.log("stock.shortStock", () => resultTxt);
} else if (!opts.suppressDialog) { } else if (!opts.suppressDialog) {
dialogBoxCreate( dialogBoxCreate(
<> <>