@nighthawk.hq/macro-sdk 0.3.0 → 0.4.0
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/lib/index.d.ts +1 -0
- package/lib/roblox/index.d.ts +18 -7
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { Setting, SettingMap, SettingGroup, RegionSetting, RatioSetting, Po
|
|
|
8
8
|
export { Group, Row, Stat, Chip, Divider, Button, Text, Meter, Image } from './widgets';
|
|
9
9
|
export type { Widget, PanelDeclaration, WidgetTone, WidgetSize, WidgetAlign, WidgetWeight, } from './panel-types';
|
|
10
10
|
export { Roblox, Instance } from './roblox/index';
|
|
11
|
+
export type { RobloxValidation } from './roblox/index';
|
|
11
12
|
export type { RobloxOffsets } from './roblox/offsets';
|
|
12
13
|
export type { UDim2, Vector3, TreeNode } from './roblox/instance';
|
|
13
14
|
export { offsetsFromDump } from './roblox/offsets-dump';
|
package/lib/roblox/index.d.ts
CHANGED
|
@@ -2,6 +2,18 @@ import { Address } from '../process/address';
|
|
|
2
2
|
import type { ProcessAccess } from '../process/process-access';
|
|
3
3
|
import { Instance } from './instance';
|
|
4
4
|
import type { RobloxOffsets } from './offsets';
|
|
5
|
+
/**
|
|
6
|
+
* Result of {@link Roblox.validate}. A discriminated union so the caller gets a single,
|
|
7
|
+
* ready-to-surface, user-facing `reason` for the failure — no macro has to author its
|
|
8
|
+
* own wording — while `problems` carries the diagnostic detail for logs.
|
|
9
|
+
*/
|
|
10
|
+
export type RobloxValidation = {
|
|
11
|
+
ok: true;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
reason: string;
|
|
15
|
+
problems: string[];
|
|
16
|
+
};
|
|
5
17
|
export declare class Roblox {
|
|
6
18
|
#private;
|
|
7
19
|
readonly process: ProcessAccess;
|
|
@@ -10,14 +22,13 @@ export declare class Roblox {
|
|
|
10
22
|
static bind(process: ProcessAccess, offsets: RobloxOffsets): Roblox;
|
|
11
23
|
invalidateCache(): void;
|
|
12
24
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
25
|
+
* Check the live game state + offsets and, on failure, return the real user-facing
|
|
26
|
+
* `reason` for it — so a macro just surfaces `check.reason` instead of authoring its
|
|
27
|
+
* own wording. The three failure modes are distinct: not attached (Roblox closed),
|
|
28
|
+
* attached but no DataModel (at the menu / still loading), and a resolved DataModel
|
|
29
|
+
* whose shape is wrong (offsets stale after a Roblox build bump).
|
|
16
30
|
*/
|
|
17
|
-
validate():
|
|
18
|
-
ok: boolean;
|
|
19
|
-
problems: string[];
|
|
20
|
-
};
|
|
31
|
+
validate(): RobloxValidation;
|
|
21
32
|
dataModel(): Instance | null;
|
|
22
33
|
service(name: string): Instance | null;
|
|
23
34
|
workspace(): Instance | null;
|