mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2025-10-30 06:08:00 +00:00
add config option
This commit is contained in:
@@ -39,6 +39,8 @@ import {
|
||||
parseModInfoLine,
|
||||
} from "./advanced-mod-desc";
|
||||
import { calcPropPercentile, QUALITY_STATS } from "./calc-q20";
|
||||
import { AppConfig } from "@/web/Config";
|
||||
import { PriceCheckWidget } from "@/web/overlay/widgets";
|
||||
|
||||
type SectionParseResult =
|
||||
| "SECTION_PARSED"
|
||||
@@ -144,6 +146,14 @@ export function parseClipboard(clipboard: string): Result<ParsedItem, string> {
|
||||
if (parsed.isOk() && isFromChat) {
|
||||
parsed.value.fromChat = isFromChat;
|
||||
}
|
||||
|
||||
if (
|
||||
AppConfig<PriceCheckWidget>("price-check")?.defaultRuneOption ===
|
||||
"Iron Rune"
|
||||
) {
|
||||
parsed.value.originalItem = parsed.value;
|
||||
}
|
||||
|
||||
return Object.freeze(parsed);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
|
||||
@@ -45,6 +45,7 @@ export interface PriceCheckWidget extends Widget {
|
||||
usePseudo: boolean;
|
||||
rememberCurrency: boolean;
|
||||
defaultAllSelected: boolean;
|
||||
defaultRuneOption: "None" | "Empty" | "Iron Rune";
|
||||
}
|
||||
|
||||
export interface StopwatchWidget extends Widget {
|
||||
|
||||
Reference in New Issue
Block a user