@league-of-foundry-developers/foundry-vtt-types 9.249.3 → 9.255.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 +1 -1
- package/package.json +2 -2
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -3
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +8 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +7 -1
- package/src/foundry/common/types.mjs.d.ts +120 -8
- package/src/foundry/common/utils/helpers.mjs.d.ts +0 -1
- package/src/foundry/common/utils/http.mjs.d.ts +52 -0
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +2 -2
- package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
- package/src/foundry/foundry.js/avClient.d.ts +15 -1
- package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
- package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
- package/src/foundry/foundry.js/avMaster.d.ts +21 -48
- package/src/foundry/foundry.js/avSettings.d.ts +19 -46
- package/src/foundry/foundry.js/canvas.d.ts +0 -8
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +6 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +22 -20
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
- package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
- package/src/foundry/foundry.js/clientSettings.d.ts +203 -230
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +3 -1
- package/src/foundry/foundry.js/config.d.ts +3 -0
- package/src/foundry/foundry.js/game.d.ts +1 -1
- package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
- package/src/foundry/foundry.js/pixi/containers/baseGrid.d.ts +21 -6
- package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
- package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +4 -2
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +31 -17
- package/src/foundry/foundry.js/rollTerms/diceTerms/die.d.ts +0 -5
- package/src/foundry/foundry.js/rollTerms/diceTerms/fateDie.d.ts +21 -1
- package/src/foundry/foundry.js/videoHelper.d.ts +0 -7
- package/src/foundry/index.d.ts +0 -4
- package/src/types/helperTypes.d.ts +6 -0
- package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
- package/src/foundry/foundry.js/features.d.ts +0 -0
- package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -1,249 +1,222 @@
|
|
1
|
-
|
2
|
-
* A class responsible for managing defined game settings or settings menus.
|
3
|
-
* Each setting is a string key/value pair belonging to a certain package and a certain store scope.
|
4
|
-
*
|
5
|
-
* When Foundry Virtual Tabletop is initialized, a singleton instance of this class is constructed within the global
|
6
|
-
* Game object as as game.settings.
|
7
|
-
*
|
8
|
-
* @see {@link Game#settings}
|
9
|
-
* @see {@link Settings}
|
10
|
-
* @see {@link SettingsConfig}
|
11
|
-
*/
|
12
|
-
declare class ClientSettings {
|
13
|
-
constructor(worldSettings?: Setting['data']['_source'][]);
|
1
|
+
import type { DocumentSubTypes, DocumentType } from '../../types/helperTypes';
|
14
2
|
|
15
|
-
|
16
|
-
* A object of registered game settings for this scope
|
17
|
-
*/
|
18
|
-
settings: Map<string, ClientSettings.CompleteSetting>;
|
3
|
+
import type { TokenDataSource } from '../common/data/data.mjs/tokenData';
|
19
4
|
|
5
|
+
declare global {
|
20
6
|
/**
|
21
|
-
*
|
7
|
+
* A class responsible for managing defined game settings or settings menus.
|
8
|
+
* Each setting is a string key/value pair belonging to a certain package and a certain store scope.
|
9
|
+
*
|
10
|
+
* When Foundry Virtual Tabletop is initialized, a singleton instance of this class is constructed within the global
|
11
|
+
* Game object as as game.settings.
|
12
|
+
*
|
13
|
+
* @see {@link Game#settings}
|
14
|
+
* @see {@link Settings}
|
15
|
+
* @see {@link SettingsConfig}
|
22
16
|
*/
|
23
|
-
|
17
|
+
class ClientSettings {
|
18
|
+
constructor(worldSettings?: Setting['data']['_source'][]);
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
*/
|
30
|
-
storage: Map<string, Storage | WorldSettings>;
|
20
|
+
/**
|
21
|
+
* A object of registered game settings for this scope
|
22
|
+
*/
|
23
|
+
settings: Map<string, SettingConfig>;
|
31
24
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
/**
|
26
|
+
* Registered settings menus which trigger secondary applications
|
27
|
+
*/
|
28
|
+
menus: Map<string, SettingSubmenuConfig>;
|
36
29
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
/**
|
31
|
+
* The storage interfaces used for persisting settings
|
32
|
+
* Each storage interface shares the same API as window.localStorage
|
33
|
+
* @remarks This is a lie, it doesn't actually have the same interface...
|
34
|
+
*/
|
35
|
+
storage: Map<string, Storage | WorldSettings>;
|
41
36
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
* @param key - The key name for the setting under the namespace module
|
47
|
-
* @param data - Configuration for setting data
|
48
|
-
* @typeParam M - The module name to register the setting for
|
49
|
-
* @typeParam K - The key to register the setting for
|
50
|
-
* @typeParam T - The type of the setting value
|
51
|
-
*
|
52
|
-
* @example
|
53
|
-
* ```typescript
|
54
|
-
* // Register a client setting
|
55
|
-
* game.settings.register("myModule", "myClientSetting", {
|
56
|
-
* name: "Register a Module Setting with Choices",
|
57
|
-
* hint: "A description of the registered setting and its behavior.",
|
58
|
-
* scope: "client", // This specifies a client-stored setting
|
59
|
-
* config: true, // This specifies that the setting appears in the configuration view
|
60
|
-
* type: String,
|
61
|
-
* choices: { // If choices are defined, the resulting setting will be a select menu
|
62
|
-
* "a": "Option A",
|
63
|
-
* "b": "Option B"
|
64
|
-
* },
|
65
|
-
* default: "a", // The default value for the setting
|
66
|
-
* onChange: value => { // A callback function which triggers when the setting is changed
|
67
|
-
* console.log(value)
|
68
|
-
* }
|
69
|
-
* });
|
70
|
-
* ```
|
71
|
-
*
|
72
|
-
* @example
|
73
|
-
* ```typescript
|
74
|
-
* // Register a world setting
|
75
|
-
* game.settings.register("myModule", "myWorldSetting", {
|
76
|
-
* name: "Register a Module Setting with a Range slider",
|
77
|
-
* hint: "A description of the registered setting and its behavior.",
|
78
|
-
* scope: "world", // This specifies a world-level setting
|
79
|
-
* config: true, // This specifies that the setting appears in the configuration view
|
80
|
-
* type: Number,
|
81
|
-
* range: { // If range is specified, the resulting setting will be a range slider
|
82
|
-
* min: 0,
|
83
|
-
* max: 100,
|
84
|
-
* step: 10
|
85
|
-
* }
|
86
|
-
* default: 50, // The default value for the setting
|
87
|
-
* onChange: value => { // A callback function which triggers when the setting is changed
|
88
|
-
* console.log(value)
|
89
|
-
* }
|
90
|
-
* });
|
91
|
-
* ```
|
92
|
-
*/
|
93
|
-
register<M extends string, K extends string, T>(
|
94
|
-
module: M,
|
95
|
-
key: K,
|
96
|
-
data: ClientSettings.Values[`${M}.${K}`] extends boolean | number | bigint | string | symbol | object
|
97
|
-
? ClientSettings.PartialSetting<ClientSettings.Values[`${M}.${K}`]>
|
98
|
-
: ClientSettings.PartialSetting<T>
|
99
|
-
): void;
|
37
|
+
/**
|
38
|
+
* The types of settings which should be constructed as a primitive type
|
39
|
+
*/
|
40
|
+
protected static PRIMITIVE_TYPES: [typeof String, typeof Number, typeof Boolean, typeof Array];
|
100
41
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
* @param key - The key name for the setting under the namespace module
|
106
|
-
* @param data - Configuration for setting data
|
107
|
-
* @typeParam M - The module name to register the menu setting for
|
108
|
-
* @typeParam K - The key to register the menu setting for
|
109
|
-
*
|
110
|
-
* @example
|
111
|
-
* ```typescript
|
112
|
-
* // Define a settings submenu which handles advanced configuration needs
|
113
|
-
* game.settings.registerMenu("myModule", "mySettingsMenu", {
|
114
|
-
* name: "My Settings Submenu",
|
115
|
-
* label: "Settings Menu Label", // The text label used in the button
|
116
|
-
* hint: "A description of what will occur in the submenu dialog.",
|
117
|
-
* icon: "fas fa-bars", // A Font Awesome icon used in the submenu button
|
118
|
-
* type: MySubmenuApplicationClass, // A FormApplication subclass which should be created
|
119
|
-
* restricted: true // Restrict this submenu to gamemaster only?
|
120
|
-
* });
|
121
|
-
* ```
|
122
|
-
*/
|
123
|
-
registerMenu<M extends string, K extends string>(
|
124
|
-
module: M,
|
125
|
-
key: K,
|
126
|
-
data: ClientSettings.RegisteredMenuSettings[`${M}.${K}`]
|
127
|
-
): void;
|
128
|
-
|
129
|
-
/**
|
130
|
-
* Get the value of a game setting for a certain module and setting key
|
131
|
-
*
|
132
|
-
* @param module - The module namespace under which the setting is registered
|
133
|
-
* @param key - The setting key to retrieve
|
134
|
-
* @typeParam M - The module name to register the get for
|
135
|
-
* @typeParam K - The key to get the setting for
|
136
|
-
*
|
137
|
-
* @example
|
138
|
-
* ```typescript
|
139
|
-
* // Retrieve the current setting value
|
140
|
-
* game.settings.get("myModule", "myClientSetting");
|
141
|
-
* ```
|
142
|
-
*/
|
143
|
-
get<M extends string, K extends string>(module: M, key: K): ClientSettings.Values[`${M}.${K}`];
|
42
|
+
/**
|
43
|
+
* Return a singleton instance of the Game Settings Configuration app
|
44
|
+
*/
|
45
|
+
get sheet(): SettingsConfig;
|
144
46
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
47
|
+
/**
|
48
|
+
* Register a new game setting under this setting scope
|
49
|
+
*
|
50
|
+
* @param namespace - The namespace under which the setting is registered
|
51
|
+
* @param key - The key name for the setting under the namespace module
|
52
|
+
* @param data - Configuration for setting data
|
53
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
54
|
+
* @typeParam K - The key name for the setting under the namespace module, as a type
|
55
|
+
* @typeParam T - The type of the setting value
|
56
|
+
*
|
57
|
+
* @example
|
58
|
+
* ```typescript
|
59
|
+
* // Register a client setting
|
60
|
+
* game.settings.register("myModule", "myClientSetting", {
|
61
|
+
* name: "Register a Module Setting with Choices",
|
62
|
+
* hint: "A description of the registered setting and its behavior.",
|
63
|
+
* scope: "client", // This specifies a client-stored setting
|
64
|
+
* config: true, // This specifies that the setting appears in the configuration view
|
65
|
+
* type: String,
|
66
|
+
* choices: { // If choices are defined, the resulting setting will be a select menu
|
67
|
+
* "a": "Option A",
|
68
|
+
* "b": "Option B"
|
69
|
+
* },
|
70
|
+
* default: "a", // The default value for the setting
|
71
|
+
* onChange: value => { // A callback function which triggers when the setting is changed
|
72
|
+
* console.log(value)
|
73
|
+
* }
|
74
|
+
* });
|
75
|
+
* ```
|
76
|
+
*
|
77
|
+
* @example
|
78
|
+
* ```typescript
|
79
|
+
* // Register a world setting
|
80
|
+
* game.settings.register("myModule", "myWorldSetting", {
|
81
|
+
* name: "Register a Module Setting with a Range slider",
|
82
|
+
* hint: "A description of the registered setting and its behavior.",
|
83
|
+
* scope: "world", // This specifies a world-level setting
|
84
|
+
* config: true, // This specifies that the setting appears in the configuration view
|
85
|
+
* type: Number,
|
86
|
+
* range: { // If range is specified, the resulting setting will be a range slider
|
87
|
+
* min: 0,
|
88
|
+
* max: 100,
|
89
|
+
* step: 10
|
90
|
+
* }
|
91
|
+
* default: 50, // The default value for the setting
|
92
|
+
* onChange: value => { // A callback function which triggers when the setting is changed
|
93
|
+
* console.log(value)
|
94
|
+
* }
|
95
|
+
* });
|
96
|
+
* ```
|
97
|
+
*/
|
98
|
+
register<N extends string, K extends string, T>(
|
99
|
+
namespace: N,
|
100
|
+
key: K,
|
101
|
+
data: ClientSettings.Values[`${N}.${K}`] extends string | number | boolean | Array<any> | object
|
102
|
+
? ClientSettings.PartialSettingConfig<ClientSettings.Values[`${N}.${K}`]>
|
103
|
+
: ClientSettings.PartialSettingConfig<T>
|
104
|
+
): void;
|
167
105
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
106
|
+
/**
|
107
|
+
* Register a new sub-settings menu
|
108
|
+
*
|
109
|
+
* @param namespace - The namespace under which the menu is registered
|
110
|
+
* @param key - The key name for the setting under the namespace module
|
111
|
+
* @param data - Configuration for setting data
|
112
|
+
* @typeParam N - The namespace under which the menu is registered, as a type
|
113
|
+
* @typeParam K - The key name for the setting under the namespace module, as a type
|
114
|
+
*
|
115
|
+
* @example
|
116
|
+
* ```typescript
|
117
|
+
* // Define a settings submenu which handles advanced configuration needs
|
118
|
+
* game.settings.registerMenu("myModule", "mySettingsMenu", {
|
119
|
+
* name: "My Settings Submenu",
|
120
|
+
* label: "Settings Menu Label", // The text label used in the button
|
121
|
+
* hint: "A description of what will occur in the submenu dialog.",
|
122
|
+
* icon: "fas fa-bars", // A Font Awesome icon used in the submenu button
|
123
|
+
* type: MySubmenuApplicationClass, // A FormApplication subclass which should be created
|
124
|
+
* restricted: true // Restrict this submenu to gamemaster only?
|
125
|
+
* });
|
126
|
+
* ```
|
127
|
+
*/
|
128
|
+
registerMenu<N extends string, K extends string>(
|
129
|
+
namespace: N,
|
130
|
+
key: K,
|
131
|
+
data: ClientSettings.PartialSettingSubmenuConfig
|
132
|
+
): void;
|
173
133
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
134
|
+
/**
|
135
|
+
* Get the value of a game setting for a certain namespace and setting key
|
136
|
+
*
|
137
|
+
* @param namespace - The namespace under which the setting is registered
|
138
|
+
* @param key - The setting key to retrieve
|
139
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
140
|
+
* @typeParam K - The setting key to retrieve, as a type
|
141
|
+
*
|
142
|
+
* @example
|
143
|
+
* ```typescript
|
144
|
+
* // Retrieve the current setting value
|
145
|
+
* game.settings.get("myModule", "myClientSetting");
|
146
|
+
* ```
|
147
|
+
*/
|
148
|
+
get<N extends string, K extends string>(namespace: N, key: K): ClientSettings.Values[`${N}.${K}`];
|
178
149
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
:
|
198
|
-
|
199
|
-
|
200
|
-
? typeof BigInt
|
201
|
-
: T extends string
|
202
|
-
? typeof String
|
203
|
-
: T extends symbol
|
204
|
-
? typeof Symbol
|
205
|
-
: ConstructorOf<T>;
|
150
|
+
/**
|
151
|
+
* Set the value of a game setting for a certain namespace and setting key
|
152
|
+
*
|
153
|
+
* @param namespace - The namespace under which the setting is registered
|
154
|
+
* @param key - The setting key to retrieve
|
155
|
+
* @param value - The data to assign to the setting key
|
156
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
157
|
+
* @typeParam K - The setting key to retrieve, as a type
|
158
|
+
* @typeParam V - The type of the value being set
|
159
|
+
*
|
160
|
+
* @example
|
161
|
+
* ```typescript
|
162
|
+
* // Update the current value of a setting
|
163
|
+
* game.settings.set("myModule", "myClientSetting", "b");
|
164
|
+
* ```
|
165
|
+
*/
|
166
|
+
set<N extends string, K extends string, V extends ClientSettings.Values[`${N}.${K}`]>(
|
167
|
+
namespace: N,
|
168
|
+
key: K,
|
169
|
+
value: V
|
170
|
+
): Promise<V>;
|
206
171
|
}
|
207
172
|
|
208
|
-
|
209
|
-
|
210
|
-
icon?: string;
|
211
|
-
label?: string;
|
212
|
-
name?: string;
|
213
|
-
restricted: boolean;
|
214
|
-
type: ConstructorOf<FormApplication<FormApplicationOptions, object, undefined>>;
|
215
|
-
}
|
173
|
+
namespace ClientSettings {
|
174
|
+
type PartialSettingConfig<T = unknown> = InexactPartial<Omit<SettingConfig<T>, 'key' | 'namespace'>>;
|
216
175
|
|
217
|
-
|
218
|
-
[key: string]: PartialMenuSetting;
|
219
|
-
}
|
176
|
+
type PartialSettingSubmenuConfig = Omit<SettingSubmenuConfig, 'key' | 'namespace'>;
|
220
177
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
178
|
+
interface Values {
|
179
|
+
'core.animateRollTable': boolean;
|
180
|
+
'core.chatBubbles': boolean;
|
181
|
+
'core.chatBubblesPan': boolean;
|
182
|
+
'core.combatTrackerConfig': { resource: string; skipDefeated: boolean } | {};
|
183
|
+
'core.compendiumConfiguration': Partial<Record<string, CompendiumCollection.Configuration>>;
|
184
|
+
'core.coneTemplateType': 'round' | 'flat';
|
185
|
+
'core.defaultDrawingConfig': foundry.data.DrawingData['_source'] | {};
|
186
|
+
'core.defaultToken': DeepPartial<TokenDataSource>;
|
187
|
+
'core.disableResolutionScaling': boolean;
|
188
|
+
'core.fontSize': number;
|
189
|
+
'core.fpsMeter': boolean;
|
190
|
+
'core.globalAmbientVolume': number;
|
191
|
+
'core.globalInterfaceVolume': number;
|
192
|
+
'core.globalPlaylistVolume': number;
|
193
|
+
'core.keybindings': Record<string, KeybindingActionBinding[]>;
|
194
|
+
'core.language': string;
|
195
|
+
'core.leftClickRelease': boolean;
|
196
|
+
'core.lightAnimation': boolean;
|
197
|
+
'core.maxFPS': number;
|
198
|
+
'core.mipmap': boolean;
|
199
|
+
'core.moduleConfiguration': Record<string, boolean>;
|
200
|
+
'core.noCanvas': boolean;
|
201
|
+
'core.notesDisplayToggle': boolean;
|
202
|
+
'core.nue.shownTips': boolean;
|
203
|
+
'core.performanceMode': boolean;
|
204
|
+
'core.permissions': Game.Permissions;
|
205
|
+
'core.playlist.playingLocation': 'top' | 'bottom';
|
206
|
+
'core.rollMode': keyof CONFIG.Dice.RollModes;
|
207
|
+
'core.rtcClientSettings': typeof AVSettings.DEFAULT_CLIENT_SETTINGS;
|
208
|
+
'core.rtcWorldSettings': typeof AVSettings.DEFAULT_WORLD_SETTINGS;
|
209
|
+
'core.scrollingStatusText': boolean;
|
210
|
+
'core.sheetClasses': {
|
211
|
+
[Key in DocumentType as DocumentSubTypes<Key> extends string ? Key : never]?: Record<
|
212
|
+
DocumentSubTypes<Key> & string,
|
213
|
+
string
|
214
|
+
>;
|
215
|
+
};
|
216
|
+
'core.time': number;
|
217
|
+
'core.tokenDragPreview': boolean;
|
218
|
+
'core.visionAnimation': boolean;
|
219
|
+
[key: string]: unknown;
|
220
|
+
}
|
248
221
|
}
|
249
222
|
}
|
@@ -164,7 +164,9 @@ declare global {
|
|
164
164
|
* Provide a dialog form that prompts the user to import the full contents of a Compendium pack into the World.
|
165
165
|
* @param options - Additional options passed to the Dialog.confirm method
|
166
166
|
* (default: `{}`)
|
167
|
-
* @returns A
|
167
|
+
* @returns A promise which resolves in the following ways: an array of imported
|
168
|
+
* Documents if the "yes" button was pressed, false if the "no" button was pressed, or
|
169
|
+
* null if the dialog was closed without making a choice.
|
168
170
|
*/
|
169
171
|
importDialog(
|
170
172
|
options?: Dialog.Options | undefined
|
@@ -2,6 +2,18 @@
|
|
2
2
|
declare class GamepadManager {
|
3
3
|
constructor();
|
4
4
|
|
5
|
+
/**
|
6
|
+
* @defaultValue `null`
|
7
|
+
* @internal
|
8
|
+
*/
|
9
|
+
protected _gamepadPoller: number | null;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* The connected Gamepads
|
13
|
+
* @internal
|
14
|
+
*/
|
15
|
+
protected _connectedGamepads: Map<string, ConnectedGamepad>;
|
16
|
+
|
5
17
|
/**
|
6
18
|
* How often Gamepad polling should check for button presses
|
7
19
|
* @defaultValue `100`
|
@@ -70,37 +70,6 @@ declare global {
|
|
70
70
|
/** The client-side console is the default logger */
|
71
71
|
let logger: typeof console;
|
72
72
|
|
73
|
-
/**
|
74
|
-
* @deprecated since 0.8.0
|
75
|
-
* You are referencing the FEATURES object which has been deprecated as it is no longer an agreed-upon method for how to track evolution of the Foundry Virtual Tabletop API. Discussion about alternate approaches is actively ongoing within the League of Developers community. For the time being the recommendation is to test against game.data.version to understand the current Foundry VTT version which is active. The FEATURES object will be removed in 0.9.0.
|
76
|
-
*/
|
77
|
-
let FEATURES: {
|
78
|
-
readonly ACTIVE_EFFECTS: 2;
|
79
|
-
readonly ACTORS: 3;
|
80
|
-
readonly AUDIO_VIDEO: 2;
|
81
|
-
readonly CHAT: 3;
|
82
|
-
readonly COMBAT: 3;
|
83
|
-
readonly COMPENDIUM: 3;
|
84
|
-
readonly DICE: 2;
|
85
|
-
readonly DRAWINGS: 3;
|
86
|
-
readonly ENTITIES: 5;
|
87
|
-
readonly GRID: 2;
|
88
|
-
readonly ITEMS: 3;
|
89
|
-
readonly JOURNAL: 2;
|
90
|
-
readonly LIGHTING: 3;
|
91
|
-
readonly LOCALIZATION: 2;
|
92
|
-
readonly MACROS: 2;
|
93
|
-
readonly NOTES: 2;
|
94
|
-
readonly PLAYLISTS: 2;
|
95
|
-
readonly ROLL_TABLES: 2;
|
96
|
-
readonly SETTINGS: 3;
|
97
|
-
readonly SOUND: 2;
|
98
|
-
readonly TEMPLATES: 2;
|
99
|
-
readonly TILES: 3;
|
100
|
-
readonly TOKENS: 4;
|
101
|
-
readonly WALLS: 3;
|
102
|
-
};
|
103
|
-
|
104
73
|
/**
|
105
74
|
* @defaultValue `undefined`
|
106
75
|
* Initialized between the `'DOMContentLoaded'` event and the `'init'` hook event.
|
@@ -22,7 +22,12 @@ declare class BaseGrid extends PIXI.Container {
|
|
22
22
|
*/
|
23
23
|
highlight: PIXI.Container;
|
24
24
|
|
25
|
-
|
25
|
+
/**
|
26
|
+
* Draw the grid. Subclasses are expected to override this method to perform their type-specific drawing logic.
|
27
|
+
* @param preview - Override settings used in place of those saved to the scene data.
|
28
|
+
* (default: `{}`)
|
29
|
+
*/
|
30
|
+
draw(preview?: BaseGrid.Preview | undefined): this;
|
26
31
|
|
27
32
|
/**
|
28
33
|
* Highlight a grid position for a certain coordinates
|
@@ -94,7 +99,7 @@ declare class BaseGrid extends PIXI.Container {
|
|
94
99
|
* (default: `{}`)
|
95
100
|
* @returns An Array of distance measurements for each segment
|
96
101
|
*/
|
97
|
-
measureDistances(segments: GridLayer.Segment[], options?:
|
102
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions | undefined): number[];
|
98
103
|
|
99
104
|
/**
|
100
105
|
* Get the grid row and column positions which are neighbors of a certain position
|
@@ -114,6 +119,20 @@ declare namespace BaseGrid {
|
|
114
119
|
even?: boolean;
|
115
120
|
}
|
116
121
|
|
122
|
+
interface Preview {
|
123
|
+
/**
|
124
|
+
* The grid color.
|
125
|
+
* @defaultValue `null`
|
126
|
+
*/
|
127
|
+
gridColor?: string | null | undefined;
|
128
|
+
|
129
|
+
/**
|
130
|
+
* The grid transparency.
|
131
|
+
* @defaultValue `null`
|
132
|
+
*/
|
133
|
+
gridAlpha?: number | null | undefined;
|
134
|
+
}
|
135
|
+
|
117
136
|
interface HighlightGridPositionOptions {
|
118
137
|
/**
|
119
138
|
* The x-coordinate of the highlighted position
|
@@ -149,8 +168,4 @@ declare namespace BaseGrid {
|
|
149
168
|
*/
|
150
169
|
shape?: PIXI.Polygon | null;
|
151
170
|
}
|
152
|
-
|
153
|
-
interface MeasureDistancesOptions {
|
154
|
-
gridSpaces?: boolean;
|
155
|
-
}
|
156
171
|
}
|
@@ -28,7 +28,7 @@ declare class HexagonalGrid extends BaseGrid {
|
|
28
28
|
get hexPoints(): PointArray[];
|
29
29
|
|
30
30
|
/** @override */
|
31
|
-
draw(): this;
|
31
|
+
draw(preview?: BaseGrid.Preview | undefined): this;
|
32
32
|
|
33
33
|
/**
|
34
34
|
* A convenience method for getting all the polygon points relative to a top-left [x,y] coordinate pair
|
@@ -39,10 +39,17 @@ declare class HexagonalGrid extends BaseGrid {
|
|
39
39
|
*/
|
40
40
|
getPolygon(x: number, y: number, w?: number, h?: number): PointArray[];
|
41
41
|
|
42
|
-
|
42
|
+
/**
|
43
|
+
* Draw the grid lines.
|
44
|
+
* @param preview - Override settings used in place of those saved to the scene data.
|
45
|
+
* @internal
|
46
|
+
*/
|
47
|
+
protected _drawGrid(preview?: BaseGrid.Preview | undefined): PIXI.Graphics;
|
43
48
|
|
49
|
+
/** @internal */
|
44
50
|
protected _drawRows(grid: PIXI.Graphics, nrows: number, ncols: number): void;
|
45
51
|
|
52
|
+
/** @internal */
|
46
53
|
protected _drawColumns(grid: PIXI.Graphics, nrows: number, ncols: number): void;
|
47
54
|
|
48
55
|
/**
|
@@ -67,7 +74,8 @@ declare class HexagonalGrid extends BaseGrid {
|
|
67
74
|
*/
|
68
75
|
getSnappedPosition(x: number, y: number, interval?: number | null): { x: number; y: number };
|
69
76
|
|
70
|
-
|
77
|
+
/** @internal */
|
78
|
+
protected _getClosestVertex(xc: number, yc: number, ox: number, oy: number): { x: number; y: number };
|
71
79
|
|
72
80
|
/** @override */
|
73
81
|
shiftPosition(x: number, y: number, dx: number, dy: number): PointArray;
|
@@ -81,11 +89,8 @@ declare class HexagonalGrid extends BaseGrid {
|
|
81
89
|
/** @override */
|
82
90
|
getNeighbors(row: number, col: number): PointArray[];
|
83
91
|
|
84
|
-
/**
|
85
|
-
|
86
|
-
* @param options - (default: `{}`)
|
87
|
-
*/
|
88
|
-
measureDistances(segments: GridLayer.Segment[], options?: BaseGrid.MeasureDistancesOptions): number[];
|
92
|
+
/** @override */
|
93
|
+
measureDistances(segments: GridLayer.Segment[], options?: MeasureDistancesOptions): number[];
|
89
94
|
|
90
95
|
/**
|
91
96
|
* Convert an offset coordinate (row, col) into a cube coordinate (q, r, s).
|