@bettergi/types 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/csharp/BetterGenshinImpact/Core/Recognition/OcrEngineTypes.d.ts +13 -7
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionObject.d.ts +151 -142
- package/csharp/BetterGenshinImpact/Core/Recognition/RecognitionTypes.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +20 -14
- package/csharp/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +12 -7
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +72 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +113 -0
- package/csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightTask.d.ts +40 -0
- package/csharp/BetterGenshinImpact/GameTask/ISoloTask.d.ts +13 -0
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Converter/INodeConverter.d.ts +8 -2
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +65 -52
- package/csharp/BetterGenshinImpact/GameTask/Model/Area/Region.d.ts +190 -136
- package/csharp/BetterGenshinImpact/GameTask/Model/BaseTaskParam.d.ts +13 -0
- package/csharp/BetterGenshinImpact/View/Drawable/DrawContent.d.ts +45 -0
- package/csharp/BetterGenshinImpact/View/Drawable/LineDrawable.d.ts +17 -9
- package/csharp/BetterGenshinImpact/View/Drawable/RectDrawable.d.ts +20 -10
- package/csharp/Microsoft/Extensions/Localization/IStringLocalizer.d.ts +16 -0
- package/csharp/Microsoft/Extensions/Localization/LocalizedString.d.ts +26 -0
- package/csharp/SixLabors/ImageSharp/Image.d.ts +9 -0
- package/csharp/System/Collections/DictionaryEntry.d.ts +14 -0
- package/csharp/System/Collections/Generic/Dictionary.d.ts +193 -34
- package/csharp/System/Collections/Generic/ICollection.d.ts +15 -9
- package/csharp/System/Collections/Generic/IDictionary.d.ts +11 -22
- package/csharp/System/Collections/Generic/IEnumerable.d.ts +10 -3
- package/csharp/System/Collections/Generic/IEnumerator.d.ts +10 -5
- package/csharp/System/Collections/Generic/IEqualityComparer.d.ts +9 -3
- package/csharp/System/Collections/Generic/IList.d.ts +16 -7
- package/csharp/System/Collections/Generic/IReadOnlyCollection.d.ts +9 -3
- package/csharp/System/Collections/Generic/IReadOnlyDictionary.d.ts +15 -10
- package/csharp/System/Collections/Generic/IReadOnlyList.d.ts +9 -3
- package/csharp/System/Collections/Generic/KeyValuePair.d.ts +15 -8
- package/csharp/System/Collections/Generic/List.d.ts +149 -77
- package/csharp/System/Collections/ICollection.d.ts +17 -0
- package/csharp/System/Collections/IDictionary.d.ts +29 -0
- package/csharp/System/Collections/IDictionaryEnumerator.d.ts +14 -0
- package/csharp/System/Collections/IEnumerable.d.ts +9 -0
- package/csharp/System/Collections/IEnumerator.d.ts +13 -0
- package/csharp/System/Collections/IList.d.ts +30 -0
- package/csharp/System/DateTimeOffset.d.ts +8 -0
- package/csharp/System/Drawing/Bitmap.d.ts +8 -2
- package/csharp/System/Drawing/Color.d.ts +341 -2
- package/csharp/System/Drawing/Image.d.ts +8 -2
- package/csharp/System/Drawing/KnownColor.d.ts +357 -0
- package/csharp/System/Drawing/Pen.d.ts +8 -2
- package/csharp/System/Globalization/CultureInfo.d.ts +9 -0
- package/csharp/System/IAsyncDisposable.d.ts +10 -0
- package/csharp/System/IDisposable.d.ts +9 -0
- package/csharp/System/IEquatable.d.ts +8 -0
- package/csharp/System/Runtime/Serialization/IDeserializationCallback.d.ts +9 -0
- package/csharp/System/Runtime/Serialization/ISerializable.d.ts +9 -0
- package/csharp/System/Threading/CancellationToken.d.ts +58 -0
- package/csharp/System/Threading/CancellationTokenRegistration.d.ts +27 -0
- package/csharp/System/Threading/CancellationTokenSource.d.ts +51 -0
- package/csharp/System/Threading/ITimer.d.ts +12 -0
- package/csharp/System/Threading/Tasks/ValueTask.d.ts +12 -0
- package/csharp/System/Threading/WaitHandle.d.ts +8 -0
- package/csharp/System/TimeProvider.d.ts +31 -0
- package/csharp/System/TimeSpan.d.ts +8 -0
- package/csharp/System/Windows/Media/Matrix.d.ts +80 -0
- package/csharp/System/Windows/Point.d.ts +39 -5
- package/csharp/System/Windows/Vector.d.ts +51 -0
- package/index.d.ts +3 -0
- package/modules/dispatcher.d.ts +54 -3
- package/modules/file.d.ts +3 -3
- package/modules/genshin.d.ts +18 -1
- package/modules/globalMethod.d.ts +9 -5
- package/modules/http.d.ts +43 -0
- package/package.json +1 -1
- package/csharp/Vanara/PInvoke/POINT.d.ts +0 -23
- package/csharp/Vanara/PInvoke/RECT.d.ts +0 -37
- package/csharp/Vanara/PInvoke/SIZE.d.ts +0 -19
- package/enums/wood.d.ts +0 -27
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import "../IEquatable";
|
|
2
|
+
import "./CancellationTokenRegistration";
|
|
3
|
+
import "./WaitHandle";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace System.Threading {
|
|
7
|
+
class CancellationToken implements System.IEquatable<CancellationToken> {
|
|
8
|
+
isCancellationRequested: boolean;
|
|
9
|
+
|
|
10
|
+
canBeCanceled: boolean;
|
|
11
|
+
|
|
12
|
+
waitHandle: System.Threading.WaitHandle;
|
|
13
|
+
|
|
14
|
+
register(callback: () => void): System.Threading.CancellationTokenRegistration;
|
|
15
|
+
|
|
16
|
+
register(
|
|
17
|
+
callback: () => void,
|
|
18
|
+
useSynchronizationContext: boolean
|
|
19
|
+
): System.Threading.CancellationTokenRegistration;
|
|
20
|
+
|
|
21
|
+
register(
|
|
22
|
+
callback: (obj: any) => void,
|
|
23
|
+
state: any
|
|
24
|
+
): System.Threading.CancellationTokenRegistration;
|
|
25
|
+
|
|
26
|
+
register(
|
|
27
|
+
callback: (obj: any) => System.Threading.CancellationToken,
|
|
28
|
+
state: any
|
|
29
|
+
): System.Threading.CancellationTokenRegistration;
|
|
30
|
+
|
|
31
|
+
register(
|
|
32
|
+
callback: (obj: any) => void,
|
|
33
|
+
state: any,
|
|
34
|
+
useSynchronizationContext: boolean
|
|
35
|
+
): System.Threading.CancellationTokenRegistration;
|
|
36
|
+
|
|
37
|
+
unsafeRegister(
|
|
38
|
+
callback: (obj: any) => void,
|
|
39
|
+
state: any
|
|
40
|
+
): System.Threading.CancellationTokenRegistration;
|
|
41
|
+
|
|
42
|
+
unsafeRegister(
|
|
43
|
+
callback: (obj: any) => System.Threading.CancellationToken,
|
|
44
|
+
state: any
|
|
45
|
+
): System.Threading.CancellationTokenRegistration;
|
|
46
|
+
|
|
47
|
+
equals(other: CancellationToken | null): boolean;
|
|
48
|
+
|
|
49
|
+
throwIfCancellationRequested(): void;
|
|
50
|
+
|
|
51
|
+
static readonly none: System.Threading.CancellationToken;
|
|
52
|
+
|
|
53
|
+
constructor(canceled: boolean);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export import CancellationToken = System.Threading.CancellationToken;
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "../IAsyncDisposable";
|
|
2
|
+
import "../IDisposable";
|
|
3
|
+
import "../IEquatable";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace System.Threading {
|
|
7
|
+
class CancellationTokenRegistration
|
|
8
|
+
implements
|
|
9
|
+
System.IEquatable<CancellationTokenRegistration>,
|
|
10
|
+
System.IDisposable,
|
|
11
|
+
System.IAsyncDisposable
|
|
12
|
+
{
|
|
13
|
+
dispose(): void;
|
|
14
|
+
|
|
15
|
+
disposeAsync(): System.Threading.Tasks.ValueTask;
|
|
16
|
+
|
|
17
|
+
token: System.Threading.CancellationToken;
|
|
18
|
+
|
|
19
|
+
unregister(): boolean;
|
|
20
|
+
|
|
21
|
+
equals(other: CancellationTokenRegistration | null): boolean;
|
|
22
|
+
|
|
23
|
+
equals(other: System.Threading.CancellationTokenRegistration | null): boolean;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "../IDisposable";
|
|
2
|
+
import "../TimeProvider";
|
|
3
|
+
import "../TimeSpan";
|
|
4
|
+
import "./CancellationToken";
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace System.Threading {
|
|
8
|
+
class CancellationTokenSource implements System.IDisposable {
|
|
9
|
+
isCancellationRequested: boolean;
|
|
10
|
+
|
|
11
|
+
token: System.Threading.CancellationToken;
|
|
12
|
+
|
|
13
|
+
cancel(): void;
|
|
14
|
+
|
|
15
|
+
cancel(throwOnFirstException: boolean): void;
|
|
16
|
+
|
|
17
|
+
cancelAsync(): Promise<void>;
|
|
18
|
+
|
|
19
|
+
cancelAfter(delay: System.TimeSpan): void;
|
|
20
|
+
|
|
21
|
+
cancelAfter(millisecondsDelay: number): void;
|
|
22
|
+
|
|
23
|
+
tryReset(): boolean;
|
|
24
|
+
|
|
25
|
+
dispose(): void;
|
|
26
|
+
|
|
27
|
+
static createLinkedTokenSource(
|
|
28
|
+
token1: System.Threading.CancellationToken,
|
|
29
|
+
token2: System.Threading.CancellationToken
|
|
30
|
+
): System.Threading.CancellationTokenSource;
|
|
31
|
+
|
|
32
|
+
static createLinkedTokenSource(
|
|
33
|
+
token: System.Threading.CancellationToken
|
|
34
|
+
): System.Threading.CancellationTokenSource;
|
|
35
|
+
|
|
36
|
+
static createLinkedTokenSource(
|
|
37
|
+
tokens: System.Threading.CancellationToken[]
|
|
38
|
+
): System.Threading.CancellationTokenSource;
|
|
39
|
+
|
|
40
|
+
constructor();
|
|
41
|
+
|
|
42
|
+
constructor(delay: System.TimeSpan);
|
|
43
|
+
|
|
44
|
+
constructor(delay: System.TimeSpan, timeProvider: System.TimeProvider);
|
|
45
|
+
|
|
46
|
+
constructor(millisecondsDelay: number);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export import CancellationTokenSource = System.Threading.CancellationTokenSource;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../IAsyncDisposable";
|
|
2
|
+
import "../IDisposable";
|
|
3
|
+
import "../TimeSpan";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace System.Threading {
|
|
7
|
+
interface ITimer extends System.IDisposable, System.IAsyncDisposable {
|
|
8
|
+
change(dueTime: System.TimeSpan, period: System.TimeSpan): boolean;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "../System/Threading/ITimer";
|
|
2
|
+
import "./DateTimeOffset";
|
|
3
|
+
import "./TimeSpan";
|
|
4
|
+
|
|
5
|
+
declare global {
|
|
6
|
+
namespace System {
|
|
7
|
+
abstract class TimeProvider {
|
|
8
|
+
abstract getUtcNow(): System.DateTimeOffset;
|
|
9
|
+
|
|
10
|
+
abstract getLocalNow(): System.DateTimeOffset;
|
|
11
|
+
|
|
12
|
+
abstract timestampFrequency: bigint;
|
|
13
|
+
|
|
14
|
+
abstract getTimestamp(): bigint;
|
|
15
|
+
|
|
16
|
+
getElapsedTime(startingTimestamp: bigint, endingTimestamp: bigint): System.TimeSpan;
|
|
17
|
+
|
|
18
|
+
getElapsedTime(startingTimestamp: bigint): System.TimeSpan;
|
|
19
|
+
|
|
20
|
+
createTimer(
|
|
21
|
+
callback: (state: any) => void,
|
|
22
|
+
state: any,
|
|
23
|
+
dueTime: System.TimeSpan,
|
|
24
|
+
period: System.TimeSpan
|
|
25
|
+
): System.Threading.ITimer;
|
|
26
|
+
|
|
27
|
+
static system: System.TimeProvider;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import "../Vector";
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace System.Windows.Media {
|
|
5
|
+
class Matrix {
|
|
6
|
+
identity: Matrix;
|
|
7
|
+
|
|
8
|
+
readonly determinant: number;
|
|
9
|
+
|
|
10
|
+
readonly hasInverse: boolean;
|
|
11
|
+
|
|
12
|
+
readonly isIdentity: boolean;
|
|
13
|
+
|
|
14
|
+
m11: number;
|
|
15
|
+
|
|
16
|
+
m12: number;
|
|
17
|
+
|
|
18
|
+
m21: number;
|
|
19
|
+
|
|
20
|
+
m22: number;
|
|
21
|
+
|
|
22
|
+
offsetX: number;
|
|
23
|
+
|
|
24
|
+
offsetY: number;
|
|
25
|
+
|
|
26
|
+
append(matrix: Matrix): void;
|
|
27
|
+
|
|
28
|
+
prepend(matrix: Matrix): void;
|
|
29
|
+
|
|
30
|
+
rotate(angle: number): void;
|
|
31
|
+
|
|
32
|
+
rotatePrepend(angle: number): void;
|
|
33
|
+
|
|
34
|
+
rotateAt(angle: number, centerX: number, centerY: number): void;
|
|
35
|
+
|
|
36
|
+
rotateAtPrepend(angle: number, centerX: number, centerY: number): void;
|
|
37
|
+
|
|
38
|
+
scale(scaleX: number, scaleY: number): void;
|
|
39
|
+
|
|
40
|
+
scalePrepend(scaleX: number, scaleY: number): void;
|
|
41
|
+
|
|
42
|
+
scaleAt(scaleX: number, scaleY: number, centerX: number, centerY: number): void;
|
|
43
|
+
|
|
44
|
+
scaleAtPrepend(scaleX: number, scaleY: number, centerX: number, centerY: number): void;
|
|
45
|
+
|
|
46
|
+
skew(skewX: number, skewY: number): void;
|
|
47
|
+
|
|
48
|
+
skewPrepend(skewX: number, skewY: number): void;
|
|
49
|
+
|
|
50
|
+
translate(offsetX: number, offsetY: number): void;
|
|
51
|
+
|
|
52
|
+
translatePrepend(offsetX: number, offsetY: number): void;
|
|
53
|
+
|
|
54
|
+
transform(point: System.Windows.Point): System.Windows.Point;
|
|
55
|
+
|
|
56
|
+
transform(points: System.Windows.Point[]): void;
|
|
57
|
+
|
|
58
|
+
transform(vector: System.Windows.Vector): System.Windows.Vector;
|
|
59
|
+
|
|
60
|
+
transform(vectors: System.Windows.Vector[]): void;
|
|
61
|
+
|
|
62
|
+
invert(): void;
|
|
63
|
+
|
|
64
|
+
setIdentity(): void;
|
|
65
|
+
|
|
66
|
+
multiply(trans1: Matrix, trans2: Matrix): Matrix;
|
|
67
|
+
|
|
68
|
+
constructor(
|
|
69
|
+
m11: number,
|
|
70
|
+
m12: number,
|
|
71
|
+
m21: number,
|
|
72
|
+
m22: number,
|
|
73
|
+
offsetX: number,
|
|
74
|
+
offsetY: number
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {};
|
|
@@ -1,7 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
x: number;
|
|
1
|
+
import "./Media/Matrix";
|
|
2
|
+
import "./Vector";
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare global {
|
|
5
|
+
namespace System.Windows {
|
|
6
|
+
class Point {
|
|
7
|
+
x: number;
|
|
8
|
+
|
|
9
|
+
y: number;
|
|
10
|
+
|
|
11
|
+
offset(offsetX: number, offsetY: number): void;
|
|
12
|
+
|
|
13
|
+
multiply(
|
|
14
|
+
point: System.Windows.Point,
|
|
15
|
+
matrix: System.Windows.Media.Matrix
|
|
16
|
+
): System.Windows.Point;
|
|
17
|
+
|
|
18
|
+
equals(point: System.Windows.Point): boolean;
|
|
19
|
+
|
|
20
|
+
static add(point: System.Windows.Point, vector: System.Windows.Vector): System.Windows.Point;
|
|
21
|
+
|
|
22
|
+
static subtract(
|
|
23
|
+
point: System.Windows.Point,
|
|
24
|
+
vector: System.Windows.Vector
|
|
25
|
+
): System.Windows.Point;
|
|
26
|
+
|
|
27
|
+
static subtract(
|
|
28
|
+
point1: System.Windows.Point,
|
|
29
|
+
point2: System.Windows.Point
|
|
30
|
+
): System.Windows.Vector;
|
|
31
|
+
|
|
32
|
+
static equals(point1: System.Windows.Point, point2: System.Windows.Point): boolean;
|
|
33
|
+
|
|
34
|
+
static parse(source: string): System.Windows.Point;
|
|
35
|
+
|
|
36
|
+
constructor(x: number, y: number);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
7
39
|
}
|
|
40
|
+
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./Media/Matrix";
|
|
2
|
+
import "./Point";
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace System.Windows {
|
|
6
|
+
class Vector {
|
|
7
|
+
length: number;
|
|
8
|
+
|
|
9
|
+
lengthSquared: number;
|
|
10
|
+
|
|
11
|
+
normalize(): void;
|
|
12
|
+
|
|
13
|
+
negate(): void;
|
|
14
|
+
|
|
15
|
+
static crossProduct(vector1: System.Windows.Vector, vector2: System.Windows.Vector): number;
|
|
16
|
+
|
|
17
|
+
static angleBetween(vector1: System.Windows.Vector, vector2: System.Windows.Vector): number;
|
|
18
|
+
|
|
19
|
+
static add(
|
|
20
|
+
vector1: System.Windows.Vector,
|
|
21
|
+
vector2: System.Windows.Vector
|
|
22
|
+
): System.Windows.Vector;
|
|
23
|
+
|
|
24
|
+
static subtract(
|
|
25
|
+
vector1: System.Windows.Vector,
|
|
26
|
+
vector2: System.Windows.Vector
|
|
27
|
+
): System.Windows.Vector;
|
|
28
|
+
|
|
29
|
+
static add(vector: System.Windows.Vector, point: System.Windows.Point): System.Windows.Point;
|
|
30
|
+
|
|
31
|
+
static multiply(vector: System.Windows.Vector, scalar: number): System.Windows.Vector;
|
|
32
|
+
|
|
33
|
+
static multiply(scalar: number, vector: System.Windows.Vector): System.Windows.Vector;
|
|
34
|
+
|
|
35
|
+
static divide(vector: System.Windows.Vector, scalar: number): System.Windows.Vector;
|
|
36
|
+
|
|
37
|
+
static multiply(
|
|
38
|
+
vector: System.Windows.Vector,
|
|
39
|
+
matrix: System.Windows.Media.Matrix
|
|
40
|
+
): System.Windows.Vector;
|
|
41
|
+
|
|
42
|
+
static multiply(vector1: System.Windows.Vector, vector2: System.Windows.Vector): number;
|
|
43
|
+
|
|
44
|
+
static determinant(vector1: System.Windows.Vector, vector2: System.Windows.Vector): number;
|
|
45
|
+
|
|
46
|
+
constructor(x: number, y: number);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {};
|
package/index.d.ts
CHANGED
package/modules/dispatcher.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import "../csharp/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer";
|
|
2
2
|
import "../csharp/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask";
|
|
3
|
+
import "../csharp/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam";
|
|
4
|
+
import "../csharp/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam";
|
|
5
|
+
import "../csharp/System/Threading/CancellationToken";
|
|
6
|
+
import "../csharp/System/Threading/CancellationTokenSource";
|
|
3
7
|
|
|
4
8
|
declare global {
|
|
5
9
|
/** @since 0.32.5 */
|
|
@@ -15,21 +19,68 @@ declare global {
|
|
|
15
19
|
* @param timer 实时任务触发器
|
|
16
20
|
* @since 0.32.5
|
|
17
21
|
*/
|
|
18
|
-
function addTimer(timer: RealtimeTimer): void;
|
|
22
|
+
function addTimer(timer: BetterGenshinImpact.Core.Script.Dependence.Model.RealtimeTimer): void;
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
25
|
* 添加实时任务(不会清理之前的任务)
|
|
22
26
|
* @param timer 实时任务触发器
|
|
23
27
|
* @since 0.43.5
|
|
24
28
|
*/
|
|
25
|
-
function addTrigger(
|
|
29
|
+
function addTrigger(
|
|
30
|
+
timer: BetterGenshinImpact.Core.Script.Dependence.Model.RealtimeTimer
|
|
31
|
+
): void;
|
|
26
32
|
|
|
27
33
|
/**
|
|
28
34
|
* 运行独立任务
|
|
29
35
|
* @param soloTask 独立任务
|
|
30
36
|
* @since 0.34.5
|
|
31
37
|
*/
|
|
32
|
-
function runTask(
|
|
38
|
+
function runTask(
|
|
39
|
+
soloTask: BetterGenshinImpact.Core.Script.Dependence.Model.SoloTask,
|
|
40
|
+
customCts: System.Threading.CancellationTokenSource
|
|
41
|
+
): Promise<void>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 运行独立任务
|
|
45
|
+
* @param soloTask 独立任务
|
|
46
|
+
* @since 0.45.1
|
|
47
|
+
*/
|
|
48
|
+
function runTask(
|
|
49
|
+
soloTask: BetterGenshinImpact.Core.Script.Dependence.Model.SoloTask,
|
|
50
|
+
customCt?: System.Threading.CancellationToken
|
|
51
|
+
): Promise<void>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 获取关联的取消令牌源
|
|
55
|
+
* @since 0.46.0
|
|
56
|
+
*/
|
|
57
|
+
function getLinkedCancellationTokenSource(): System.Threading.CancellationTokenSource;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 获取关联的取消令牌
|
|
61
|
+
* @since 0.46.0
|
|
62
|
+
*/
|
|
63
|
+
function getLinkedCancellationToken(): System.Threading.CancellationToken;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 运行自动秘境任务
|
|
67
|
+
* @param param 秘境任务参数
|
|
68
|
+
* @since 0.52.0
|
|
69
|
+
*/
|
|
70
|
+
function runAutoDomainTask(
|
|
71
|
+
param: BetterGenshinImpact.GameTask.AutoDomain.AutoDomainParam,
|
|
72
|
+
customCt?: System.Threading.CancellationToken
|
|
73
|
+
): Promise<void>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 运行自动战斗任务
|
|
77
|
+
* @param param 战斗任务参数
|
|
78
|
+
* @since 0.52.0
|
|
79
|
+
*/
|
|
80
|
+
function runAutoFightTask(
|
|
81
|
+
param: BetterGenshinImpact.GameTask.AutoFight.AutoFightParam,
|
|
82
|
+
customCt?: System.Threading.CancellationToken
|
|
83
|
+
): Promise<void>;
|
|
33
84
|
}
|
|
34
85
|
}
|
|
35
86
|
|
package/modules/file.d.ts
CHANGED
|
@@ -18,21 +18,21 @@ declare global {
|
|
|
18
18
|
function isFolder(path: string): boolean;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`)
|
|
21
|
+
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`, `.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.webp`)
|
|
22
22
|
* @param path 文件路径(相对于脚本根目录)
|
|
23
23
|
* @since 0.32.3
|
|
24
24
|
*/
|
|
25
25
|
function readTextSync(path: string): string;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`)
|
|
28
|
+
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`, `.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.webp`)
|
|
29
29
|
* @param path 文件路径(相对于脚本根目录)
|
|
30
30
|
* @since 0.32.3
|
|
31
31
|
*/
|
|
32
32
|
function readText(path: string): Promise<string>;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`)
|
|
35
|
+
* 读取文件文本(支持文件扩展名:`.txt`, `.json`, `.log`, `.csv`, `.xml`, `.html`, `.css`, `.png`, `.jpg`, `.jpeg`, `.bmp`, `.tiff`, `.webp`)
|
|
36
36
|
* @param path 文件路径(相对于脚本根目录)
|
|
37
37
|
* @param callbackFunc 回调函数
|
|
38
38
|
* @since 0.32.3
|
package/modules/genshin.d.ts
CHANGED
|
@@ -132,15 +132,26 @@ declare global {
|
|
|
132
132
|
/**
|
|
133
133
|
* 获取当前在小地图上的 [Teyvat大地图] 位置坐标
|
|
134
134
|
* @since 0.44.3
|
|
135
|
+
* @deprecated 已弃用
|
|
135
136
|
*/
|
|
136
137
|
function getPositionFromMap(): Point2f;
|
|
137
138
|
|
|
138
139
|
/**
|
|
139
140
|
* 获取当前在小地图上的 [指定大地图] 位置坐标
|
|
140
141
|
* @param mapName 大地图名称
|
|
142
|
+
* @param cacheTimeMs 缓存时间(毫秒,默认值:900)
|
|
141
143
|
* @since 0.44.9
|
|
142
144
|
*/
|
|
143
|
-
function getPositionFromMap(mapName: BigMap): Point2f;
|
|
145
|
+
function getPositionFromMap(mapName: BigMap, cacheTimeMs?: number): Point2f;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 获取当前在小地图上的 [指定大地图] 位置坐标(仅在给定坐标附近匹配)
|
|
149
|
+
* @param mapName 大地图名称
|
|
150
|
+
* @param x 大地图坐标水平位置(像素)
|
|
151
|
+
* @param y 大地图坐标垂直位置(像素)
|
|
152
|
+
* @since 0.48.0
|
|
153
|
+
*/
|
|
154
|
+
function getPositionFromMap(mapName: BigMap, x: number, y: number): Point2f;
|
|
144
155
|
|
|
145
156
|
/**
|
|
146
157
|
* 切换队伍
|
|
@@ -149,6 +160,12 @@ declare global {
|
|
|
149
160
|
*/
|
|
150
161
|
function switchParty(partyName: string): Promise<boolean>;
|
|
151
162
|
|
|
163
|
+
/**
|
|
164
|
+
* 清除当前调度器的队伍缓存
|
|
165
|
+
* @since 0.48.0
|
|
166
|
+
*/
|
|
167
|
+
function clearPartyCache(): void;
|
|
168
|
+
|
|
152
169
|
/**
|
|
153
170
|
* 点击空月祝福
|
|
154
171
|
* @since 0.37.4
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { KeyCode } from "@/csharp/BetterGenshinImpact/Helpers/User32Helper";
|
|
2
|
+
import "../csharp/BetterGenshinImpact/GameTask/Model/Area/ImageRegion";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
|
-
var global: typeof globalThis;
|
|
6
|
-
|
|
7
5
|
/**
|
|
8
6
|
* 休眠执行指定时长
|
|
9
7
|
* @param duration - 休眠时长(毫秒)
|
|
@@ -130,7 +128,13 @@ declare global {
|
|
|
130
128
|
* 捕获当前游戏窗口内容
|
|
131
129
|
* @since 0.34.5
|
|
132
130
|
*/
|
|
133
|
-
function captureGameRegion(): ImageRegion;
|
|
131
|
+
function captureGameRegion(): BetterGenshinImpact.GameTask.Model.Area.ImageRegion;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 当前队伍 角色名称 数组
|
|
135
|
+
* @since 0.48.0
|
|
136
|
+
*/
|
|
137
|
+
function getAvatars(): string[];
|
|
134
138
|
|
|
135
139
|
/**
|
|
136
140
|
* 模拟输入文本
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
/** @since 0.52.0 */
|
|
3
|
+
namespace http {
|
|
4
|
+
/**
|
|
5
|
+
* 发送HTTP请求
|
|
6
|
+
* @param method 请求方法
|
|
7
|
+
* @param url 请求URL
|
|
8
|
+
* @param body 请求体(可选)
|
|
9
|
+
* @param headersJson 请求头(可选)
|
|
10
|
+
* @since 0.52.0
|
|
11
|
+
*/
|
|
12
|
+
function request(
|
|
13
|
+
method: HttpMethod,
|
|
14
|
+
url: string,
|
|
15
|
+
body?: string,
|
|
16
|
+
headersJson?: string
|
|
17
|
+
): Promise<HttpReponse>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
type HttpMethod =
|
|
22
|
+
| "GET"
|
|
23
|
+
| "PUT"
|
|
24
|
+
| "POST"
|
|
25
|
+
| "DELETE"
|
|
26
|
+
| "HEAD"
|
|
27
|
+
| "OPTIONS"
|
|
28
|
+
| "TRACE"
|
|
29
|
+
| "PATCH"
|
|
30
|
+
| "CONNECT";
|
|
31
|
+
|
|
32
|
+
type HttpReponse = {
|
|
33
|
+
/** 状态码 */
|
|
34
|
+
status_code: number;
|
|
35
|
+
|
|
36
|
+
/** 响应头 */
|
|
37
|
+
headers: Record<string, string>;
|
|
38
|
+
|
|
39
|
+
/** 响应体 */
|
|
40
|
+
body: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export {};
|