dredless 0.2.0 → 0.2.1
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/README.md +48 -48
- package/docs/API_REFERENCE.md +2481 -2481
- package/docs/BROWSER_API.md +98 -98
- package/docs/NODE_API.md +359 -359
- package/package.json +34 -34
- package/src/browser.d.ts +212 -212
- package/src/browser.js +133 -133
- package/src/client/core.js +1202 -1202
- package/src/client/domains/index.js +1818 -1818
- package/src/client/index.d.ts +2 -2
- package/src/client/index.js +1 -1
- package/src/compression/lz4.d.ts +1 -1
- package/src/compression/lz4.js +112 -112
- package/src/constants.js +74 -74
- package/src/crypto/chacha-native.d.ts +9 -9
- package/src/crypto/chacha-native.js +48 -48
- package/src/crypto/chacha.d.ts +25 -25
- package/src/crypto/chacha.js +274 -274
- package/src/events.js +39 -39
- package/src/index.d.ts +2277 -2277
- package/src/index.js +125 -125
- package/src/network/browser-session.js +291 -291
- package/src/network/connection.d.ts +1 -1
- package/src/network/connection.js +31 -31
- package/src/network/cookies.js +85 -85
- package/src/network/http.js +34 -34
- package/src/network/index.d.ts +4 -4
- package/src/network/index.js +4 -4
- package/src/network/servers.d.ts +7 -7
- package/src/network/servers.js +133 -133
- package/src/network/session.d.ts +7 -7
- package/src/network/session.js +320 -320
- package/src/network/ships.d.ts +12 -12
- package/src/network/ships.js +73 -73
- package/src/node.d.ts +2 -2
- package/src/node.js +8 -8
- package/src/protocol/codec/binary.d.ts +3 -3
- package/src/protocol/codec/binary.js +52 -52
- package/src/protocol/codec/msgpack.d.ts +3 -3
- package/src/protocol/codec/msgpack.js +555 -555
- package/src/protocol/inbound/frame.d.ts +1 -1
- package/src/protocol/inbound/frame.js +8 -8
- package/src/protocol/inbound/world-payload.d.ts +3 -3
- package/src/protocol/inbound/world-payload.js +21 -21
- package/src/protocol/index.d.ts +11 -11
- package/src/protocol/index.js +19 -19
- package/src/protocol/outbound/blueprint.d.ts +22 -22
- package/src/protocol/outbound/blueprint.js +36 -36
- package/src/protocol/outbound/commands.d.ts +3 -3
- package/src/protocol/outbound/commands.js +149 -149
- package/src/protocol/outbound/comms.d.ts +28 -28
- package/src/protocol/outbound/comms.js +40 -40
- package/src/protocol/outbound/inventory.d.ts +64 -64
- package/src/protocol/outbound/inventory.js +147 -147
- package/src/protocol/outbound/ship-management.d.ts +84 -84
- package/src/protocol/outbound/ship-management.js +221 -221
- package/src/protocol/outbound/sign.d.ts +18 -18
- package/src/protocol/outbound/sign.js +45 -45
- package/src/protocol/outbound/ui-config.d.ts +157 -157
- package/src/protocol/outbound/ui-config.js +578 -578
- package/src/runtime.js +36 -36
- package/src/state/generator-maze.d.ts +32 -32
- package/src/state/generator-maze.js +370 -370
- package/src/state/index.d.ts +3 -3
- package/src/state/index.js +3 -3
- package/src/state/items.js +20 -20
- package/src/state/model/decoder.js +1554 -1554
- package/src/state/model/index.d.ts +33 -33
- package/src/state/model/index.js +2 -2
- package/src/state/model/loader-config.js +1020 -1020
- package/src/state/model/reader.js +69 -69
- package/src/state/model/state.js +1257 -1257
- package/src/state/overworld.js +72 -72
- package/src/state/tilesets.js +53 -53
- package/src/state/world/index.d.ts +29 -29
- package/src/state/world/index.js +180 -180
- package/src/state/world/state.js +297 -297
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
export interface NavigationUnitConfig {
|
|
2
|
-
destination: number;
|
|
3
|
-
page?: number;
|
|
4
|
-
warp?: boolean | "start" | "idle" | "cancel";
|
|
5
|
-
autoWarpOnShieldFailure?: boolean;
|
|
6
|
-
autoWarpOnNoCaptains?: boolean;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const PusherMode: {
|
|
10
|
-
readonly Push: "push";
|
|
11
|
-
readonly Pull: "pull";
|
|
12
|
-
readonly DoNothing: "do-nothing";
|
|
13
|
-
};
|
|
14
|
-
export type PusherMode = typeof PusherMode[keyof typeof PusherMode];
|
|
15
|
-
export const LoaderPosition: {
|
|
16
|
-
readonly TopLeft: "top-left";
|
|
17
|
-
readonly TopMiddle: "top-middle";
|
|
18
|
-
readonly TopRight: "top-right";
|
|
19
|
-
readonly MiddleLeft: "middle-left";
|
|
20
|
-
readonly MiddleRight: "middle-right";
|
|
21
|
-
readonly BottomLeft: "bottom-left";
|
|
22
|
-
readonly BottomMiddle: "bottom-middle";
|
|
23
|
-
readonly BottomRight: "bottom-right";
|
|
24
|
-
};
|
|
25
|
-
export type LoaderPosition = typeof LoaderPosition[keyof typeof LoaderPosition];
|
|
26
|
-
export const LoaderFilterMode: {
|
|
27
|
-
readonly AllowAll: "allow-all";
|
|
28
|
-
readonly BlockFilter: "block-filter";
|
|
29
|
-
readonly AllowFilter: "allow-filter";
|
|
30
|
-
readonly BlockAll: "block-all";
|
|
31
|
-
};
|
|
32
|
-
export type LoaderFilterMode = typeof LoaderFilterMode[keyof typeof LoaderFilterMode];
|
|
33
|
-
export const LoaderPriority: {
|
|
34
|
-
readonly Low: "low";
|
|
35
|
-
readonly Normal: "normal";
|
|
36
|
-
readonly High: "high";
|
|
37
|
-
};
|
|
38
|
-
export type LoaderPriority = typeof LoaderPriority[keyof typeof LoaderPriority];
|
|
39
|
-
export type ClipboardTarget =
|
|
40
|
-
number
|
|
41
|
-
| "loader"
|
|
42
|
-
| "loader-config"
|
|
43
|
-
| "loaderConfig"
|
|
44
|
-
| "hatch"
|
|
45
|
-
| "cargo-hatch"
|
|
46
|
-
| "cargoHatch"
|
|
47
|
-
| "ejector"
|
|
48
|
-
| "cargo-ejector"
|
|
49
|
-
| "cargoEjector"
|
|
50
|
-
| "expando"
|
|
51
|
-
| "expando-box"
|
|
52
|
-
| "expandoBox"
|
|
53
|
-
| "generator"
|
|
54
|
-
| "shield-generator"
|
|
55
|
-
| "shieldGenerator"
|
|
56
|
-
| "navigation"
|
|
57
|
-
| "navigation-unit"
|
|
58
|
-
| "navigationUnit"
|
|
59
|
-
| "nav"
|
|
60
|
-
| "nav-unit"
|
|
61
|
-
| "navUnit";
|
|
62
|
-
export const FixedAngleDirection: {
|
|
63
|
-
readonly Right: "right";
|
|
64
|
-
readonly Up: "up";
|
|
65
|
-
readonly Left: "left";
|
|
66
|
-
readonly Down: "down";
|
|
67
|
-
};
|
|
68
|
-
export type FixedAngleDirection = typeof FixedAngleDirection[keyof typeof FixedAngleDirection];
|
|
69
|
-
|
|
70
|
-
export interface PusherConfig {
|
|
71
|
-
mode?: PusherMode;
|
|
72
|
-
filteredMode?: PusherMode;
|
|
73
|
-
angle?: number;
|
|
74
|
-
speed?: number;
|
|
75
|
-
filterInventory?: boolean;
|
|
76
|
-
length?: number;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export interface LoaderConfig {
|
|
80
|
-
pick?: LoaderPosition;
|
|
81
|
-
place?: LoaderPosition;
|
|
82
|
-
priority?: LoaderPriority;
|
|
83
|
-
stack?: number;
|
|
84
|
-
cycle?: number;
|
|
85
|
-
requireOutput?: boolean;
|
|
86
|
-
waitForStack?: boolean;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface LoaderFullConfig extends LoaderConfig {
|
|
90
|
-
filterMode?: LoaderFilterMode;
|
|
91
|
-
filterSlots?: Array<number | null | undefined>;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function buildNavigationUnitConfigData(entity: number, config: NavigationUnitConfig): Uint8Array;
|
|
95
|
-
|
|
96
|
-
export function buildNavigationUnitClipboardConfigData(config: NavigationUnitConfig): Uint8Array;
|
|
97
|
-
|
|
98
|
-
export function buildNavigationUnitPasteConfigData(entity: number, config: NavigationUnitConfig): Uint8Array;
|
|
99
|
-
|
|
100
|
-
export function buildGeneratorMazePuzzleData(entity: number, solution: string | number): Uint8Array;
|
|
101
|
-
|
|
102
|
-
export function buildCargoHatchFilterConfigData(entity: number, filterMode?: LoaderFilterMode): Uint8Array;
|
|
103
|
-
|
|
104
|
-
export function buildCargoHatchFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
105
|
-
|
|
106
|
-
export function buildCargoHatchFullConfigData(entity: number, config?: Pick<LoaderFullConfig, "filterMode" | "filterSlots">): Uint8Array;
|
|
107
|
-
|
|
108
|
-
export function buildCargoHatchCopyConfigData(config?: Pick<LoaderFullConfig, "filterMode" | "filterSlots">): Uint8Array;
|
|
109
|
-
|
|
110
|
-
export function buildClipboardConfigData(target: ClipboardTarget, commandName: string, values?: Iterable<number>): Uint8Array;
|
|
111
|
-
|
|
112
|
-
export function buildClipboardFixedAngleData(target: ClipboardTarget, direction: FixedAngleDirection): Uint8Array;
|
|
113
|
-
|
|
114
|
-
export function buildGeneratorClipboardDirectionData(direction: FixedAngleDirection): Uint8Array;
|
|
115
|
-
|
|
116
|
-
export function buildCargoEjectorDirectionData(entity: number, direction: FixedAngleDirection): Uint8Array;
|
|
117
|
-
|
|
118
|
-
export function buildCargoEjectorPasteConfigData(entity: number, direction: FixedAngleDirection): Uint8Array;
|
|
119
|
-
|
|
120
|
-
export function buildCargoEjectorCopyConfigData(direction: FixedAngleDirection): Uint8Array;
|
|
121
|
-
|
|
122
|
-
export function buildCargoEjectorClipboardDirectionData(direction: FixedAngleDirection): Uint8Array;
|
|
123
|
-
|
|
124
|
-
export function buildExpandoClipboardAngleData(angle: number): Uint8Array;
|
|
125
|
-
|
|
126
|
-
export function buildLoaderClipboardConfigData(config?: LoaderConfig): Uint8Array;
|
|
127
|
-
|
|
128
|
-
export function buildLoaderConfigData(entity: number, config?: LoaderConfig): Uint8Array;
|
|
129
|
-
|
|
130
|
-
export function buildLoaderCopyConfigData(config?: LoaderFullConfig): Uint8Array;
|
|
131
|
-
|
|
132
|
-
export function buildLoaderFilterConfigData(entity: number, filterMode?: LoaderFilterMode): Uint8Array;
|
|
133
|
-
|
|
134
|
-
export function buildLoaderFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
135
|
-
|
|
136
|
-
export function buildLoaderFullConfigData(entity: number, config?: LoaderFullConfig): Uint8Array;
|
|
137
|
-
|
|
138
|
-
export function buildPusherConfigData(entity: number, config?: PusherConfig): Uint8Array;
|
|
139
|
-
|
|
140
|
-
export function buildPusherFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
141
|
-
|
|
142
|
-
export const CLIPBOARD_ACTION: 1;
|
|
143
|
-
export const CLIPBOARD_ANGLE_COMMAND: "angle";
|
|
144
|
-
export const CLIPBOARD_FIXED_ANGLE_COMMAND: "angle_fixed";
|
|
145
|
-
export const CLIPBOARD_TARGET_VALUES: Map<string, number>;
|
|
146
|
-
export const FIXED_ANGLE_VALUES: Map<FixedAngleDirection, 0 | 1 | 2 | 3>;
|
|
147
|
-
export const GENERATOR_MAZE_PUZZLE_COMMAND: "maze_puzzle";
|
|
148
|
-
export const LOADER_CONFIG_COMMAND: "config_loader";
|
|
149
|
-
export const LOADER_FALSE: 0x8e;
|
|
150
|
-
export const LOADER_FILTER_CONFIG_COMMAND: "filter_config";
|
|
151
|
-
export const LOADER_FILTER_ITEMS_COMMAND: "filter_items";
|
|
152
|
-
export const LOADER_TRUE: 0x8d;
|
|
153
|
-
export const NAV_UNIT_COMMAND: "config_nav_unit";
|
|
154
|
-
export const NAV_UNIT_FALSE: 0x8d;
|
|
155
|
-
export const NAV_UNIT_TRUE: 0x8e;
|
|
156
|
-
export const PUSHER_CONFIG_COMMAND: "config_pusher";
|
|
157
|
-
export const PUSHER_FILTER_ITEMS_COMMAND: "filter_items";
|
|
1
|
+
export interface NavigationUnitConfig {
|
|
2
|
+
destination: number;
|
|
3
|
+
page?: number;
|
|
4
|
+
warp?: boolean | "start" | "idle" | "cancel";
|
|
5
|
+
autoWarpOnShieldFailure?: boolean;
|
|
6
|
+
autoWarpOnNoCaptains?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const PusherMode: {
|
|
10
|
+
readonly Push: "push";
|
|
11
|
+
readonly Pull: "pull";
|
|
12
|
+
readonly DoNothing: "do-nothing";
|
|
13
|
+
};
|
|
14
|
+
export type PusherMode = typeof PusherMode[keyof typeof PusherMode];
|
|
15
|
+
export const LoaderPosition: {
|
|
16
|
+
readonly TopLeft: "top-left";
|
|
17
|
+
readonly TopMiddle: "top-middle";
|
|
18
|
+
readonly TopRight: "top-right";
|
|
19
|
+
readonly MiddleLeft: "middle-left";
|
|
20
|
+
readonly MiddleRight: "middle-right";
|
|
21
|
+
readonly BottomLeft: "bottom-left";
|
|
22
|
+
readonly BottomMiddle: "bottom-middle";
|
|
23
|
+
readonly BottomRight: "bottom-right";
|
|
24
|
+
};
|
|
25
|
+
export type LoaderPosition = typeof LoaderPosition[keyof typeof LoaderPosition];
|
|
26
|
+
export const LoaderFilterMode: {
|
|
27
|
+
readonly AllowAll: "allow-all";
|
|
28
|
+
readonly BlockFilter: "block-filter";
|
|
29
|
+
readonly AllowFilter: "allow-filter";
|
|
30
|
+
readonly BlockAll: "block-all";
|
|
31
|
+
};
|
|
32
|
+
export type LoaderFilterMode = typeof LoaderFilterMode[keyof typeof LoaderFilterMode];
|
|
33
|
+
export const LoaderPriority: {
|
|
34
|
+
readonly Low: "low";
|
|
35
|
+
readonly Normal: "normal";
|
|
36
|
+
readonly High: "high";
|
|
37
|
+
};
|
|
38
|
+
export type LoaderPriority = typeof LoaderPriority[keyof typeof LoaderPriority];
|
|
39
|
+
export type ClipboardTarget =
|
|
40
|
+
number
|
|
41
|
+
| "loader"
|
|
42
|
+
| "loader-config"
|
|
43
|
+
| "loaderConfig"
|
|
44
|
+
| "hatch"
|
|
45
|
+
| "cargo-hatch"
|
|
46
|
+
| "cargoHatch"
|
|
47
|
+
| "ejector"
|
|
48
|
+
| "cargo-ejector"
|
|
49
|
+
| "cargoEjector"
|
|
50
|
+
| "expando"
|
|
51
|
+
| "expando-box"
|
|
52
|
+
| "expandoBox"
|
|
53
|
+
| "generator"
|
|
54
|
+
| "shield-generator"
|
|
55
|
+
| "shieldGenerator"
|
|
56
|
+
| "navigation"
|
|
57
|
+
| "navigation-unit"
|
|
58
|
+
| "navigationUnit"
|
|
59
|
+
| "nav"
|
|
60
|
+
| "nav-unit"
|
|
61
|
+
| "navUnit";
|
|
62
|
+
export const FixedAngleDirection: {
|
|
63
|
+
readonly Right: "right";
|
|
64
|
+
readonly Up: "up";
|
|
65
|
+
readonly Left: "left";
|
|
66
|
+
readonly Down: "down";
|
|
67
|
+
};
|
|
68
|
+
export type FixedAngleDirection = typeof FixedAngleDirection[keyof typeof FixedAngleDirection];
|
|
69
|
+
|
|
70
|
+
export interface PusherConfig {
|
|
71
|
+
mode?: PusherMode;
|
|
72
|
+
filteredMode?: PusherMode;
|
|
73
|
+
angle?: number;
|
|
74
|
+
speed?: number;
|
|
75
|
+
filterInventory?: boolean;
|
|
76
|
+
length?: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface LoaderConfig {
|
|
80
|
+
pick?: LoaderPosition;
|
|
81
|
+
place?: LoaderPosition;
|
|
82
|
+
priority?: LoaderPriority;
|
|
83
|
+
stack?: number;
|
|
84
|
+
cycle?: number;
|
|
85
|
+
requireOutput?: boolean;
|
|
86
|
+
waitForStack?: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface LoaderFullConfig extends LoaderConfig {
|
|
90
|
+
filterMode?: LoaderFilterMode;
|
|
91
|
+
filterSlots?: Array<number | null | undefined>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function buildNavigationUnitConfigData(entity: number, config: NavigationUnitConfig): Uint8Array;
|
|
95
|
+
|
|
96
|
+
export function buildNavigationUnitClipboardConfigData(config: NavigationUnitConfig): Uint8Array;
|
|
97
|
+
|
|
98
|
+
export function buildNavigationUnitPasteConfigData(entity: number, config: NavigationUnitConfig): Uint8Array;
|
|
99
|
+
|
|
100
|
+
export function buildGeneratorMazePuzzleData(entity: number, solution: string | number): Uint8Array;
|
|
101
|
+
|
|
102
|
+
export function buildCargoHatchFilterConfigData(entity: number, filterMode?: LoaderFilterMode): Uint8Array;
|
|
103
|
+
|
|
104
|
+
export function buildCargoHatchFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
105
|
+
|
|
106
|
+
export function buildCargoHatchFullConfigData(entity: number, config?: Pick<LoaderFullConfig, "filterMode" | "filterSlots">): Uint8Array;
|
|
107
|
+
|
|
108
|
+
export function buildCargoHatchCopyConfigData(config?: Pick<LoaderFullConfig, "filterMode" | "filterSlots">): Uint8Array;
|
|
109
|
+
|
|
110
|
+
export function buildClipboardConfigData(target: ClipboardTarget, commandName: string, values?: Iterable<number>): Uint8Array;
|
|
111
|
+
|
|
112
|
+
export function buildClipboardFixedAngleData(target: ClipboardTarget, direction: FixedAngleDirection): Uint8Array;
|
|
113
|
+
|
|
114
|
+
export function buildGeneratorClipboardDirectionData(direction: FixedAngleDirection): Uint8Array;
|
|
115
|
+
|
|
116
|
+
export function buildCargoEjectorDirectionData(entity: number, direction: FixedAngleDirection): Uint8Array;
|
|
117
|
+
|
|
118
|
+
export function buildCargoEjectorPasteConfigData(entity: number, direction: FixedAngleDirection): Uint8Array;
|
|
119
|
+
|
|
120
|
+
export function buildCargoEjectorCopyConfigData(direction: FixedAngleDirection): Uint8Array;
|
|
121
|
+
|
|
122
|
+
export function buildCargoEjectorClipboardDirectionData(direction: FixedAngleDirection): Uint8Array;
|
|
123
|
+
|
|
124
|
+
export function buildExpandoClipboardAngleData(angle: number): Uint8Array;
|
|
125
|
+
|
|
126
|
+
export function buildLoaderClipboardConfigData(config?: LoaderConfig): Uint8Array;
|
|
127
|
+
|
|
128
|
+
export function buildLoaderConfigData(entity: number, config?: LoaderConfig): Uint8Array;
|
|
129
|
+
|
|
130
|
+
export function buildLoaderCopyConfigData(config?: LoaderFullConfig): Uint8Array;
|
|
131
|
+
|
|
132
|
+
export function buildLoaderFilterConfigData(entity: number, filterMode?: LoaderFilterMode): Uint8Array;
|
|
133
|
+
|
|
134
|
+
export function buildLoaderFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
135
|
+
|
|
136
|
+
export function buildLoaderFullConfigData(entity: number, config?: LoaderFullConfig): Uint8Array;
|
|
137
|
+
|
|
138
|
+
export function buildPusherConfigData(entity: number, config?: PusherConfig): Uint8Array;
|
|
139
|
+
|
|
140
|
+
export function buildPusherFilterItemsData(entity: number, filterSlots?: Array<number | null | undefined>): Uint8Array;
|
|
141
|
+
|
|
142
|
+
export const CLIPBOARD_ACTION: 1;
|
|
143
|
+
export const CLIPBOARD_ANGLE_COMMAND: "angle";
|
|
144
|
+
export const CLIPBOARD_FIXED_ANGLE_COMMAND: "angle_fixed";
|
|
145
|
+
export const CLIPBOARD_TARGET_VALUES: Map<string, number>;
|
|
146
|
+
export const FIXED_ANGLE_VALUES: Map<FixedAngleDirection, 0 | 1 | 2 | 3>;
|
|
147
|
+
export const GENERATOR_MAZE_PUZZLE_COMMAND: "maze_puzzle";
|
|
148
|
+
export const LOADER_CONFIG_COMMAND: "config_loader";
|
|
149
|
+
export const LOADER_FALSE: 0x8e;
|
|
150
|
+
export const LOADER_FILTER_CONFIG_COMMAND: "filter_config";
|
|
151
|
+
export const LOADER_FILTER_ITEMS_COMMAND: "filter_items";
|
|
152
|
+
export const LOADER_TRUE: 0x8d;
|
|
153
|
+
export const NAV_UNIT_COMMAND: "config_nav_unit";
|
|
154
|
+
export const NAV_UNIT_FALSE: 0x8d;
|
|
155
|
+
export const NAV_UNIT_TRUE: 0x8e;
|
|
156
|
+
export const PUSHER_CONFIG_COMMAND: "config_pusher";
|
|
157
|
+
export const PUSHER_FILTER_ITEMS_COMMAND: "filter_items";
|