Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1163263
feat: added a basic (and slow) implementation for fragment selection
May 29, 2024
c78c21c
perf: improved threading with fragment selection
May 29, 2024
4526d5a
feat: use selected subclass and only fragments that are not selected yet
May 29, 2024
617600e
feat: show the fragments in the results table
May 29, 2024
3491425
feat: added featureInDevelopment flag for settings
May 29, 2024
668cdcd
fix: disabled some inputs when fragment selection is active
May 29, 2024
afef011
fix: stop calculation if we change configuration
May 29, 2024
f18fd39
style: wording change
May 29, 2024
1b24895
ci: added new deploy targets "canary" and "beta"
May 29, 2024
d2b4ec0
style: add warning for canary builds
May 29, 2024
7fed4e1
style: changed visuals for the canary warning
May 29, 2024
5816e04
fix: do not run mod optimization when total distance is 0
May 30, 2024
7b7b179
fix: improved waste reduction
May 30, 2024
8144f43
perf: drastically improve fragment selection speed with relaxed settings
May 30, 2024
5d08569
feat: fragment selection now also limits the stat selection correctly
May 30, 2024
dfa2243
Merge branch 'beta' into feature/fragment-selection
May 31, 2024
7c768bc
fix: stat selection limit now works correctly
May 31, 2024
c573407
fix: now use the real available fragment count per subclass
May 31, 2024
d91e332
fix: fixed incorrect fragment count
Jun 3, 2024
1ddcb3b
feat: initial implementation to remove the auto-logout
Jun 3, 2024
2580d87
feat: sorting is now affected by additional fragment count
Jun 3, 2024
1afa5dc
Merge commit '1ad4e615d99cc201de69010b89f602729fa61ff9' into feature/…
Jun 4, 2024
2f18f8a
feat: set version to 2.6.0
Jun 4, 2024
2ec22e3
Merge commit 'ed9889711a103858e556131805b92034dd1fd292' into feature/…
Jun 4, 2024
9a76776
feat: improved UI and added fragment count limitation
Jun 4, 2024
3f6ac1c
fix: minor wording change for the Stat Boost selection
Jun 4, 2024
a9a01a7
Merge commit '810926b1b37083b266b32ea84cbb3dad7ccba774' into feature/…
Jun 4, 2024
f732c1e
fix: changed changelog
Jun 4, 2024
b52fbe1
Merge commit '61f6d5331ede3e5c59e958e485c60617f1a4cb49' into feature/…
Jun 4, 2024
c777e97
fix: set prismatic fragment limit to 6 for now
Jun 4, 2024
0ce12e6
fix: more changes for the exotic selection w/ artifice
Jun 4, 2024
520d847
Merge commit '77f606788c7e6dea6d3e20b55ad663583731a44d' into feature/…
Jun 5, 2024
6ce8313
Merge commit '65f70bf5ab062a1a30f5bc4d47ad7ae65813e6dc' into feature/…
Jun 17, 2024
95bf885
feat: update cooldowns to show everything limited to 12 with AnySubclass
Jun 17, 2024
c518969
fix: exotic class items not always assumed to be masterworked
Jun 18, 2024
6ba49c6
fix: only assume legendary class items are masterworked
Jun 18, 2024
af047f0
Merge remote-tracking branch 'origin/beta' into feature/fragment-sele…
Jun 18, 2024
2d44e2d
Merge commit '0917cb74de1c5574bfbfe0bd196c54bc336ea2ac' into feature/…
Jun 19, 2024
60cb2a7
Merge branch 'master' into feature/fragment-selection
Jun 19, 2024
c124c63
feat: make the topside warning more visible
Jun 19, 2024
019b8a6
feat: added 3x100 and 4x100 buttons for auto fragment selection
Jun 19, 2024
ddc0f84
fix: class items have their own artifice now
Jun 19, 2024
8da58d7
Merge remote-tracking branch 'origin/beta' into feature/fragment-sele…
Jun 19, 2024
a1f2939
Merge remote-tracking branch 'origin/beta' into feature/fragment-sele…
Jun 19, 2024
ec43f50
fix: fixed download results as JSON button
Jul 8, 2024
a49bd5e
Merge branch 'beta' into feature/fragment-selection
Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -247,57 +247,75 @@
src="https://www.bungie.net/common/destiny2_content/icons/ea5af04ccd6a3470a44fd7bb0f66e2f7.png" />
</td>
</tr>
<!-- Config Mods -->
<tr class="result-config">
<td>Configuration</td>
<td
><span
*ngIf="this.configValues[ArmorStat.Mobility] !== 0"
[class]="this.configValues[ArmorStat.Mobility] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Mobility] > 0">+</span
>{{ this.configValues[ArmorStat.Mobility] }}
</span></td
>
<td
><span
*ngIf="this.configValues[ArmorStat.Resilience] !== 0"
[class]="this.configValues[ArmorStat.Resilience] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Resilience] > 0">+</span
>{{ this.configValues[ArmorStat.Resilience] }}
</span></td
>
<td
><span
*ngIf="this.configValues[ArmorStat.Recovery] !== 0"
[class]="this.configValues[ArmorStat.Recovery] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Recovery] > 0">+</span
>{{ this.configValues[ArmorStat.Recovery] }}
</span></td
>
<td
><span
*ngIf="this.configValues[ArmorStat.Discipline] !== 0"
[class]="this.configValues[ArmorStat.Discipline] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Discipline] > 0">+</span
>{{ this.configValues[ArmorStat.Discipline] }}
</span></td
>
<td
><span
*ngIf="this.configValues[ArmorStat.Intellect] !== 0"
[class]="this.configValues[ArmorStat.Intellect] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Intellect] > 0">+</span
>{{ this.configValues[ArmorStat.Intellect] }}
</span></td
>
<td
><span
*ngIf="this.configValues[ArmorStat.Strength] !== 0"
[class]="this.configValues[ArmorStat.Strength] > 0 ? 'positive' : 'negative'">
<span *ngIf="this.configValues[ArmorStat.Strength] > 0">+</span
>{{ this.configValues[ArmorStat.Strength] }}
</span></td
>

<!-- ALTERNATIVE: each fragment -->
<tr class="result-frags" *ngFor="let fragment of getAllEnabledModsAndFragments()">
<ng-container
*ngVar="
calculateStatValuesFromFragmentsAndMods(
[fragment],
config_characterClass
) as fragmentValues
">
<td>
{{ ModInformation[fragment].name }}
</td>
<td
><span
*ngIf="fragmentValues[ArmorStat.Mobility] !== 0"
[class]="fragmentValues[ArmorStat.Mobility] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Mobility] > 0">+</span
>{{ fragmentValues[ArmorStat.Mobility] }}
</span></td
>
<td
><span
*ngIf="fragmentValues[ArmorStat.Resilience] !== 0"
[class]="fragmentValues[ArmorStat.Resilience] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Resilience] > 0">+</span
>{{ fragmentValues[ArmorStat.Resilience] }}
</span></td
>
<td
><span
*ngIf="fragmentValues[ArmorStat.Recovery] !== 0"
[class]="fragmentValues[ArmorStat.Recovery] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Recovery] > 0">+</span
>{{ fragmentValues[ArmorStat.Recovery] }}
</span></td
>
<td
><span
*ngIf="fragmentValues[ArmorStat.Discipline] !== 0"
[class]="fragmentValues[ArmorStat.Discipline] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Discipline] > 0">+</span
>{{ fragmentValues[ArmorStat.Discipline] }}
</span></td
>
<td
><span
*ngIf="fragmentValues[ArmorStat.Intellect] !== 0"
[class]="fragmentValues[ArmorStat.Intellect] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Intellect] > 0">+</span
>{{ fragmentValues[ArmorStat.Intellect] }}
</span></td
>
<td
><span
*ngIf="fragmentValues[ArmorStat.Strength] !== 0"
[class]="fragmentValues[ArmorStat.Strength] > 0 ? 'positive' : 'negative'">
<span *ngIf="fragmentValues[ArmorStat.Strength] > 0">+</span
>{{ fragmentValues[ArmorStat.Strength] }}
</span></td
>
<td class="icon-column">
<!-- Item Icon -->
<div class="item-icon-container">
<app-item-icon [itemHash]="ModInformation[fragment].hash" class="item-icon">
</app-item-icon>
</div>
</td>
</ng-container>
</tr>
<!-- +5 Mods -->
<tr *ngVar="element?.mods as mods" class="highlight-row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {
public config_assumeLegendariesMasterworked = false;
public config_assumeExoticsMasterworked = false;
public config_assumeClassItemMasterworked = false;
public config_automaticallySelectFragments = false;
public config_enabledMods: ModOrAbility[] = [];
public DIMUrl: string = "";
configValues: [number, number, number, number, number, number] = [0, 0, 0, 0, 0, 0];

@Input()
element: ResultDefinition | null = null;
Expand All @@ -84,6 +84,25 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {
private membership: MembershipService
) {}

calculateStatValuesFromFragmentsAndMods(
m: ModOrAbility[],
cls: DestinyClass
): [number, number, number, number, number, number] {
return m
.reduce((p, v) => {
p = p.concat(ModInformation[v].bonus);
return p;
}, [] as ModifierValue[])
.reduce(
(p, v) => {
if (v.stat == SpecialArmorStat.ClassAbilityRegenerationStat) p[[1, 0, 2][cls]] += v.value;
else p[v.stat as number] += v.value;
return p;
},
[0, 0, 0, 0, 0, 0]
);
}

public buildItemIdString(element: ResultDefinition | null) {
if (!element) return "";
let result = element.items
Expand Down Expand Up @@ -133,20 +152,7 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {
this.config_assumeExoticsMasterworked = c.assumeExoticsMasterworked;
this.config_assumeClassItemMasterworked = c.assumeClassItemMasterworked;
this.config_enabledMods = c.enabledMods;
this.configValues = c.enabledMods
.reduce((p, v) => {
p = p.concat(ModInformation[v].bonus);
return p;
}, [] as ModifierValue[])
.reduce(
(p, v) => {
if (v.stat == SpecialArmorStat.ClassAbilityRegenerationStat)
p[[1, 0, 2][c.characterClass]] += v.value;
else p[v.stat as number] += v.value;
return p;
},
[0, 0, 0, 0, 0, 0]
);
this.config_automaticallySelectFragments = c.automaticallySelectFragments;

this.DIMUrl = this.generateDIMLink(c);
});
Expand Down Expand Up @@ -244,12 +250,16 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {
return cost;
}

getAllEnabledModsAndFragments() {
return this.config_enabledMods.concat(this.element?.additionalFragments || []);
}

generateDIMLink(c: BuildConfiguration): string {
const mods: number[] = [];
const fragments: number[] = [];

// add selected mods
for (let mod of this.config_enabledMods) {
for (let mod of this.getAllEnabledModsAndFragments()) {
const modInfo = ModInformation[mod];
if (modInfo.type === ModifierType.CombatStyleMod) {
mods.push(modInfo.hash);
Expand Down Expand Up @@ -324,7 +334,8 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {

if (
c.characterClass != DestinyClass.Unknown &&
c.selectedModElement != ModifierType.CombatStyleMod
c.selectedModElement != ModifierType.CombatStyleMod &&
c.selectedModElement != ModifierType.AnySubclass
) {
const cl = SubclassHashes[c.characterClass];
const subclassHash = cl[c.selectedModElement];
Expand Down Expand Up @@ -354,7 +365,11 @@ export class ExpandedResultContentComponent implements OnInit, OnDestroy {
}

getColumnForStat(statId: number) {
var configValueTiers = Math.floor(this.configValues[statId] / 10);
const configValues = this.calculateStatValuesFromFragmentsAndMods(
this.getAllEnabledModsAndFragments(),
this.config_characterClass
);
var configValueTiers = Math.floor(configValues[statId] / 10);
let d = [];
let total = 0;

Expand Down
13 changes: 13 additions & 0 deletions src/app/components/authenticated-v2/results/results.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,19 @@
<mat-icon inline style="height: 100%">report_problem</mat-icon>
</mat-chip>

<mat-chip
#tooltip="matTooltip"
*ngIf="_config_automaticallySelectFragments"
disableRipple
color="warn"
selected
matTooltip="This setting enforces that all exotics are ignored.">
<mat-icon inline style="height: 100%">report_problem</mat-icon>
&nbsp;Automatically add up to
{{ _config_maximumAutoSelectableFragments }} fragments&nbsp;
<mat-icon inline style="height: 100%">report_problem</mat-icon>
</mat-chip>

<mat-chip
#tooltip="matTooltip"
*ngIf="_config_onlyUseMasterworkedExotics"
Expand Down
62 changes: 44 additions & 18 deletions src/app/components/authenticated-v2/results/results.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import { FixableSelection } from "../../../data/buildConfiguration";
import { Subject } from "rxjs";
import { takeUntil } from "rxjs/operators";
import { InventoryArmorSource } from "src/app/data/types/IInventoryArmor";
import { MaximumFragmentsPerClass } from "src/app/data/ModInformation";
import { ModOrAbility } from "src/app/data/enum/modOrAbility";

export interface ResultDefinition {
exotic:
Expand All @@ -46,6 +48,7 @@ export interface ResultDefinition {
perk: ArmorPerkOrSlot;
};
mods: number[];
additionalFragments: ModOrAbility[];
stats: number[];
statsNoMods: number[];
items: ResultItem[][];
Expand Down Expand Up @@ -105,6 +108,8 @@ export class ResultsComponent implements OnInit, OnDestroy {
_config_assumeExoticsMasterworked: Boolean = false;
_config_assumeClassItemMasterworked: Boolean = false;

_config_automaticallySelectFragments: boolean = false;
_config_maximumAutoSelectableFragments: number = 0;
_config_maximumStatMods: number = 5;
_config_selectedExotics: number[] = [];
_config_tryLimitWastedStats: boolean = false;
Expand Down Expand Up @@ -157,6 +162,15 @@ export class ResultsComponent implements OnInit, OnDestroy {
this._config_assumeClassItemMasterworked = c.assumeClassItemMasterworked;
this._config_tryLimitWastedStats = c.tryLimitWastedStats;

this._config_maximumAutoSelectableFragments = Math.min(
c.maximumAutoSelectableFragments,
Math.max(
0,
MaximumFragmentsPerClass[c.characterClass][c.selectedModElement] - c.enabledMods.length
)
);
this._config_automaticallySelectFragments =
this._config_maximumAutoSelectableFragments > 0 && c.automaticallySelectFragments;
this._config_maximumStatMods = c.maximumStatMods;
this._config_onlyUseMasterworkedExotics = c.onlyUseMasterworkedExotics;
this._config_onlyUseMasterworkedLegendaries = c.onlyUseMasterworkedLegendaries;
Expand Down Expand Up @@ -206,33 +220,43 @@ export class ResultsComponent implements OnInit, OnDestroy {
this.tableDataSource.paginator = this.paginator;
this.tableDataSource.sort = this.sort;
this.tableDataSource.sortingDataAccessor = (data, sortHeaderId) => {
let value = 0;
switch (sortHeaderId) {
case "Mobility":
return data.stats[ArmorStat.Mobility];
value = data.stats[ArmorStat.Mobility];
break;
case "Resilience":
return data.stats[ArmorStat.Resilience];
value = data.stats[ArmorStat.Resilience];
break;
case "Recovery":
return data.stats[ArmorStat.Recovery];
value = data.stats[ArmorStat.Recovery];
break;
case "Discipline":
return data.stats[ArmorStat.Discipline];
value = data.stats[ArmorStat.Discipline];
break;
case "Intellect":
return data.stats[ArmorStat.Intellect];
value = data.stats[ArmorStat.Intellect];
break;
case "Strength":
return data.stats[ArmorStat.Strength];
value = data.stats[ArmorStat.Strength];
break;
case "Tiers":
return data.tiers;
value = data.tiers;
break;
case "Max Tiers":
return 10 * (data.tiers + (5 - data.modCount));
value = 10 * (data.tiers + (5 - data.modCount));
break;
case "Waste":
return data.waste;
value = data.waste;
break;
case "Mods":
return (
+100 * data.modCount +
//+ 40 * data.artifice.length
data.modCost
);
value = +100 * data.modCount + data.modCost;
}
return 0;

// subtract the count of additional used fragments divided by 10
value += data.additionalFragments.length / 6;

return value;
};
}

Expand Down Expand Up @@ -263,9 +287,11 @@ export class ResultsComponent implements OnInit, OnDestroy {
config: this.config.readonlyConfigurationSnapshot,
results: this._results.map((r) => {
let p = Object.assign({}, r);
p.items = p.items.map((i) => {
return { hash: i[0].hash, instance: i[0].itemInstanceId } as any;
});
p.items = p.items
.filter((i) => !!i[0])
.map((i) => {
return { hash: i[0].hash, instance: i[0].itemInstanceId } as any;
});
delete p.exotic;
return p;
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@
#tooltip="matTooltip">
report_problem
</mat-icon>
<mat-icon
inline
aria-hidden="false"
aria-label="Help"
*ngIf="f.featureInDevelopment"
class="indevelopment-icon"
matTooltip="This setting is currently in development and may not work as expected. Report bugs if possible."
#tooltip="matTooltip">
developer_board
</mat-icon>
</div>
<div class="category-spacer"></div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
.report-problem-icon {
color: lightcoral;
}

.indevelopment-icon {
color: rgb(128, 240, 221);
}
Loading