Merge pull request #1043 from Kvan7/dev

v0.16.3
This commit is contained in:
Kvan7
2026-09-06 15:51:34 -05:00
committed by GitHub
12 changed files with 97 additions and 28 deletions
+2 -1
View File
@@ -58,6 +58,7 @@ body:
label: Version
description: What version of EE2 are you running? You can see this in Settings -> About
options:
- 0.16.3
- 0.16.2
- 0.16.1
- 0.16.0
@@ -71,7 +72,7 @@ body:
- 0.15.1
- 0.15.0
- Change me
default: 12
default: 13
validations:
required: true
- type: textarea
+1 -1
View File
@@ -1,6 +1,6 @@
# ![Perfect Jewelers Orb](./renderer/public/images/jeweler.png) Exiled Exchange 2
[![GitHub Downloads (specific asset, latest release)](https://img.shields.io/github/downloads/kvan7/exiled-exchange-2/latest/Exiled-Exchange-2-Setup-0.16.2.exe?style=plastic&link=https%3A%2F%2Ftooomm.github.io%2Fgithub-release-stats%2F%3Fusername%3Dkvan7%26repository%3DExiled-Exchange-2)](https://tooomm.github.io/github-release-stats/?username=kvan7&repository=Exiled-Exchange-2)
[![GitHub Downloads (specific asset, latest release)](https://img.shields.io/github/downloads/kvan7/exiled-exchange-2/latest/Exiled-Exchange-2-Setup-0.16.3.exe?style=plastic&link=https%3A%2F%2Ftooomm.github.io%2Fgithub-release-stats%2F%3Fusername%3Dkvan7%26repository%3DExiled-Exchange-2)](https://tooomm.github.io/github-release-stats/?username=kvan7&repository=Exiled-Exchange-2)
[![GitHub Tag](https://img.shields.io/github/v/tag/kvan7/exiled-exchange-2?style=plastic&label=latest%20version)](https://github.com/Kvan7/Exiled-Exchange-2/releases/latest)
[![GitHub commits since latest release (branch)](https://img.shields.io/github/commits-since/kvan7/exiled-exchange-2/latest/dev?style=plastic)](https://github.com/Kvan7/Exiled-Exchange-2/commits/dev/)
[![Translation status](https://translate.codeberg.org/widget/exiled-exchange-2/svg-badge.svg)](https://translate.codeberg.org/engage/exiled-exchange-2/)
+1 -1
View File
@@ -20,7 +20,7 @@ export default defineConfig({
},
themeConfig: {
// logo: 'TODO', https://github.com/vuejs/vitepress/issues/1401
appVersion: '0.16.2',
appVersion: '0.16.3',
github: {
releasesUrl: 'https://github.com/Kvan7/Exiled-Exchange-2/releases'
},
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "exiled-exchange-2",
"version": "0.16.2",
"version": "0.16.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "exiled-exchange-2",
"version": "0.16.2",
"version": "0.16.3",
"dependencies": {
"electron-overlay-window": "4.0.2",
"uiohook-napi": "1.5.x"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "exiled-exchange-2",
"version": "0.16.2",
"version": "0.16.3",
"private": true,
"scripts": {
"dev": "node build/script.mjs",
+60
View File
@@ -196,6 +196,26 @@ describe("determineAugments", () => {
expect(result).toHaveLength(1);
expect(result[0].refName).toEqual("Greater Storm Rune");
});
it("works for bonded augments", () => {
const expectedRef = ["Fox Idol"];
const result = __testExports.determineAugments(
{
info: {
type: ModifierType.Augment,
},
} as unknown as ParsedModifier,
[
makeCalcStat(
"Idols socketed in this item gain the benefits of their Bonded modifiers",
1,
ModifierType.Augment,
),
],
);
expect(result.map((augment) => augment.refName)).toEqual(expectedRef);
});
});
describe("BFS", () => {
@@ -460,4 +480,44 @@ describe("applyAugmentSockets", () => {
),
).toBeTruthy();
});
it("should handle bonded mods", () => {
const item = createTestItem();
item.category = ItemCategory.BodyArmour;
item.augmentSockets = {
empty: 1,
current: 1,
normal: 2,
augments: [null, null],
};
const Bonded = makeCalcStat(
"Bonded: #% to Quality of all Skills",
5,
ModifierType.Augment,
);
const nonBonded = makeCalcStat(
"Idols socketed in this item gain the benefits of their Bonded modifiers",
1,
ModifierType.Augment,
);
item.statsByType = [Bonded, nonBonded];
item.newMods = [
{
info: {
type: ModifierType.Augment,
tags: [],
},
stats: [Bonded.sources[0].stat, nonBonded.sources[0].stat],
},
];
__testExports.applyAugmentSockets(item);
expect(item.augmentSockets.empty).toEqual(1);
expect(item.augmentSockets.current).toEqual(1);
expect(item.augmentSockets.normal).toEqual(2);
expect(item.augmentSockets.augments).toHaveLength(2);
expect(item.augmentSockets.augments[0]?.refName).toBe("Fox Idol");
expect(item.augmentSockets.augments[1]).toBeNull();
});
});
+2 -2
View File
@@ -398,7 +398,7 @@ function augmentsToLookup(augmentList: BaseType[]): AugmentDataByAugment {
if (!augmentDataByAugment[augment.refName]) {
augmentDataByAugment[augment.refName] = [];
}
augmentDataByAugment[augment.refName].push({
augmentDataByAugment[augment.refName]!.push({
augment: augment.name,
refName: augment.refName,
baseStat: text,
@@ -426,7 +426,7 @@ function augmentsToLookupTradeId(
if (!augmentDataByAugment[tradeId[0]]) {
augmentDataByAugment[tradeId[0]] = [];
}
augmentDataByAugment[tradeId[0]].push({
augmentDataByAugment[tradeId[0]]!.push({
refName: augment.refName,
augment: augment.name,
baseStat: text,
+12 -10
View File
@@ -312,18 +312,20 @@ export interface AugmentData {
* Value is each option that the value could be for, ie stat for armour or weapon.
*/
export interface AugmentDataByAugment {
[augment: string]: AugmentData[];
[augment: string]: AugmentData[] | undefined;
}
export interface AugmentDataByTradeId {
[tradeId: string]: Array<{
refName: string;
augment: string;
baseStat: string;
values: number[];
id: string;
categories: ItemCategory[];
icon: string;
}>;
[tradeId: string]:
| Array<{
refName: string;
augment: string;
baseStat: string;
values: number[];
id: string;
categories: ItemCategory[];
icon: string;
}>
| undefined;
}
export interface AugmentGroup<T> {
+7 -6
View File
@@ -1325,9 +1325,9 @@ function applyAugmentSockets(item: ParsedItem) {
const augmentMods = item.newMods.filter(
(mod) => mod.info.type === ModifierType.Augment,
);
const augmentStats = item.statsByType.filter(
(calc) => calc.type === ModifierType.Augment,
);
const augmentStats = item.statsByType
.filter((calc) => calc.type === ModifierType.Augment)
.filter((calc) => !calc.stat.ref.startsWith("Bonded"));
let statCombinations = combinations(augmentStats)
.filter((f) => f.length)
@@ -2168,9 +2168,10 @@ function determineAugments(
const allTradeIds = statCalcs.map(
(c) => c.stat.trade.ids[ModifierType.Augment][0],
);
const allPossibleAugments = allTradeIds.map(
(id) => AUGMENT_DATA_BY_TRADE_ID[id],
);
const allPossibleAugments = allTradeIds
.map((id) => AUGMENT_DATA_BY_TRADE_ID[id])
.filter((v) => v !== undefined);
const augmentRefSets = allPossibleAugments.map(
(augGroup) => new Set(augGroup.map((a) => a.refName)),
);
@@ -125,7 +125,9 @@ function createMagebloodFilters(
ctx.filters.push(
...legacies.map((mod) => {
const source = mod.sources[0];
// copy to not modify original, causing infinite refEffect loop
const copiedMod = JSON.parse(JSON.stringify(mod));
const source = copiedMod.sources[0];
source.contributes = {
value: 0,
min: 0,
@@ -133,8 +135,8 @@ function createMagebloodFilters(
option: source.contributes?.option,
};
mod.sources = [source];
const f = calculatedStatToFilter(mod, ctx.searchInRange, item);
copiedMod.sources = [source];
const f = calculatedStatToFilter(copiedMod, ctx.searchInRange, item);
f.roll = undefined;
return f;
@@ -77,7 +77,9 @@ function createNewStatFilter(
): StatFilter[] | undefined {
if (!item.category) return;
const newItem = JSON.parse(JSON.stringify(item)) as ParsedItem;
const augmentData = AUGMENT_DATA_BY_AUGMENT[newAugment].find((rune) =>
const allCatAugData = AUGMENT_DATA_BY_AUGMENT[newAugment];
if (!allCatAugData) return;
const augmentData = allCatAugData.find((rune) =>
rune.categories.includes(item.category!),
);
if (!augmentData) return;
+1
View File
@@ -7,6 +7,7 @@ export default defineConfig({
build: {
target: "esnext",
assetsInlineLimit: 0,
sourcemap: true,
},
optimizeDeps: {
esbuildOptions: { target: "esnext" },