Skip to content

Commit

Permalink
Merge pull request #156 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
- 0.5.9
  • Loading branch information
Kyusung4698 authored Jan 27, 2020
2 parents e872119 + a0b96fd commit c103b6e
Show file tree
Hide file tree
Showing 24 changed files with 1,056 additions and 877 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 0.5.9 (2020-01-27)

* add fast price tagging by clicking the desired bar (#147)
* only works if the item has no note
* only works if the item is inside a premium stash tab
* fix default values are not added as query parameter (#151)
* fix minion stat is recognized as local stat (#149)

## 0.5.8 (2020-01-26)

* add item base values with 7 day history (#84)
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PoE Overlay 0.5.8
# PoE Overlay 0.5.9

An Overlay for Path of Exile. The ***core aspect*** is to blend in with the game. Built with Electron and Angular.

Expand Down Expand Up @@ -38,6 +38,7 @@ This project is currently in a ***pilot phase***. If you encounter any bugs or h
* a graphical display of the price distribution<br> ![item](img/item_0.5.8.jpg)
* filter your search on all supported properties on click<br> ![item_filter](img/item_filter_0.5.8.jpg)
* an in game browser to display the created search<br> ![browser](img/item_browser_0.5.8.jpg)
* lets you price tag the item by clicking the desired bar/value

* Customisable keybindings:
* bind in game commands to a custom hotkey
Expand Down Expand Up @@ -78,9 +79,9 @@ These instructions will set you up to run and enjoy the overlay.

1. Head over to [Releases](https://github.com/Kyusung4698/PoE-Overlay/releases) and download the latest zip
2. Extract zip
3. Run `poe-overlay 0.5.8.exe`
3. Run `poe-overlay 0.5.9.exe`
4. Start Path of Exile
5. Wait until you can see `POE Overlay 0.5.8` in the bottom left corner
5. Wait until you can see `POE Overlay 0.5.9` in the bottom left corner
6. Hit `f7` and set `Language` and `League` to meet your game settings

#### Shortcuts
Expand Down
35 changes: 34 additions & 1 deletion doc/poe/game_ctlr_c_item.txt
Original file line number Diff line number Diff line change
Expand Up @@ -834,4 +834,37 @@ Adds 15-21 Physical Damage to Attacks while you have a Bestial Minion
Feed a beast and it will not hunt.
Protect it and it will not fight.
Ferocity must be learned, not taught.
It is suffering that forges the greatest warriors.
It is suffering that forges the greatest warriors.

Rarity: Rare
Foe Bane
Vaal Greatsword
--------
Two Handed Sword
Physical Damage: 55-113
Elemental Damage: 58-109 (augmented), 18-35 (augmented)
Critical Strike Chance: 5.00%
Attacks per Second: 1.30
Weapon Range: 13
--------
Requirements:
Level: 68
Str: 122
Dex: 104 (unmet)
--------
Sockets: R-R
--------
Item Level: 86
--------
40% increased Global Accuracy Rating (implicit)
--------
+10 to Dexterity
Adds 58 to 109 Fire Damage
Adds 18 to 35 Cold Damage
+48% to Cold Resistance
25% chance to gain Onslaught for 4 seconds on Kill
Attacks with this Weapon Penetrate 5% Cold Resistance
99% increased Elemental Damage with Attack Skills
--------
Redeemer Item
--------
10 changes: 9 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ const args = process.argv.slice(1),

/* robot js */

ipcMain.on('click-at', (event, button, position) => {
if (position) {
robot.moveMouse(position.x, position.y);
}
robot.mouseClick(button, false);
event.returnValue = true;
});

ipcMain.on('key-tap', (event, key, modifier) => {
robot.keyTap(key, modifier);
event.returnValue = true;
Expand Down Expand Up @@ -149,7 +157,7 @@ function loadApp(win: BrowserWindow, route: string = '') {
}

if (serve) {
win.webContents.openDevTools({mode: 'undocked'});
win.webContents.openDevTools({ mode: 'undocked' });
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"author": {
"name": "Kyusung4698"
},
"version": "0.5.8",
"version": "0.5.9",
"scripts": {
"postinstall": "electron-builder install-app-deps",
"ng:serve": "ng serve",
Expand Down
10 changes: 8 additions & 2 deletions src/app/core/service/input/mouse.service.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import { Injectable } from '@angular/core';
import { ElectronProvider } from '@app/provider';
import { Point } from '@app/type';
import { Remote } from 'electron';
import { IpcRenderer, Remote } from 'electron';

@Injectable({
providedIn: 'root'
})
export class MouseService {
private readonly electron: Remote;
private readonly ipcRenderer: IpcRenderer;

constructor(
electronProvider: ElectronProvider) {
this.electron = electronProvider.provideRemote();
this.ipcRenderer = electronProvider.provideIpcRenderer();
}

public getCursorScreenPoint(): Point {
public click(button: 'left' | 'right' | 'middle', position?: Point): void {
this.ipcRenderer.sendSync('click-at', button, position);
}

public position(): Point {
return this.electron.screen.getCursorScreenPoint();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@
(click)="openUrl('https://academy.datawrapper.de/article/136-histogram-min-max-median-mean')">
Open 'How to read a Histogram Min Max Median Mean' by 'academy.datawrapper.de' </button>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title> Q.: My screen turns black/white after toggling any feature. Why?
</mat-panel-title>
</mat-expansion-panel-header>
<p>A.: This is mostly caused by an disabled Aero / DWM. Therefore try enabling this windows
feature.<br>
As it's required to create transparent windows.</p>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title> Q.: The graphics are blurry/ graphic bug?
</mat-panel-title>
</mat-expansion-panel-header>
<p>A.: This is mostly caused by incompatible graphic drivers for the current chromium
version.<br>
Please run 'run-without-gpu.bat' in order to start the overlay without gpu support (hardware
acceleration). </p>
</mat-expansion-panel>
<!-- <mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title> Further information can be found in the user wiki </mat-panel-title>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ngx-charts-bar-vertical [view]="view" [results]="items" [scheme]="scheme" [animations]="true" [xAxis]="true"
[yAxis]="false" [legend]="false" barPadding="4"
[tooltipDisabled]="false" [roundDomains]="true" [roundEdges]="true" [showDataLabel]="false">
[tooltipDisabled]="false" [roundDomains]="true" [roundEdges]="true" [showDataLabel]="false" (select)="onSelect($event)">
<ng-template #tooltipTemplate let-model="model">
<span class="tooltip-val">{{model.value}}&nbsp;/&nbsp;{{result.total}}</span>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';
import { ItemSearchEvaluateResult } from '@shared/module/poe/type';
import { colorSets } from '@swimlane/ngx-charts';

Expand All @@ -25,6 +25,9 @@ export class EvaluateChartComponent implements OnInit {
@Input()
public result: ItemSearchEvaluateResult;

@Output()
public amountSelect = new EventEmitter<number>();

public ngOnInit(): void {
if (!this.result.itemsGrouped || this.result.itemsGrouped.length < 2) {
this.display = 'none';
Expand All @@ -38,4 +41,8 @@ export class EvaluateChartComponent implements OnInit {
};
});
}

public onSelect(event: { name: number }): void {
this.amountSelect.emit(event.name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<ng-container *ngIf="(currencies$ | async) as currencies">
<app-evaluate [item]="data.item" [currencies]="currencies"></app-evaluate>
<app-item-frame-separator [item]="data.item"></app-item-frame-separator>
<app-evaluate-search [settings]="data.settings" [defaultItem]="defaultItem" [queryItem]="queryItem"
[queryItemChange]="queryItemChange" [currencies]="currencies" (update)="onQueryItemChange($event)">
<app-evaluate-search *ngIf="init$ | async" [settings]="data.settings" [defaultItem]="defaultItem"
[queryItem]="queryItem" [queryItemChange]="queryItemChange" [currencies]="currencies"
(update)="onQueryItemChange($event)" (evaluate)="onEvaluate($event)">
</app-evaluate-search>
</ng-container>
</app-item-frame>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ElectronProvider } from '@app/provider';
import { ContextService } from '@shared/module/poe/service';
import { Language } from '@shared/module/poe/type';
Expand Down Expand Up @@ -46,7 +46,8 @@ describe('EvaluateDialogComponent', () => {
}
}
},
{ provide: ElectronProvider, useClass: ElectronProviderFake }
{ provide: ElectronProvider, useClass: ElectronProviderFake },
{ provide: MatDialogRef, useValue: null },
]
})
.compileComponents();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { EvaluateQueryItemProvider } from '@modules/evaluate/provider/evaluate-query-item.provider';
import { EvaluateResult } from '@modules/evaluate/type/evaluate.type';
import { CurrencyService } from '@shared/module/poe/service/currency/currency.service';
import { Currency, Item, Language } from '@shared/module/poe/type';
import { forkJoin, Observable, Subject } from 'rxjs';
import { BehaviorSubject, forkJoin, Observable, Subject } from 'rxjs';
import { shareReplay } from 'rxjs/operators';
import { EvaluateUserSettings } from '../evaluate-settings/evaluate-settings.component';

Expand All @@ -21,16 +22,17 @@ const CURRENCIES_CACHE_SIZE = 1;
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EvaluateDialogComponent implements OnInit, AfterViewInit {
private init = false;

public defaultItem: Item;
public queryItem: Item;
public queryItemChange: Subject<Item>;
public currencies$: Observable<Currency[]>;

public init$ = new BehaviorSubject<boolean>(false);

constructor(
@Inject(MAT_DIALOG_DATA)
public data: EvaluateDialogData,
private readonly ref: MatDialogRef<EvaluateDialogComponent>,
private readonly evaluateQueryItemProvider: EvaluateQueryItemProvider,
private readonly currencyService: CurrencyService) {
}
Expand All @@ -44,14 +46,18 @@ export class EvaluateDialogComponent implements OnInit, AfterViewInit {
}

public ngAfterViewInit(): void {
this.init = true;
setTimeout(() => {
this.init$.next(true);
}, 1);
}

public onQueryItemChange(queryItem: Item): void {
if (this.init) {
this.queryItem = queryItem;
this.queryItemChange.next(queryItem);
}
this.queryItem = queryItem;
this.queryItemChange.next(queryItem);
}

public onEvaluate(result: EvaluateResult): void {
this.ref.close(result);
}

private getCurrencies(): Observable<Currency[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</app-currency-frame>
</div>
</div>
<app-evaluate-chart [result]="result"></app-evaluate-chart>
<app-evaluate-chart [result]="result" (amountSelect)="onAmountSelect($event)"></app-evaluate-chart>
</ng-container>
<ng-container *ngIf="result.items && result.items.length === 0">
<div class="clickable" (click)="onCurrencyClick($event)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { BrowserService } from '@app/service';
import { EvaluateResult } from '@modules/evaluate/type/evaluate.type';
import { SnackBarService } from '@shared/module/material/service';
import { ItemSearchEvaluateService, ItemSearchService } from '@shared/module/poe/service';
import { Currency, Item, ItemSearchEvaluateResult } from '@shared/module/poe/type';
import { ItemSearchIndexed } from '@shared/module/poe/type/search.type';
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
import { debounceTime, flatMap, switchMap, takeUntil } from 'rxjs/operators';
import { debounceTime, flatMap, switchMap, takeUntil, tap } from 'rxjs/operators';
import { EvaluateUserSettings } from '../evaluate-settings/evaluate-settings.component';

const SEARCH_DEBOUNCE_TIME = 500;
Expand All @@ -16,7 +17,7 @@ const SEARCH_DEBOUNCE_TIME = 500;
styleUrls: ['./evaluate-search.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EvaluateSearchComponent implements OnInit, AfterViewInit {
export class EvaluateSearchComponent implements OnInit {
public options$ = new BehaviorSubject<boolean>(false);
public online$: BehaviorSubject<boolean>;
public indexed$: BehaviorSubject<ItemSearchIndexed>;
Expand All @@ -41,6 +42,9 @@ export class EvaluateSearchComponent implements OnInit, AfterViewInit {
@Output()
public update = new EventEmitter<Item>();

@Output()
public evaluate = new EventEmitter<EvaluateResult>();

constructor(
private readonly itemSearchService: ItemSearchService,
private readonly itemSearchEvaluateService: ItemSearchEvaluateService,
Expand All @@ -50,10 +54,9 @@ export class EvaluateSearchComponent implements OnInit, AfterViewInit {
public ngOnInit() {
this.online$ = new BehaviorSubject(this.settings.evaluateQueryOnline);
this.indexed$ = new BehaviorSubject(this.settings.evaluateQueryIndexedRange);
}

public ngAfterViewInit(): void {
this.firstSearch();
this.search(this.queryItem).pipe(
takeUntil(this.queryItemChange)
).subscribe(result => this.result$.next(result), error => this.handleError(error));
this.registerSearchOnChange();
}

Expand Down Expand Up @@ -89,21 +92,18 @@ export class EvaluateSearchComponent implements OnInit, AfterViewInit {
}
}

private firstSearch(): void {
this.search(this.queryItem).pipe(
takeUntil(this.queryItemChange)
).subscribe(result => this.result$.next(result), error => this.handleError(error));
public onAmountSelect(amount: number): void {
const currency = this.result$.value.targetCurrency;
this.evaluate.next({ amount, currency });
}

private registerSearchOnChange(): void {
this.queryItemChange.pipe(
debounceTime(SEARCH_DEBOUNCE_TIME),
switchMap(queryItem => {
this.result$.next(null);
return this.search(queryItem).pipe(
takeUntil(this.queryItemChange)
);
})
tap(() => this.result$.next(null)),
switchMap(queryItem => this.search(queryItem).pipe(
takeUntil(this.queryItemChange)
))
).subscribe(result => this.result$.next(result), error => this.handleError(error));
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/modules/evaluate/service/evaluate-dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { EvaluateDialogComponent, EvaluateDialogData } from '../component/evaluate-dialog/evaluate-dialog.component';
import { EvaluateUserSettings } from '../component/evaluate-settings/evaluate-settings.component';
import { EvaluateResult } from '../type/evaluate.type';

const DIALOG_MIN_WIDTH = 400;
const DIALOG_LINE_HEIGHT = 19;
Expand All @@ -27,7 +28,7 @@ export class EvaluateDialogService {
private readonly stats: StatsService) {
}

public open(point: Point, item: Item, settings: EvaluateUserSettings, language?: Language): Observable<void> {
public open(point: Point, item: Item, settings: EvaluateUserSettings, language?: Language): Observable<EvaluateResult> {
const { width, height } = this.estimateBounds(item, language);

const bounds = this.window.getBounds();
Expand All @@ -41,7 +42,7 @@ export class EvaluateDialogService {
};

this.window.enableInput();
const dialogRef = this.dialog.open(EvaluateDialogComponent, {
const dialogRef = this.dialog.open<EvaluateDialogComponent, EvaluateDialogData, EvaluateResult>(EvaluateDialogComponent, {
position: {
left: `${left}px`,
top: `${top}px`,
Expand Down
Loading

0 comments on commit c103b6e

Please sign in to comment.