@league-of-foundry-developers/foundry-vtt-types 9.238.1 → 9.249.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/package.json +1 -1
- package/src/foundry/common/abstract/document.mjs.d.ts +13 -6
- package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +25 -23
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
- package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
- package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
- package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +13 -4
- package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
- package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
- package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +26 -21
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
- package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
- package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
- package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
- package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
- package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
- package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
- package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +37 -37
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +7 -0
- package/src/foundry/foundry.js/application.d.ts +139 -111
- package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
- package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +6 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
- package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
- package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
- package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
- package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +4 -4
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
- package/src/foundry/foundry.js/avSettings.d.ts +11 -0
- package/src/foundry/foundry.js/canvas.d.ts +5 -0
- package/src/foundry/foundry.js/canvasAnimation.d.ts +30 -7
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +38 -35
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -18
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +3 -3
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -44
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +14 -17
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
- package/src/foundry/foundry.js/clientKeybindings.d.ts +12 -2
- package/src/foundry/foundry.js/clientSettings.d.ts +2 -2
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +66 -12
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +2 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
- package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
- package/src/foundry/foundry.js/config.d.ts +38 -36
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/hooks.d.ts +157 -88
- package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
- package/src/foundry/foundry.js/keyboardManager.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
- package/src/foundry/foundry.js/pixi/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
- package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +396 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
- package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
- package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
- package/src/foundry/foundry.js/pointSource.d.ts +59 -328
- package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
- package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
- package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
- package/src/foundry/foundry.js/ray.d.ts +156 -162
- package/src/foundry/foundry.js/rays/index.d.ts +1 -0
- package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
- package/src/foundry/foundry.js/roll.d.ts +40 -43
- package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
- package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
- package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
- package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
- package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
- package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
- package/src/foundry/index.d.ts +26 -27
- package/src/types/helperTypes.d.ts +31 -13
- package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardIlluminationShader.d.ts +0 -22
@@ -1,3 +1,17 @@
|
|
1
|
+
interface CanvasAnimationData {
|
2
|
+
/** The animation function being executed each frame */
|
3
|
+
fn: (dt: number) => void;
|
4
|
+
|
5
|
+
/** The object context within which animation occurs */
|
6
|
+
context: PIXI.DisplayObject;
|
7
|
+
|
8
|
+
/** A Promise which resolves once the animation is complete */
|
9
|
+
promise: Promise<boolean>;
|
10
|
+
|
11
|
+
/** The resolution function, allowing animation to be ended early */
|
12
|
+
resolve: (value: boolean) => void;
|
13
|
+
}
|
14
|
+
|
1
15
|
/**
|
2
16
|
* A helper class providing utility methods for PIXI Canvas animation
|
3
17
|
*/
|
@@ -8,9 +22,7 @@ declare class CanvasAnimation {
|
|
8
22
|
* Track an object of active animations by name, context, and function
|
9
23
|
* This allows a currently playing animation to be referenced and terminated
|
10
24
|
*/
|
11
|
-
static animations:
|
12
|
-
Record<string, { fn: (dt: number) => void; context: PIXI.Container; resolve: (value: boolean) => void }>
|
13
|
-
>;
|
25
|
+
static animations: Record<string, CanvasAnimationData>;
|
14
26
|
|
15
27
|
/**
|
16
28
|
* Apply a linear animation from the current value of some attribute to a new value
|
@@ -42,6 +54,13 @@ declare class CanvasAnimation {
|
|
42
54
|
options?: InexactPartial<LinearAnimationOptions>
|
43
55
|
): Promise<boolean>;
|
44
56
|
|
57
|
+
/**
|
58
|
+
* Retrieve an animation currently in progress by its name
|
59
|
+
* @param name - The animation name to retrieve
|
60
|
+
* @returns The animation data, or undefined
|
61
|
+
*/
|
62
|
+
static getAnimation(name: string): CanvasAnimationData | undefined;
|
63
|
+
|
45
64
|
/**
|
46
65
|
* If an animation using a certain name already exists, terminate it
|
47
66
|
* @param name - The animation name to terminate
|
@@ -75,7 +94,7 @@ declare class CanvasAnimation {
|
|
75
94
|
*/
|
76
95
|
protected static _animateFrame(
|
77
96
|
deltaTime: number,
|
78
|
-
resolve:
|
97
|
+
resolve: CanvasAnimationData['resolve'],
|
79
98
|
reject: (reason?: any) => void,
|
80
99
|
attributes: CanvasAnimation.Attribute[],
|
81
100
|
duration: number,
|
@@ -85,8 +104,12 @@ declare class CanvasAnimation {
|
|
85
104
|
|
86
105
|
declare namespace CanvasAnimation {
|
87
106
|
interface Attribute {
|
88
|
-
parent: any;
|
89
107
|
attribute: string;
|
108
|
+
d?: number;
|
109
|
+
delta?: number;
|
110
|
+
done?: number;
|
111
|
+
parent: any;
|
112
|
+
remaining?: number;
|
90
113
|
to: number;
|
91
114
|
}
|
92
115
|
}
|
@@ -95,7 +118,7 @@ interface LinearAnimationOptions {
|
|
95
118
|
/**
|
96
119
|
* An animation context to use which defines scope
|
97
120
|
*/
|
98
|
-
context: PIXI.
|
121
|
+
context: PIXI.DisplayObject;
|
99
122
|
|
100
123
|
/**
|
101
124
|
* Provide a unique animation name which may be referenced later
|
@@ -117,7 +140,7 @@ interface LinearAnimationOptions {
|
|
117
140
|
type TickFunction = (dt: number, attributes: CanvasAnimation.Attribute[]) => void;
|
118
141
|
type TransitionFunction = (
|
119
142
|
dt: number,
|
120
|
-
resolve:
|
143
|
+
resolve: CanvasAnimationData['resolve'],
|
121
144
|
reject: (reason?: any) => void,
|
122
145
|
attributes: CanvasAnimation.Attribute[],
|
123
146
|
duration: number,
|
@@ -11,6 +11,40 @@ declare global {
|
|
11
11
|
const ClientDocumentMixin: <T extends ConstructorOf<foundry.abstract.Document<any, any>>>(
|
12
12
|
Base: T
|
13
13
|
) => ClientDocumentConstructor<T>;
|
14
|
+
|
15
|
+
namespace ClientDocumentMixin {
|
16
|
+
interface CompendiumExportOptions {
|
17
|
+
/**
|
18
|
+
* Clear the flags object
|
19
|
+
* @defaultValue `false`
|
20
|
+
*/
|
21
|
+
clearFlags?: boolean | undefined;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Clear the currently assigned folder and sort order
|
25
|
+
* @defaultValue `true`
|
26
|
+
*/
|
27
|
+
clearSort?: boolean | undefined;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Clear document permissions
|
31
|
+
* @defaultValue `true`
|
32
|
+
*/
|
33
|
+
clearPermissions?: boolean | undefined;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Clear fields which store document state
|
37
|
+
* @defaultValue `true`
|
38
|
+
*/
|
39
|
+
clearState?: boolean | undefined;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Retain the current Document id
|
43
|
+
* @defaultValue `false`
|
44
|
+
*/
|
45
|
+
keepId?: boolean | undefined;
|
46
|
+
}
|
47
|
+
}
|
14
48
|
}
|
15
49
|
|
16
50
|
type ClientDocumentConstructor<T extends ConstructorOf<foundry.abstract.Document<any, any>>> = Pick<T, keyof T> &
|
@@ -275,7 +309,8 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
275
309
|
* (default: `{}`)
|
276
310
|
* @param context - Additional context options or dialog positioning options
|
277
311
|
* (default: `{}`)
|
278
|
-
* @returns A Promise which resolves to the created Document
|
312
|
+
* @returns A Promise which resolves to the created Document, or null if the dialog was
|
313
|
+
* closed.
|
279
314
|
*/
|
280
315
|
static createDialog<T extends DocumentConstructor>(
|
281
316
|
this: T,
|
@@ -300,7 +335,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
300
335
|
* Export document data to a JSON file which can be saved by the client and later imported into a different session.
|
301
336
|
* @param options - Additional options passed to the {@link ClientDocumentMixin#toCompendium} method
|
302
337
|
*/
|
303
|
-
exportToJSON(options?: CompendiumExportOptions): void;
|
338
|
+
exportToJSON(options?: ClientDocumentMixin.CompendiumExportOptions): void;
|
304
339
|
|
305
340
|
/**
|
306
341
|
* A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event.
|
@@ -343,7 +378,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
343
378
|
*/
|
344
379
|
toCompendium(
|
345
380
|
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
|
346
|
-
options?: CompendiumExportOptions
|
381
|
+
options?: ClientDocumentMixin.CompendiumExportOptions
|
347
382
|
): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
|
348
383
|
permission?: T['data']['_source']['permission'];
|
349
384
|
};
|
@@ -354,38 +389,6 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
354
389
|
prepareEmbeddedEntities(): void;
|
355
390
|
}
|
356
391
|
|
357
|
-
interface CompendiumExportOptions {
|
358
|
-
/**
|
359
|
-
* Clear the flags object
|
360
|
-
* @defaultValue `false`
|
361
|
-
*/
|
362
|
-
clearFlags: boolean;
|
363
|
-
|
364
|
-
/**
|
365
|
-
* Clear the currently assigned folder and sort order
|
366
|
-
* @defaultValue `true`
|
367
|
-
*/
|
368
|
-
clearSort: boolean;
|
369
|
-
|
370
|
-
/**
|
371
|
-
* Clear document permissions
|
372
|
-
* @defaultValue `true`
|
373
|
-
*/
|
374
|
-
clearPermissions: boolean;
|
375
|
-
|
376
|
-
/**
|
377
|
-
* Clear fields which store document state
|
378
|
-
* @defaultValue `true`
|
379
|
-
*/
|
380
|
-
clearState: boolean;
|
381
|
-
|
382
|
-
/**
|
383
|
-
* Retain the current Document id
|
384
|
-
* @defaultValue `false`
|
385
|
-
*/
|
386
|
-
keepId: boolean;
|
387
|
-
}
|
388
|
-
|
389
392
|
interface SortOptions<T> {
|
390
393
|
/**
|
391
394
|
* @defaultValue `[]`
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
-
import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData
|
3
|
+
import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData';
|
4
4
|
import { EffectChangeData } from '../../common/data/data.mjs/effectChangeData';
|
5
5
|
|
6
6
|
declare global {
|
@@ -120,7 +120,7 @@ declare global {
|
|
120
120
|
/**
|
121
121
|
* Prepare a data object which defines the data schema used by dice roll commands against this Actor
|
122
122
|
*/
|
123
|
-
getRollData():
|
123
|
+
getRollData(): object;
|
124
124
|
|
125
125
|
/** @override */
|
126
126
|
protected _getSheetClass(): ConstructorOf<FormApplication> | null;
|
@@ -47,7 +47,8 @@ declare global {
|
|
47
47
|
get source(): InstanceType<ConfiguredDocumentClassForName<'Cards'>> | undefined | null;
|
48
48
|
|
49
49
|
/**
|
50
|
-
* A convenience property for whether or not the Card is within its source Cards stack.
|
50
|
+
* A convenience property for whether or not the Card is within its source Cards stack. Cards in decks are always
|
51
|
+
* considered home.
|
51
52
|
*/
|
52
53
|
get isHome(): boolean;
|
53
54
|
|
@@ -99,11 +99,8 @@ declare global {
|
|
99
99
|
* Shuffle this Cards stack, randomizing the sort order of all the cards it contains.
|
100
100
|
* @param options - (default: `{}`)
|
101
101
|
* @returns The Cards document after the shuffle operation has completed
|
102
|
-
* @remarks The returns documentaion is incorrect (https://gitlab.com/foundrynet/foundryvtt/-/issues/6367).
|
103
102
|
*/
|
104
|
-
shuffle(
|
105
|
-
options?: Cards.ShuffleOptions | undefined
|
106
|
-
): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>>[]>;
|
103
|
+
shuffle(options?: Cards.ShuffleOptions | undefined): Promise<InstanceType<ConfiguredDocumentClassForName<'Cards'>>>;
|
107
104
|
|
108
105
|
/**
|
109
106
|
* Reset the Cards stack, retrieving all original cards from other stacks where they may have been drawn if this is a
|
@@ -111,13 +108,8 @@ declare global {
|
|
111
108
|
* @param options - Options which modify the reset operation
|
112
109
|
* (default: `{}`)
|
113
110
|
* @returns The Cards document after the reset operation has completed
|
114
|
-
* @remarks The returns documentaion is incorrect (https://gitlab.com/foundrynet/foundryvtt/-/issues/6367).
|
115
111
|
*/
|
116
|
-
reset(
|
117
|
-
options?: Cards.ResetOptions | undefined
|
118
|
-
): Promise<
|
119
|
-
InstanceType<ConfiguredDocumentClassForName<'Card'>>[] | InstanceType<ConfiguredDocumentClassForName<'Cards'>>
|
120
|
-
>;
|
112
|
+
reset(options?: Cards.ResetOptions | undefined): Promise<InstanceType<ConfiguredDocumentClassForName<'Cards'>>>;
|
121
113
|
|
122
114
|
/**
|
123
115
|
* Perform a reset operation for a deck, retrieving all original cards from other stacks where they may have been
|
@@ -126,11 +118,10 @@ declare global {
|
|
126
118
|
* (default: `{}`)
|
127
119
|
* @returns The Cards document after the reset operation has completed.
|
128
120
|
* @internal
|
129
|
-
* @remarks The returns documentaion is incorrect (https://gitlab.com/foundrynet/foundryvtt/-/issues/6367).
|
130
121
|
*/
|
131
122
|
protected _resetDeck(
|
132
123
|
options?: Cards.ResetOptions | undefined
|
133
|
-
): Promise<InstanceType<ConfiguredDocumentClassForName<'
|
124
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Cards'>>>;
|
134
125
|
|
135
126
|
/**
|
136
127
|
* Return all cards in this stack to their original decks.
|
@@ -220,15 +211,10 @@ declare global {
|
|
220
211
|
* Display a dialog which prompts the user to play a specific Card to some other Cards document
|
221
212
|
* @see {@link Cards#pass}
|
222
213
|
* @param card - The specific card being played as part of this dialog
|
223
|
-
* @remarks returns documentation is incorrect.
|
224
214
|
*/
|
225
215
|
playDialog(
|
226
216
|
card: InstanceType<ConfiguredDocumentClassForName<'Card'>>
|
227
|
-
): Promise<
|
228
|
-
| InstanceType<ConfiguredDocumentClassForName<'Card'>>[]
|
229
|
-
| InstanceType<ConfiguredDocumentClassForName<'Cards'>>
|
230
|
-
| null
|
231
|
-
>;
|
217
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>>[] | void | null>;
|
232
218
|
|
233
219
|
/**
|
234
220
|
* Display a confirmation dialog for whether or not the user wishes to reset a Cards stack
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
-
import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData
|
3
|
+
import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData';
|
4
4
|
|
5
5
|
declare global {
|
6
6
|
/**
|
@@ -74,14 +74,14 @@ declare global {
|
|
74
74
|
*/
|
75
75
|
static applyRollMode(
|
76
76
|
chatData: ChatMessageDataConstructorData,
|
77
|
-
rollMode:
|
77
|
+
rollMode: keyof typeof CONFIG.Dice.rollModes | 'roll'
|
78
78
|
): ChatMessageDataConstructorData;
|
79
79
|
|
80
80
|
/**
|
81
81
|
* Update the data of a ChatMessage instance to apply a requested rollMode
|
82
82
|
* @param rollMode - The rollMode preference to apply to this message data
|
83
83
|
*/
|
84
|
-
applyRollMode(rollMode:
|
84
|
+
applyRollMode(rollMode: keyof typeof CONFIG.Dice.rollModes | 'roll'): void;
|
85
85
|
|
86
86
|
/**
|
87
87
|
* Attempt to determine who is the speaking character (and token) for a certain Chat Message
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { ConfiguredDocumentClass
|
2
|
-
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
-
import {
|
4
|
-
import type {
|
1
|
+
import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
|
+
import type { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
+
import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData';
|
4
|
+
import type { CombatantDataSource } from '../../common/data/data.mjs/combatantData';
|
5
5
|
|
6
6
|
declare global {
|
7
7
|
/**
|
@@ -12,10 +12,11 @@ declare global {
|
|
12
12
|
* @see {@link documents.Combats} The world-level collection of Combat documents
|
13
13
|
* @see {@link embedded.Combatant} The Combatant embedded document which exists within a Combat document
|
14
14
|
* @see {@link applications.CombatConfig} The Combat configuration application
|
15
|
-
*
|
16
|
-
* @param data - Initial data provided to construct the Combat document
|
17
15
|
*/
|
18
16
|
class Combat extends ClientDocumentMixin(foundry.documents.BaseCombat) {
|
17
|
+
/**
|
18
|
+
* @param data - Initial data provided to construct the Combat document
|
19
|
+
*/
|
19
20
|
constructor(
|
20
21
|
data?: ConstructorParameters<ConstructorOf<foundry.documents.BaseCombat>>[0],
|
21
22
|
context?: ConstructorParameters<ConstructorOf<foundry.documents.BaseCombat>>[1]
|
@@ -33,6 +34,7 @@ declare global {
|
|
33
34
|
/**
|
34
35
|
* Track whether a sound notification is currently being played to avoid double-dipping
|
35
36
|
* @defaultValue `false`
|
37
|
+
* @internal
|
36
38
|
*/
|
37
39
|
protected _soundPlaying: boolean;
|
38
40
|
|
@@ -40,7 +42,7 @@ declare global {
|
|
40
42
|
static CONFIG_SETTING: 'combatTrackerConfig';
|
41
43
|
|
42
44
|
/** Get the Combatant who has the current turn. */
|
43
|
-
get combatant(): this['turns'][number];
|
45
|
+
get combatant(): this['turns'][number] | undefined;
|
44
46
|
|
45
47
|
/** The numeric round of the Combat encounter */
|
46
48
|
get round(): number;
|
@@ -58,10 +60,13 @@ declare global {
|
|
58
60
|
get started(): boolean;
|
59
61
|
|
60
62
|
/** The numeric turn of the combat round in the Combat encounter */
|
61
|
-
get turn(): number;
|
63
|
+
get turn(): number | null;
|
62
64
|
|
63
65
|
get visible(): true;
|
64
66
|
|
67
|
+
/** Is this combat active in the current scene? */
|
68
|
+
get isActive(): boolean;
|
69
|
+
|
65
70
|
/**
|
66
71
|
* Set the current Combat encounter as active within the Scene.
|
67
72
|
* Deactivate all other Combat encounters within the viewed Scene and set this one as active
|
@@ -78,7 +83,13 @@ declare global {
|
|
78
83
|
* Get a Combatant using its Token id
|
79
84
|
* @param tokenId - The id of the Token for which to acquire the combatant
|
80
85
|
*/
|
81
|
-
getCombatantByToken(tokenId: string):
|
86
|
+
getCombatantByToken(tokenId: string): InstanceType<ConfiguredDocumentClass<typeof Combatant>> | undefined;
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Get a Combatant using its Actor id
|
90
|
+
* @param actorId - The id of the Actor for which to acquire the combatant
|
91
|
+
*/
|
92
|
+
getCombatantByActor(actorId: string): InstanceType<ConfiguredDocumentClass<typeof Combatant>> | undefined;
|
82
93
|
|
83
94
|
/** Advance the combat to the next round */
|
84
95
|
nextRound(): Promise<this | undefined>;
|
@@ -95,15 +106,18 @@ declare global {
|
|
95
106
|
/** Rewind the combat to the previous turn */
|
96
107
|
previousTurn(): Promise<this | undefined>;
|
97
108
|
|
109
|
+
/** Toggle whether this combat is linked to the scene or globally available. */
|
110
|
+
toggleSceneLink(): Promise<this | undefined>;
|
111
|
+
|
98
112
|
/** Reset all combatant initiative scores, setting the turn back to zero */
|
99
113
|
resetAll(): Promise<this | undefined>;
|
100
114
|
|
101
115
|
/**
|
102
|
-
* Roll initiative for one or multiple Combatants within the Combat
|
103
|
-
* @param ids
|
116
|
+
* Roll initiative for one or multiple Combatants within the Combat document
|
117
|
+
* @param ids - A Combatant id or Array of ids for which to roll
|
104
118
|
* @param options - Additional options which modify how initiative rolls are created or presented.
|
105
119
|
* default `{}`
|
106
|
-
* @returns
|
120
|
+
* @returns A promise which resolves to the updated Combat document once updates are complete.
|
107
121
|
*/
|
108
122
|
rollInitiative(ids: string | string[], options?: InitiativeOptions): Promise<this>;
|
109
123
|
|
@@ -112,19 +126,19 @@ declare global {
|
|
112
126
|
* @param options - Additional options forwarded to the Combat.rollInitiative method
|
113
127
|
* default `{}`
|
114
128
|
*/
|
115
|
-
rollAll(options?: InitiativeOptions): this
|
129
|
+
rollAll(options?: InitiativeOptions): Promise<this>;
|
116
130
|
|
117
131
|
/**
|
118
132
|
* Roll initiative for all non-player actors who have not already rolled
|
119
133
|
* @param options - Additional options forwarded to the Combat.rollInitiative method
|
120
134
|
* default `{}`
|
121
135
|
*/
|
122
|
-
rollNPC(options?: InitiativeOptions): this
|
136
|
+
rollNPC(options?: InitiativeOptions): Promise<this>;
|
123
137
|
|
124
138
|
/**
|
125
139
|
* Assign initiative for a single Combatant within the Combat encounter.
|
126
140
|
* Update the Combat turn order to maintain the same combatant as the current turn.
|
127
|
-
* @param id
|
141
|
+
* @param id - The combatant ID for which to set initiative
|
128
142
|
* @param value - A specific initiative value to set
|
129
143
|
*/
|
130
144
|
setInitiative(id: string, value: number): Promise<void>;
|
@@ -139,66 +153,52 @@ declare global {
|
|
139
153
|
* Define how the array of Combatants is sorted in the displayed list of the tracker.
|
140
154
|
* This method can be overridden by a system or module which needs to display combatants in an alternative order.
|
141
155
|
* By default sort by initiative, next falling back to name, lastly tie-breaking by combatant id.
|
156
|
+
* @internal
|
142
157
|
*/
|
143
158
|
protected _sortCombatants(
|
144
159
|
a: InstanceType<ConfiguredDocumentClass<typeof Combatant>>,
|
145
160
|
b: InstanceType<ConfiguredDocumentClass<typeof Combatant>>
|
146
161
|
): number;
|
147
162
|
|
163
|
+
/** @override */
|
148
164
|
protected _onCreate(data: this['data']['_source'], options: DocumentModificationOptions, userId: string): void;
|
149
165
|
|
166
|
+
/** @override */
|
150
167
|
protected _onUpdate(
|
151
168
|
changed: DeepPartial<this['data']['_source']>,
|
152
169
|
options: DocumentModificationOptions,
|
153
170
|
userId: string
|
154
|
-
): void;
|
171
|
+
): void;
|
155
172
|
|
173
|
+
/** @override */
|
156
174
|
protected _onDelete(options: DocumentModificationOptions, userId: string): void;
|
157
175
|
|
176
|
+
/** @override */
|
158
177
|
protected _onCreateEmbeddedDocuments(
|
159
|
-
|
160
|
-
documents: Combatant[],
|
161
|
-
result:
|
178
|
+
type: string,
|
179
|
+
documents: InstanceType<ConfiguredDocumentClass<typeof Combatant>>[],
|
180
|
+
result: CombatantDataSource[],
|
162
181
|
options: DocumentModificationOptions,
|
163
182
|
userId: string
|
164
183
|
): void;
|
165
184
|
|
185
|
+
/** @override */
|
166
186
|
protected _onUpdateEmbeddedDocuments(
|
167
187
|
embeddedName: string,
|
168
|
-
documents: Combatant[],
|
169
|
-
result:
|
188
|
+
documents: InstanceType<ConfiguredDocumentClass<typeof Combatant>>[],
|
189
|
+
result: CombatantDataSource[],
|
170
190
|
options: DocumentModificationOptions,
|
171
191
|
userId: string
|
172
192
|
): void;
|
173
193
|
|
194
|
+
/** @override */
|
174
195
|
protected _onDeleteEmbeddedDocuments(
|
175
196
|
embeddedName: string,
|
176
|
-
documents: Combatant[],
|
197
|
+
documents: InstanceType<ConfiguredDocumentClass<typeof Combatant>>[],
|
177
198
|
result: string[],
|
178
199
|
options: DocumentModificationContext,
|
179
200
|
userId: string
|
180
201
|
): void;
|
181
|
-
|
182
|
-
/** @deprecated since 0.8.0 */
|
183
|
-
getCombatant(id: string): this['combatants']['get'];
|
184
|
-
|
185
|
-
/** @deprecated since 0.8.0 */
|
186
|
-
createCombatant(
|
187
|
-
data: CombatDataConstructorData | (CombatDataConstructorData & Record<string, unknown>),
|
188
|
-
options?: DocumentModificationContext
|
189
|
-
): this['createEmbeddedDocuments'];
|
190
|
-
|
191
|
-
/** @deprecated since 0.8.0 */
|
192
|
-
updateCombatant(
|
193
|
-
data: DeepPartial<CombatDataConstructorData | (CombatDataConstructorData & Record<string, unknown>)>,
|
194
|
-
options?: DocumentModificationContext
|
195
|
-
): NonNullable<ReturnType<this['combatants']['get']>>['update'];
|
196
|
-
|
197
|
-
/** @deprecated since 0.8.0 */
|
198
|
-
deleteCombatant(
|
199
|
-
id: string,
|
200
|
-
options?: DocumentModificationContext
|
201
|
-
): NonNullable<ReturnType<this['combatants']['get']>>['delete'];
|
202
202
|
}
|
203
203
|
}
|
204
204
|
|
@@ -208,16 +208,18 @@ interface InitiativeOptions {
|
|
208
208
|
* @defaultValue `null`
|
209
209
|
*/
|
210
210
|
formula?: string | null;
|
211
|
+
|
211
212
|
/**
|
212
213
|
* Update the Combat turn after adding new initiative scores to keep the turn on the same Combatant.
|
213
214
|
* @defaultValue `true`
|
214
215
|
*/
|
215
216
|
updateTurn?: boolean;
|
217
|
+
|
216
218
|
/**
|
217
219
|
* Additional options with which to customize created Chat Messages
|
218
220
|
* @defaultValue `{}`
|
219
221
|
*/
|
220
|
-
messageOptions?:
|
222
|
+
messageOptions?: ChatMessageDataConstructorData;
|
221
223
|
}
|
222
224
|
|
223
225
|
interface RoundData {
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
|
-
import { BaseUser } from '../../common/documents.mjs';
|
3
2
|
|
4
3
|
declare global {
|
5
4
|
/**
|
@@ -22,18 +21,6 @@ declare global {
|
|
22
21
|
context: ConstructorParameters<typeof foundry.documents.BaseCombatant>[1]
|
23
22
|
);
|
24
23
|
|
25
|
-
/**
|
26
|
-
* A cached reference to the Token which this Combatant represents, if any
|
27
|
-
* @defaultValue `undefined`
|
28
|
-
* */
|
29
|
-
protected _token: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseToken>> | null | undefined;
|
30
|
-
|
31
|
-
/**
|
32
|
-
* A cached reference to the Actor which this Combatant represents, if any
|
33
|
-
* @defaultValue `undefined`
|
34
|
-
* */
|
35
|
-
protected _actor: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>> | null | undefined;
|
36
|
-
|
37
24
|
/** The current value of the special tracked resource which pertains to this Combatant */
|
38
25
|
resource: `${number}` | number | boolean | null;
|
39
26
|
|
@@ -54,8 +41,8 @@ declare global {
|
|
54
41
|
/** @override */
|
55
42
|
get isOwner(): boolean;
|
56
43
|
|
57
|
-
/**
|
58
|
-
get
|
44
|
+
/** @override */
|
45
|
+
get visible(): boolean;
|
59
46
|
|
60
47
|
/** Is this Combatant "hidden", either because they are explicitly marked as hidden or because their token is hidden */
|
61
48
|
get hidden(): boolean;
|
@@ -72,9 +59,14 @@ declare global {
|
|
72
59
|
/** An array of User documents who have ownership of this Document */
|
73
60
|
get players(): InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseUser>>[];
|
74
61
|
|
62
|
+
/**
|
63
|
+
* Has this combatant been marked as defeated?
|
64
|
+
*/
|
65
|
+
get isDefeated(): boolean;
|
66
|
+
|
75
67
|
/** @override */
|
76
68
|
testUserPermission(
|
77
|
-
user: BaseUser,
|
69
|
+
user: foundry.documents.BaseUser,
|
78
70
|
permission: keyof typeof foundry.CONST.DOCUMENT_PERMISSION_LEVELS | foundry.CONST.DOCUMENT_PERMISSION_LEVELS,
|
79
71
|
{ exact }?: { exact?: boolean }
|
80
72
|
): boolean;
|
@@ -89,7 +81,7 @@ declare global {
|
|
89
81
|
/**
|
90
82
|
* Roll initiative for this particular combatant.
|
91
83
|
* @param formula - A dice formula which overrides the default for this Combatant.
|
92
|
-
* @returns The
|
84
|
+
* @returns The updated Combatant.
|
93
85
|
*/
|
94
86
|
rollInitiative(formula: string): Promise<this | undefined>;
|
95
87
|
|
@@ -107,6 +99,11 @@ declare global {
|
|
107
99
|
* @returns The initiative formula to use for this combatant.
|
108
100
|
*/
|
109
101
|
protected _getInitiativeFormula(): string;
|
102
|
+
|
103
|
+
/**
|
104
|
+
* @deprecated since v9
|
105
|
+
*/
|
106
|
+
get isVisible(): boolean;
|
110
107
|
}
|
111
108
|
}
|
112
109
|
export {};
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass, ConstructorDataType, DocumentConstructor } from '../../../types/helperTypes';
|
2
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
-
import type { FolderDataConstructorData } from '../../common/data/data.mjs/folderData.js';
|
4
3
|
|
5
4
|
declare global {
|
6
5
|
/**
|
@@ -65,14 +64,21 @@ declare global {
|
|
65
64
|
* @returns An active FolderConfig instance for creating the new Folder entity
|
66
65
|
*
|
67
66
|
* @remarks
|
68
|
-
*
|
69
|
-
*
|
70
|
-
*
|
67
|
+
* The documented return type is incorrect. It now returns a promise that resolves to the
|
68
|
+
* created folder as intended. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6619
|
69
|
+
*
|
70
|
+
* For weird reasons, we need to make this generic.
|
71
71
|
*/
|
72
|
-
static createDialog(
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
static createDialog<T extends DocumentConstructor>(
|
73
|
+
this: T,
|
74
|
+
data?:
|
75
|
+
| DeepPartial<
|
76
|
+
| ConstructorDataType<InstanceType<T>['data']>
|
77
|
+
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
78
|
+
>
|
79
|
+
| undefined,
|
80
|
+
options?: Partial<DocumentSheetOptions> | undefined
|
81
|
+
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
76
82
|
|
77
83
|
/**
|
78
84
|
* Export all Documents contained in this Folder to a given Compendium pack.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
|
-
import type { ItemDataConstructorData } from '../../common/data/data.mjs/itemData
|
2
|
+
import type { ItemDataConstructorData } from '../../common/data/data.mjs/itemData';
|
3
3
|
|
4
4
|
declare global {
|
5
5
|
/**
|
@@ -43,7 +43,7 @@ declare global {
|
|
43
43
|
/**
|
44
44
|
* Prepare a data object which defines the data schema used by dice roll commands against this Item
|
45
45
|
*/
|
46
|
-
getRollData():
|
46
|
+
getRollData(): object;
|
47
47
|
|
48
48
|
/** @override */
|
49
49
|
protected _getSheetClass(): typeof ItemSheet | null;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
2
|
import type { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
|
-
import type { PlaylistDataConstructorData } from '../../common/data/data.mjs/playlistData
|
3
|
+
import type { PlaylistDataConstructorData } from '../../common/data/data.mjs/playlistData';
|
4
4
|
|
5
5
|
declare global {
|
6
6
|
/**
|
@@ -158,7 +158,7 @@ declare global {
|
|
158
158
|
/**
|
159
159
|
* The chat roll mode to use when displaying the result
|
160
160
|
*/
|
161
|
-
rollMode:
|
161
|
+
rollMode: keyof CONFIG.Dice.RollModes | 'roll';
|
162
162
|
}
|
163
163
|
|
164
164
|
/**
|
@@ -180,7 +180,7 @@ declare global {
|
|
180
180
|
* Additional options which customize the created messages
|
181
181
|
* @defaultValue `{}`
|
182
182
|
*/
|
183
|
-
messageOptions:
|
183
|
+
messageOptions: DocumentModificationContext & { rollMode: keyof CONFIG.Dice.RollModes | 'roll' };
|
184
184
|
}
|
185
185
|
|
186
186
|
interface RollOptions {
|