feat(esi): add PostRouteForAllByNames and resolve system names in batch
This commit introduces a new function `PostRouteForAllByNames` to the ESI service, which allows setting a complete route (including waypoints) for all logged-in characters. This is achieved by batch resolving system names to their IDs, improving efficiency and simplifying the process of setting complex routes. The changes include: - Adding `ResolveSystemIDsByNames` to `ESISSO` to fetch multiple system IDs in a single ESI request. - Implementing `PostRouteForAll` in `ESISSO` to handle the logic of setting the destination and waypoints for all characters. - Updating `App.go` to expose `PostRouteForAllByNames` for frontend use. - Modifying the frontend component `RegionMap.tsx` to utilize the new `PostRouteForAllByNames` function when setting routes, replacing the previous sequential calls to `SetDestinationForAll` and `AddWaypointForAllByName`. - Updating Wails generated type definitions (`.d.ts` and `.js`) to reflect the new function.
This commit is contained in:
4
frontend/wailsjs/go/main/App.d.ts
vendored
4
frontend/wailsjs/go/main/App.d.ts
vendored
@@ -12,9 +12,7 @@ export function Greet(arg1:string):Promise<string>;
|
||||
|
||||
export function ListCharacters():Promise<Array<main.CharacterInfo>>;
|
||||
|
||||
export function SetDestination(arg1:number,arg2:boolean,arg3:boolean):Promise<void>;
|
||||
|
||||
export function SetDestinationByName(arg1:string,arg2:boolean,arg3:boolean):Promise<void>;
|
||||
export function PostRouteForAllByNames(arg1:string,arg2:Array<string>):Promise<void>;
|
||||
|
||||
export function SetDestinationForAll(arg1:string,arg2:boolean,arg3:boolean):Promise<void>;
|
||||
|
||||
|
@@ -22,12 +22,8 @@ export function ListCharacters() {
|
||||
return window['go']['main']['App']['ListCharacters']();
|
||||
}
|
||||
|
||||
export function SetDestination(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['SetDestination'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function SetDestinationByName(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['SetDestinationByName'](arg1, arg2, arg3);
|
||||
export function PostRouteForAllByNames(arg1, arg2) {
|
||||
return window['go']['main']['App']['PostRouteForAllByNames'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SetDestinationForAll(arg1, arg2, arg3) {
|
||||
|
Reference in New Issue
Block a user