diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0dfdc1ad..d797b124 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,8 +16,24 @@ jobs: - name: Set Release Notes for Github id: set-release-notes-github run: | + echo "- General: GM Mirror Dialog will now sync the state of the pause button across both clients. This addresses an issue where the user could pause their dialog but the GMs would close and complete as No if they did not also pause theirs, or vice versa. Started to generalize some functions throughout automations and cleaned up all of the 3rd party automations to a certain extent." >> release_notes.txt + echo "- General: Complete settings rework. Item types are now selectable buttons with a list of automations that can be enabled within that item type. Should make navigating much easier. Added Debug option to help with identifying where a 3rd party reaction may be failing." >> release_notes.txt echo "- Updates:" >> release_notes.txt - echo " - Opportunity Attack: Added settings option Enable Opportunity Attack Legacy System. If set this will use token attacher to attach the template to a token instead of using Walled Templates. This will allow Drag Ruler to continue to work. If this setting is off, Elevation Ruler must be used in place of Drag Ruler, and Walled Templates will be used for attaching the template to a token. Some small bugfixes I cant remember as well" >> release_notes.txt + echo " - Opportunity Attack: Added custom handling for Booming Blade. Added additional validation for metric vs imperial calculations. Changed setting name for enabling legacy setup (token attacher + drag ruler) to Enable Legacy Template Attachment to reduce confusion. Added a workaround for Walled Templates attachment throwing an error on movement for player characters. Removed Riposte and Sentinel from the Opportunity Attack Item, should make OA deployment lighter. Added check to prevent enabling/disabling OA via settings during combat as it wont actually effect the current combat and can cause downline issues if proper cleanup is not allowed to occur, so the user will receive a message that this must be done outside combat." >> release_notes.txt + echo " - Black Tentacles: Remove Warpgate dependency for token movement when restrained." >> release_notes.txt + echo " - Heated Body: Updated to be more efficient. Added folders/implementation for Remorhaz and Reduced threat Remorhaz." >> release_notes.txt + echo " - Tentacles: Updated to be more efficient." >> release_notes.txt + echo " - Sentinel: Item implementation via OA completely removed, can now be enabled in the Module settings. Now uses additional functionality afforded by the module including pause and GM Mirror Dialog" >> release_notes.txt + echo " - Maneuvers - Riposte: Item implementation via OA completely removed, can now be enabled in the Module settings. Now uses additional functionality afforded by the module including pause and GM Mirror Dialog" >> release_notes.txt + echo " - Indomitable: Item implementation completely removed, can now be enabled in the Module settings. Make sure to update to the latest version of the item as well. Now uses additional functionality afforded by the module including pause and GM Mirror Dialog" >> release_notes.txt + echo " - Fighting Style - Protection: Item implementation completely removed, can now be enabled in the Module settings. Make sure to update to the latest version of the item as well. Now uses additional functionality afforded by the module including pause and GM Mirror Dialog" >> release_notes.txt + echo "- Bugfixes:" >> release_notes.txt + echo " - Motivational Speech: Some cleanup of the code and various small bugfixes" >> release_notes.txt + echo " - Scatter: A few small issues resolved. Will be looking at migrating the teleport function away from Warpgate in the future." >> release_notes.txt + echo " - Cloud of Daggers: A number of bugfixes and cleanup." >> release_notes.txt + echo " - Roksjas Husk: A number of bugfixes." >> release_notes.txt + echo " - Opportunity Attack: Fixed bug where per turn OA settings would run even if OA was disabled in settings." >> release_notes.txt + echo " - Fighting Style - Interception: Added missing proficiency bonus to d10 roll." >> release_notes.txt echo "release-notes-github<> $GITHUB_ENV cat release_notes.txt >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV diff --git a/module.json b/module.json index edb907d0..d7a6d4d8 100644 --- a/module.json +++ b/module.json @@ -7,7 +7,7 @@ "name": "Gambit" } ], - "version": "0.1.41", + "version": "0.1.42", "compatibility": { "minimum": "11", "verified": "11", @@ -126,7 +126,6 @@ ], "scripts": [ "scripts/integrations/cpr.js", - "scripts/macroFunctions.js", "scripts/settings.js" ], "relationships": { diff --git a/packs/gps-3rd-party-features/000355.log b/packs/gps-3rd-party-features/000381.log similarity index 100% rename from packs/gps-3rd-party-features/000355.log rename to packs/gps-3rd-party-features/000381.log diff --git a/packs/gps-3rd-party-features/CURRENT b/packs/gps-3rd-party-features/CURRENT index 70d0528e..2ab0fa64 100644 --- a/packs/gps-3rd-party-features/CURRENT +++ b/packs/gps-3rd-party-features/CURRENT @@ -1 +1 @@ -MANIFEST-000353 +MANIFEST-000379 diff --git a/packs/gps-3rd-party-features/LOG b/packs/gps-3rd-party-features/LOG index 689a55f9..306dd44b 100644 --- a/packs/gps-3rd-party-features/LOG +++ b/packs/gps-3rd-party-features/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.331 7278 Recovering log #351 -2024/05/10-18:11:17.342 7278 Delete type=0 #351 -2024/05/10-18:11:17.342 7278 Delete type=3 #349 -2024/05/10-18:13:00.706 358c Level-0 table #356: started -2024/05/10-18:13:00.706 358c Level-0 table #356: 0 bytes OK -2024/05/10-18:13:00.711 358c Delete type=0 #354 -2024/05/10-18:13:00.724 358c Manual compaction at level-0 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.724 358c Manual compaction at level-1 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.912 19eac Recovering log #378 +2024/05/18-14:08:11.918 19eac Delete type=0 #378 +2024/05/18-14:08:11.918 19eac Delete type=3 #377 +2024/05/18-19:40:28.557 18fb8 Level-0 table #382: started +2024/05/18-19:40:28.557 18fb8 Level-0 table #382: 0 bytes OK +2024/05/18-19:40:28.559 18fb8 Delete type=0 #380 +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-0 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-1 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) diff --git a/packs/gps-3rd-party-features/LOG.old b/packs/gps-3rd-party-features/LOG.old index e0da88c6..e30b0e70 100644 --- a/packs/gps-3rd-party-features/LOG.old +++ b/packs/gps-3rd-party-features/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.921 72c0 Recovering log #347 -2024/05/10-17:34:18.928 72c0 Delete type=0 #347 -2024/05/10-17:34:18.928 72c0 Delete type=3 #345 -2024/05/10-18:08:06.791 358c Level-0 table #352: started -2024/05/10-18:08:06.791 358c Level-0 table #352: 0 bytes OK -2024/05/10-18:08:06.794 358c Delete type=0 #350 -2024/05/10-18:08:06.795 358c Manual compaction at level-0 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.795 358c Manual compaction at level-1 from '!folders!4Ecsdk7k1FvMs9OF' @ 72057594037927935 : 1 .. '!items.effects!G2IDv711EWrOF7ef.kE7T0D7E6CnMvjvr' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.254 20538 Recovering log #375 +2024/05/17-18:27:08.259 20538 Delete type=0 #375 +2024/05/17-18:27:08.259 20538 Delete type=3 #373 diff --git a/packs/gps-3rd-party-features/MANIFEST-000353 b/packs/gps-3rd-party-features/MANIFEST-000379 similarity index 64% rename from packs/gps-3rd-party-features/MANIFEST-000353 rename to packs/gps-3rd-party-features/MANIFEST-000379 index 594e66db..19f6b6e3 100644 Binary files a/packs/gps-3rd-party-features/MANIFEST-000353 and b/packs/gps-3rd-party-features/MANIFEST-000379 differ diff --git a/packs/gps-3rd-party-items/000353.log b/packs/gps-3rd-party-items/000379.log similarity index 100% rename from packs/gps-3rd-party-items/000353.log rename to packs/gps-3rd-party-items/000379.log diff --git a/packs/gps-3rd-party-items/000186.ldb b/packs/gps-3rd-party-items/000381.ldb similarity index 65% rename from packs/gps-3rd-party-items/000186.ldb rename to packs/gps-3rd-party-items/000381.ldb index 45e5b3bd..e8298087 100644 Binary files a/packs/gps-3rd-party-items/000186.ldb and b/packs/gps-3rd-party-items/000381.ldb differ diff --git a/packs/gps-3rd-party-items/CURRENT b/packs/gps-3rd-party-items/CURRENT index 0ed38518..f5f405ce 100644 --- a/packs/gps-3rd-party-items/CURRENT +++ b/packs/gps-3rd-party-items/CURRENT @@ -1 +1 @@ -MANIFEST-000351 +MANIFEST-000377 diff --git a/packs/gps-3rd-party-items/LOG b/packs/gps-3rd-party-items/LOG index b48898eb..fedbfa19 100644 --- a/packs/gps-3rd-party-items/LOG +++ b/packs/gps-3rd-party-items/LOG @@ -1,8 +1,15 @@ -2024/05/10-18:11:17.353 7284 Recovering log #349 -2024/05/10-18:11:17.361 7284 Delete type=0 #349 -2024/05/10-18:11:17.362 7284 Delete type=3 #347 -2024/05/10-18:13:00.716 358c Level-0 table #354: started -2024/05/10-18:13:00.716 358c Level-0 table #354: 0 bytes OK -2024/05/10-18:13:00.720 358c Delete type=0 #352 -2024/05/10-18:13:00.724 358c Manual compaction at level-0 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.724 358c Manual compaction at level-1 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.923 13dc Recovering log #376 +2024/05/18-14:08:11.929 13dc Delete type=0 #376 +2024/05/18-14:08:11.929 13dc Delete type=3 #375 +2024/05/18-19:40:28.562 18fb8 Level-0 table #380: started +2024/05/18-19:40:28.569 18fb8 Level-0 table #380: 5264 bytes OK +2024/05/18-19:40:28.572 18fb8 Delete type=0 #378 +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-0 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-1 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at '!items.effects!InpV0vOrIiMGHMx2.3KDzdYuLCRwUhQUK' @ 27 : 1 +2024/05/18-19:40:28.572 18fb8 Compacting 1@1 + 1@2 files +2024/05/18-19:40:28.578 18fb8 Generated table #381@1: 13 keys, 21017 bytes +2024/05/18-19:40:28.578 18fb8 Compacted 1@1 + 1@2 files => 21017 bytes +2024/05/18-19:40:28.580 18fb8 compacted to: files[ 0 0 1 0 0 0 0 ] +2024/05/18-19:40:28.580 18fb8 Delete type=2 #186 +2024/05/18-19:40:28.580 18fb8 Delete type=2 #380 +2024/05/18-19:40:28.588 18fb8 Manual compaction at level-1 from '!items.effects!InpV0vOrIiMGHMx2.3KDzdYuLCRwUhQUK' @ 27 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) diff --git a/packs/gps-3rd-party-items/LOG.old b/packs/gps-3rd-party-items/LOG.old index 25209e26..3d5660c9 100644 --- a/packs/gps-3rd-party-items/LOG.old +++ b/packs/gps-3rd-party-items/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.931 7284 Recovering log #345 -2024/05/10-17:34:18.937 7284 Delete type=0 #345 -2024/05/10-17:34:18.937 7284 Delete type=3 #343 -2024/05/10-18:08:06.798 358c Level-0 table #350: started -2024/05/10-18:08:06.798 358c Level-0 table #350: 0 bytes OK -2024/05/10-18:08:06.802 358c Delete type=0 #348 -2024/05/10-18:08:06.814 358c Manual compaction at level-0 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.814 358c Manual compaction at level-1 from '!items!A4JIbc14vM5IKbuT' @ 72057594037927935 : 1 .. '!items.effects!qHY9RXV48OmvCrw1.UNiU6zoPTpbrxoIA' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.265 ff48 Recovering log #373 +2024/05/17-18:27:08.270 ff48 Delete type=0 #373 +2024/05/17-18:27:08.270 ff48 Delete type=3 #371 diff --git a/packs/gps-3rd-party-items/MANIFEST-000351 b/packs/gps-3rd-party-items/MANIFEST-000351 deleted file mode 100644 index 5647f280..00000000 Binary files a/packs/gps-3rd-party-items/MANIFEST-000351 and /dev/null differ diff --git a/packs/gps-3rd-party-items/MANIFEST-000377 b/packs/gps-3rd-party-items/MANIFEST-000377 new file mode 100644 index 00000000..56353a67 Binary files /dev/null and b/packs/gps-3rd-party-items/MANIFEST-000377 differ diff --git a/packs/gps-3rd-party-spells/000354.log b/packs/gps-3rd-party-spells/000380.log similarity index 100% rename from packs/gps-3rd-party-spells/000354.log rename to packs/gps-3rd-party-spells/000380.log diff --git a/packs/gps-3rd-party-spells/CURRENT b/packs/gps-3rd-party-spells/CURRENT index fc23163b..5a3fb87c 100644 --- a/packs/gps-3rd-party-spells/CURRENT +++ b/packs/gps-3rd-party-spells/CURRENT @@ -1 +1 @@ -MANIFEST-000352 +MANIFEST-000378 diff --git a/packs/gps-3rd-party-spells/LOG b/packs/gps-3rd-party-spells/LOG index 10fbeea7..8ca6497c 100644 --- a/packs/gps-3rd-party-spells/LOG +++ b/packs/gps-3rd-party-spells/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.379 7278 Recovering log #350 -2024/05/10-18:11:17.388 7278 Delete type=0 #350 -2024/05/10-18:11:17.388 7278 Delete type=3 #348 -2024/05/10-18:13:00.733 358c Level-0 table #355: started -2024/05/10-18:13:00.733 358c Level-0 table #355: 0 bytes OK -2024/05/10-18:13:00.738 358c Delete type=0 #353 -2024/05/10-18:13:00.754 358c Manual compaction at level-0 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.754 358c Manual compaction at level-1 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.936 19eac Recovering log #377 +2024/05/18-14:08:11.941 19eac Delete type=0 #377 +2024/05/18-14:08:11.941 19eac Delete type=3 #376 +2024/05/18-19:40:28.580 18fb8 Level-0 table #381: started +2024/05/18-19:40:28.580 18fb8 Level-0 table #381: 0 bytes OK +2024/05/18-19:40:28.583 18fb8 Delete type=0 #379 +2024/05/18-19:40:28.588 18fb8 Manual compaction at level-0 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.588 18fb8 Manual compaction at level-1 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) diff --git a/packs/gps-3rd-party-spells/LOG.old b/packs/gps-3rd-party-spells/LOG.old index 5a340000..b2848b45 100644 --- a/packs/gps-3rd-party-spells/LOG.old +++ b/packs/gps-3rd-party-spells/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.941 72c0 Recovering log #346 -2024/05/10-17:34:18.947 72c0 Delete type=0 #346 -2024/05/10-17:34:18.948 72c0 Delete type=3 #344 -2024/05/10-18:08:06.802 358c Level-0 table #351: started -2024/05/10-18:08:06.803 358c Level-0 table #351: 0 bytes OK -2024/05/10-18:08:06.806 358c Delete type=0 #349 -2024/05/10-18:08:06.814 358c Manual compaction at level-0 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.814 358c Manual compaction at level-1 from '!items!2YNbYocBRdEDgO4Q' @ 72057594037927935 : 1 .. '!items.effects!naJb6xUQcmh6w3CM.aTdVZ7BfVtRpnHyR' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.275 20538 Recovering log #374 +2024/05/17-18:27:08.280 20538 Delete type=0 #374 +2024/05/17-18:27:08.281 20538 Delete type=3 #372 diff --git a/packs/gps-3rd-party-spells/MANIFEST-000352 b/packs/gps-3rd-party-spells/MANIFEST-000378 similarity index 64% rename from packs/gps-3rd-party-spells/MANIFEST-000352 rename to packs/gps-3rd-party-spells/MANIFEST-000378 index db6b367a..be4b46aa 100644 Binary files a/packs/gps-3rd-party-spells/MANIFEST-000352 and b/packs/gps-3rd-party-spells/MANIFEST-000378 differ diff --git a/packs/gps-actors/000826.log b/packs/gps-actors/000852.log similarity index 100% rename from packs/gps-actors/000826.log rename to packs/gps-actors/000852.log diff --git a/packs/gps-actors/CURRENT b/packs/gps-actors/CURRENT index f4c3fdc7..e4c5df5b 100644 --- a/packs/gps-actors/CURRENT +++ b/packs/gps-actors/CURRENT @@ -1 +1 @@ -MANIFEST-000824 +MANIFEST-000850 diff --git a/packs/gps-actors/LOG b/packs/gps-actors/LOG index 2d66d761..25e1d53e 100644 --- a/packs/gps-actors/LOG +++ b/packs/gps-actors/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.317 7284 Recovering log #822 -2024/05/10-18:11:17.324 7284 Delete type=0 #822 -2024/05/10-18:11:17.324 7284 Delete type=3 #820 -2024/05/10-18:13:00.720 358c Level-0 table #827: started -2024/05/10-18:13:00.720 358c Level-0 table #827: 0 bytes OK -2024/05/10-18:13:00.723 358c Delete type=0 #825 -2024/05/10-18:13:00.724 358c Manual compaction at level-0 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.724 358c Manual compaction at level-1 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.901 13dc Recovering log #849 +2024/05/18-14:08:11.906 13dc Delete type=0 #849 +2024/05/18-14:08:11.906 13dc Delete type=3 #848 +2024/05/18-19:40:28.553 18fb8 Level-0 table #853: started +2024/05/18-19:40:28.553 18fb8 Level-0 table #853: 0 bytes OK +2024/05/18-19:40:28.557 18fb8 Delete type=0 #851 +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-0 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.572 18fb8 Manual compaction at level-1 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) diff --git a/packs/gps-actors/LOG.old b/packs/gps-actors/LOG.old index 4ef24a70..43cd2b38 100644 --- a/packs/gps-actors/LOG.old +++ b/packs/gps-actors/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.910 7284 Recovering log #818 -2024/05/10-17:34:18.916 7284 Delete type=0 #818 -2024/05/10-17:34:18.917 7284 Delete type=3 #816 -2024/05/10-18:08:06.784 358c Level-0 table #823: started -2024/05/10-18:08:06.784 358c Level-0 table #823: 0 bytes OK -2024/05/10-18:08:06.788 358c Delete type=0 #821 -2024/05/10-18:08:06.795 358c Manual compaction at level-0 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.795 358c Manual compaction at level-1 from '!actors!2Q055cZ4Q4eMWCQT' @ 72057594037927935 : 1 .. '!actors.items.effects!2Q055cZ4Q4eMWCQT.icorevoMIkBVXL37.jFKhp34XZd32ryYT' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.240 ff48 Recovering log #846 +2024/05/17-18:27:08.246 ff48 Delete type=0 #846 +2024/05/17-18:27:08.246 ff48 Delete type=3 #844 diff --git a/packs/gps-actors/MANIFEST-000824 b/packs/gps-actors/MANIFEST-000850 similarity index 70% rename from packs/gps-actors/MANIFEST-000824 rename to packs/gps-actors/MANIFEST-000850 index f2b836ab..286e8008 100644 Binary files a/packs/gps-actors/MANIFEST-000824 and b/packs/gps-actors/MANIFEST-000850 differ diff --git a/packs/gps-class-features/001970.ldb b/packs/gps-class-features/001970.ldb deleted file mode 100644 index adb0d16c..00000000 Binary files a/packs/gps-class-features/001970.ldb and /dev/null differ diff --git a/packs/gps-class-features/002001.log b/packs/gps-class-features/002027.log similarity index 100% rename from packs/gps-class-features/002001.log rename to packs/gps-class-features/002027.log diff --git a/packs/gps-class-features/002029.ldb b/packs/gps-class-features/002029.ldb new file mode 100644 index 00000000..e5bcfc39 Binary files /dev/null and b/packs/gps-class-features/002029.ldb differ diff --git a/packs/gps-class-features/CURRENT b/packs/gps-class-features/CURRENT index d9e84cb8..8037d568 100644 --- a/packs/gps-class-features/CURRENT +++ b/packs/gps-class-features/CURRENT @@ -1 +1 @@ -MANIFEST-001999 +MANIFEST-002025 diff --git a/packs/gps-class-features/LOG b/packs/gps-class-features/LOG index 7884cb5e..628b98e6 100644 --- a/packs/gps-class-features/LOG +++ b/packs/gps-class-features/LOG @@ -1,8 +1,15 @@ -2024/05/10-18:11:17.125 7284 Recovering log #1997 -2024/05/10-18:11:17.132 7284 Delete type=0 #1997 -2024/05/10-18:11:17.132 7284 Delete type=3 #1995 -2024/05/10-18:13:00.665 358c Level-0 table #2002: started -2024/05/10-18:13:00.665 358c Level-0 table #2002: 0 bytes OK -2024/05/10-18:13:00.668 358c Delete type=0 #2000 -2024/05/10-18:13:00.677 358c Manual compaction at level-0 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.677 358c Manual compaction at level-1 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.740 13dc Recovering log #2024 +2024/05/18-14:08:11.746 13dc Delete type=0 #2024 +2024/05/18-14:08:11.746 13dc Delete type=3 #2023 +2024/05/18-19:40:28.475 18fb8 Level-0 table #2028: started +2024/05/18-19:40:28.482 18fb8 Level-0 table #2028: 23895 bytes OK +2024/05/18-19:40:28.485 18fb8 Delete type=0 #2026 +2024/05/18-19:40:28.492 18fb8 Manual compaction at level-0 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.499 18fb8 Manual compaction at level-1 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at '!items.effects!kXwZm3eXMDC8okXJ.K83zCPRi1VnQcysD' @ 352 : 0 +2024/05/18-19:40:28.499 18fb8 Compacting 1@1 + 1@2 files +2024/05/18-19:40:28.506 18fb8 Generated table #2029@1: 55 keys, 99800 bytes +2024/05/18-19:40:28.506 18fb8 Compacted 1@1 + 1@2 files => 99800 bytes +2024/05/18-19:40:28.508 18fb8 compacted to: files[ 0 0 1 0 0 0 0 ] +2024/05/18-19:40:28.508 18fb8 Delete type=2 #1970 +2024/05/18-19:40:28.508 18fb8 Delete type=2 #2028 +2024/05/18-19:40:28.519 18fb8 Manual compaction at level-1 from '!items.effects!kXwZm3eXMDC8okXJ.K83zCPRi1VnQcysD' @ 352 : 0 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) diff --git a/packs/gps-class-features/LOG.old b/packs/gps-class-features/LOG.old index 12fd72a4..0a2f0159 100644 --- a/packs/gps-class-features/LOG.old +++ b/packs/gps-class-features/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.750 7284 Recovering log #1993 -2024/05/10-17:34:18.758 7284 Delete type=0 #1993 -2024/05/10-17:34:18.758 7284 Delete type=3 #1991 -2024/05/10-18:08:06.706 358c Level-0 table #1998: started -2024/05/10-18:08:06.706 358c Level-0 table #1998: 0 bytes OK -2024/05/10-18:08:06.709 358c Delete type=0 #1996 -2024/05/10-18:08:06.713 358c Manual compaction at level-0 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.713 358c Manual compaction at level-1 from '!folders!89rvrtGjpBsZz1Tr' @ 72057594037927935 : 1 .. '!items.effects!wLd8HBhcDcpEy0Gp.DWegiMAKX43CuDbS' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.099 ff48 Recovering log #2021 +2024/05/17-18:27:08.105 ff48 Delete type=0 #2021 +2024/05/17-18:27:08.106 ff48 Delete type=3 #2019 diff --git a/packs/gps-class-features/MANIFEST-001999 b/packs/gps-class-features/MANIFEST-001999 deleted file mode 100644 index f4b43857..00000000 Binary files a/packs/gps-class-features/MANIFEST-001999 and /dev/null differ diff --git a/packs/gps-class-features/MANIFEST-002025 b/packs/gps-class-features/MANIFEST-002025 new file mode 100644 index 00000000..ac35adba Binary files /dev/null and b/packs/gps-class-features/MANIFEST-002025 differ diff --git a/packs/gps-generic-features/002061.ldb b/packs/gps-generic-features/002061.ldb deleted file mode 100644 index 1bf5fa61..00000000 Binary files a/packs/gps-generic-features/002061.ldb and /dev/null differ diff --git a/packs/gps-generic-features/002064.log b/packs/gps-generic-features/002095.log similarity index 100% rename from packs/gps-generic-features/002064.log rename to packs/gps-generic-features/002095.log diff --git a/packs/gps-generic-features/002098.ldb b/packs/gps-generic-features/002098.ldb new file mode 100644 index 00000000..e4a13a6e Binary files /dev/null and b/packs/gps-generic-features/002098.ldb differ diff --git a/packs/gps-generic-features/CURRENT b/packs/gps-generic-features/CURRENT index baecc1fe..d2e3a656 100644 --- a/packs/gps-generic-features/CURRENT +++ b/packs/gps-generic-features/CURRENT @@ -1 +1 @@ -MANIFEST-002062 +MANIFEST-002092 diff --git a/packs/gps-generic-features/LOG b/packs/gps-generic-features/LOG index d2ae1945..4646c4e8 100644 --- a/packs/gps-generic-features/LOG +++ b/packs/gps-generic-features/LOG @@ -1,8 +1,24 @@ -2024/05/10-18:11:17.175 7278 Recovering log #2059 -2024/05/10-18:11:17.183 7278 Delete type=0 #2059 -2024/05/10-18:11:17.183 7278 Delete type=3 #2057 -2024/05/10-18:13:00.669 358c Level-0 table #2065: started -2024/05/10-18:13:00.669 358c Level-0 table #2065: 0 bytes OK -2024/05/10-18:13:00.673 358c Delete type=0 #2063 -2024/05/10-18:13:00.677 358c Manual compaction at level-0 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.678 358c Manual compaction at level-1 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.799 19eac Recovering log #2091 +2024/05/18-14:08:11.800 19eac Level-0 table #2093: started +2024/05/18-14:08:11.807 19eac Level-0 table #2093: 34535 bytes OK +2024/05/18-14:08:11.813 19eac Delete type=0 #2091 +2024/05/18-14:08:11.813 19eac Delete type=3 #2090 +2024/05/18-19:40:28.511 18fb8 Level-0 table #2096: started +2024/05/18-19:40:28.516 18fb8 Level-0 table #2096: 36954 bytes OK +2024/05/18-19:40:28.519 18fb8 Delete type=0 #2094 +2024/05/18-19:40:28.531 18fb8 Manual compaction at level-0 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at '!items.effects!dTFcLHRsLxw4R7PQ.1IkBgxOFEYJd4z53' @ 535 : 1 +2024/05/18-19:40:28.531 18fb8 Compacting 2@0 + 0@1 files +2024/05/18-19:40:28.535 18fb8 Generated table #2097@0: 5 keys, 16439 bytes +2024/05/18-19:40:28.535 18fb8 Compacted 2@0 + 0@1 files => 16439 bytes +2024/05/18-19:40:28.537 18fb8 compacted to: files[ 0 1 1 0 0 0 0 ] +2024/05/18-19:40:28.537 18fb8 Delete type=2 #2093 +2024/05/18-19:40:28.537 18fb8 Delete type=2 #2096 +2024/05/18-19:40:28.541 18fb8 Manual compaction at level-0 from '!items.effects!dTFcLHRsLxw4R7PQ.1IkBgxOFEYJd4z53' @ 535 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.545 18fb8 Manual compaction at level-1 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at '!items.effects!dTFcLHRsLxw4R7PQ.1IkBgxOFEYJd4z53' @ 540 : 1 +2024/05/18-19:40:28.545 18fb8 Compacting 1@1 + 1@2 files +2024/05/18-19:40:28.548 18fb8 Generated table #2098@1: 12 keys, 25103 bytes +2024/05/18-19:40:28.548 18fb8 Compacted 1@1 + 1@2 files => 25103 bytes +2024/05/18-19:40:28.549 18fb8 compacted to: files[ 0 0 1 0 0 0 0 ] +2024/05/18-19:40:28.549 18fb8 Delete type=2 #2089 +2024/05/18-19:40:28.549 18fb8 Delete type=2 #2097 +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-1 from '!items.effects!dTFcLHRsLxw4R7PQ.1IkBgxOFEYJd4z53' @ 540 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) diff --git a/packs/gps-generic-features/LOG.old b/packs/gps-generic-features/LOG.old index f9e684ac..19ffd7f2 100644 --- a/packs/gps-generic-features/LOG.old +++ b/packs/gps-generic-features/LOG.old @@ -1,15 +1,3 @@ -2024/05/10-17:34:18.811 7274 Recovering log #2055 -2024/05/10-17:34:18.820 7274 Delete type=0 #2055 -2024/05/10-17:34:18.821 7274 Delete type=3 #2053 -2024/05/10-18:08:06.736 358c Level-0 table #2060: started -2024/05/10-18:08:06.759 358c Level-0 table #2060: 174893 bytes OK -2024/05/10-18:08:06.762 358c Delete type=0 #2058 -2024/05/10-18:08:06.762 358c Manual compaction at level-0 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.762 358c Manual compaction at level-1 from '!items!0XoQ7lGPSwjM8Gw4' @ 72057594037927935 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at '!items.effects!eUTU3JSbo7X98INw.1IkBgxOFEYJd4z53' @ 507 : 1 -2024/05/10-18:08:06.762 358c Compacting 1@1 + 1@2 files -2024/05/10-18:08:06.781 358c Generated table #2061@1: 12 keys, 31917 bytes -2024/05/10-18:08:06.781 358c Compacted 1@1 + 1@2 files => 31917 bytes -2024/05/10-18:08:06.783 358c compacted to: files[ 0 0 1 0 0 0 0 ] -2024/05/10-18:08:06.783 358c Delete type=2 #2044 -2024/05/10-18:08:06.784 358c Delete type=2 #2060 -2024/05/10-18:08:06.795 358c Manual compaction at level-1 from '!items.effects!eUTU3JSbo7X98INw.1IkBgxOFEYJd4z53' @ 507 : 1 .. '!items.effects!svKaRfNtOXMOXoW6.NcYMpQ7B3RwBuLC7' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.145 20538 Recovering log #2086 +2024/05/17-18:27:08.150 20538 Delete type=0 #2086 +2024/05/17-18:27:08.150 20538 Delete type=3 #2083 diff --git a/packs/gps-generic-features/MANIFEST-002062 b/packs/gps-generic-features/MANIFEST-002062 deleted file mode 100644 index 7774cd09..00000000 Binary files a/packs/gps-generic-features/MANIFEST-002062 and /dev/null differ diff --git a/packs/gps-generic-features/MANIFEST-002092 b/packs/gps-generic-features/MANIFEST-002092 new file mode 100644 index 00000000..9105ed1e Binary files /dev/null and b/packs/gps-generic-features/MANIFEST-002092 differ diff --git a/packs/gps-homebrew-features/001982.log b/packs/gps-homebrew-features/002008.log similarity index 100% rename from packs/gps-homebrew-features/001982.log rename to packs/gps-homebrew-features/002008.log diff --git a/packs/gps-homebrew-features/CURRENT b/packs/gps-homebrew-features/CURRENT index f4da1e7e..f0039f1b 100644 --- a/packs/gps-homebrew-features/CURRENT +++ b/packs/gps-homebrew-features/CURRENT @@ -1 +1 @@ -MANIFEST-001980 +MANIFEST-002006 diff --git a/packs/gps-homebrew-features/LOG b/packs/gps-homebrew-features/LOG index de0277c3..47ae36ce 100644 --- a/packs/gps-homebrew-features/LOG +++ b/packs/gps-homebrew-features/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.197 7284 Recovering log #1978 -2024/05/10-18:11:17.206 7284 Delete type=0 #1978 -2024/05/10-18:11:17.207 7284 Delete type=3 #1976 -2024/05/10-18:13:00.681 358c Level-0 table #1983: started -2024/05/10-18:13:00.682 358c Level-0 table #1983: 0 bytes OK -2024/05/10-18:13:00.687 358c Delete type=0 #1981 -2024/05/10-18:13:00.701 358c Manual compaction at level-0 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.701 358c Manual compaction at level-1 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.821 13dc Recovering log #2005 +2024/05/18-14:08:11.827 13dc Delete type=0 #2005 +2024/05/18-14:08:11.828 13dc Delete type=3 #2004 +2024/05/18-19:40:28.537 18fb8 Level-0 table #2009: started +2024/05/18-19:40:28.537 18fb8 Level-0 table #2009: 0 bytes OK +2024/05/18-19:40:28.540 18fb8 Delete type=0 #2007 +2024/05/18-19:40:28.545 18fb8 Manual compaction at level-0 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-1 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) diff --git a/packs/gps-homebrew-features/LOG.old b/packs/gps-homebrew-features/LOG.old index bd07b97d..5d91a685 100644 --- a/packs/gps-homebrew-features/LOG.old +++ b/packs/gps-homebrew-features/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.839 7284 Recovering log #1974 -2024/05/10-17:34:18.850 7284 Delete type=0 #1974 -2024/05/10-17:34:18.850 7284 Delete type=3 #1972 -2024/05/10-18:08:06.723 358c Level-0 table #1979: started -2024/05/10-18:08:06.723 358c Level-0 table #1979: 0 bytes OK -2024/05/10-18:08:06.728 358c Delete type=0 #1977 -2024/05/10-18:08:06.762 358c Manual compaction at level-0 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.762 358c Manual compaction at level-1 from '!folders!4OzV9QdsPgTyK99q' @ 72057594037927935 : 1 .. '!items.effects!ba3fwkX1XMdyqBaE.hPR9ii2vho7FqWlZ' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.153 ff48 Recovering log #2002 +2024/05/17-18:27:08.158 ff48 Delete type=0 #2002 +2024/05/17-18:27:08.158 ff48 Delete type=3 #2000 diff --git a/packs/gps-homebrew-features/MANIFEST-001980 b/packs/gps-homebrew-features/MANIFEST-002006 similarity index 67% rename from packs/gps-homebrew-features/MANIFEST-001980 rename to packs/gps-homebrew-features/MANIFEST-002006 index d42f8fed..4015e774 100644 Binary files a/packs/gps-homebrew-features/MANIFEST-001980 and b/packs/gps-homebrew-features/MANIFEST-002006 differ diff --git a/packs/gps-homebrew-items/001991.log b/packs/gps-homebrew-items/002017.log similarity index 100% rename from packs/gps-homebrew-items/001991.log rename to packs/gps-homebrew-items/002017.log diff --git a/packs/gps-homebrew-items/CURRENT b/packs/gps-homebrew-items/CURRENT index 1178bd05..288e65ed 100644 --- a/packs/gps-homebrew-items/CURRENT +++ b/packs/gps-homebrew-items/CURRENT @@ -1 +1 @@ -MANIFEST-001989 +MANIFEST-002015 diff --git a/packs/gps-homebrew-items/LOG b/packs/gps-homebrew-items/LOG index f4e4b784..644ae213 100644 --- a/packs/gps-homebrew-items/LOG +++ b/packs/gps-homebrew-items/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.222 7278 Recovering log #1987 -2024/05/10-18:11:17.232 7278 Delete type=0 #1987 -2024/05/10-18:11:17.232 7278 Delete type=3 #1985 -2024/05/10-18:13:00.692 358c Level-0 table #1992: started -2024/05/10-18:13:00.692 358c Level-0 table #1992: 0 bytes OK -2024/05/10-18:13:00.697 358c Delete type=0 #1990 -2024/05/10-18:13:00.701 358c Manual compaction at level-0 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.701 358c Manual compaction at level-1 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.846 19eac Recovering log #2014 +2024/05/18-14:08:11.853 19eac Delete type=0 #2014 +2024/05/18-14:08:11.853 19eac Delete type=3 #2013 +2024/05/18-19:40:28.541 18fb8 Level-0 table #2018: started +2024/05/18-19:40:28.541 18fb8 Level-0 table #2018: 0 bytes OK +2024/05/18-19:40:28.545 18fb8 Delete type=0 #2016 +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-0 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-1 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) diff --git a/packs/gps-homebrew-items/LOG.old b/packs/gps-homebrew-items/LOG.old index 68d5eaba..8e21edb5 100644 --- a/packs/gps-homebrew-items/LOG.old +++ b/packs/gps-homebrew-items/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.857 7274 Recovering log #1983 -2024/05/10-17:34:18.866 7274 Delete type=0 #1983 -2024/05/10-17:34:18.866 7274 Delete type=3 #1981 -2024/05/10-18:08:06.715 358c Level-0 table #1988: started -2024/05/10-18:08:06.715 358c Level-0 table #1988: 0 bytes OK -2024/05/10-18:08:06.722 358c Delete type=0 #1986 -2024/05/10-18:08:06.762 358c Manual compaction at level-0 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.762 358c Manual compaction at level-1 from '!items!1WSJjnpLJhilXEgO' @ 72057594037927935 : 1 .. '!items.effects!zEXJxqsAmVM7Pohu.eA3jhjz26f35OLfw' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.163 20538 Recovering log #2011 +2024/05/17-18:27:08.168 20538 Delete type=0 #2011 +2024/05/17-18:27:08.168 20538 Delete type=3 #2009 diff --git a/packs/gps-homebrew-items/MANIFEST-001989 b/packs/gps-homebrew-items/MANIFEST-002015 similarity index 81% rename from packs/gps-homebrew-items/MANIFEST-001989 rename to packs/gps-homebrew-items/MANIFEST-002015 index 946c82bb..bc638e7f 100644 Binary files a/packs/gps-homebrew-items/MANIFEST-001989 and b/packs/gps-homebrew-items/MANIFEST-002015 differ diff --git a/packs/gps-homebrew-spells/001659.log b/packs/gps-homebrew-spells/001685.log similarity index 100% rename from packs/gps-homebrew-spells/001659.log rename to packs/gps-homebrew-spells/001685.log diff --git a/packs/gps-homebrew-spells/CURRENT b/packs/gps-homebrew-spells/CURRENT index 91fb4906..9a09e4c4 100644 --- a/packs/gps-homebrew-spells/CURRENT +++ b/packs/gps-homebrew-spells/CURRENT @@ -1 +1 @@ -MANIFEST-001657 +MANIFEST-001683 diff --git a/packs/gps-homebrew-spells/LOG b/packs/gps-homebrew-spells/LOG index dd765d0b..7676b6fc 100644 --- a/packs/gps-homebrew-spells/LOG +++ b/packs/gps-homebrew-spells/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.242 7284 Recovering log #1655 -2024/05/10-18:11:17.257 7284 Delete type=0 #1655 -2024/05/10-18:11:17.258 7284 Delete type=3 #1653 -2024/05/10-18:13:00.688 358c Level-0 table #1660: started -2024/05/10-18:13:00.688 358c Level-0 table #1660: 0 bytes OK -2024/05/10-18:13:00.692 358c Delete type=0 #1658 -2024/05/10-18:13:00.701 358c Manual compaction at level-0 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.701 358c Manual compaction at level-1 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.864 13dc Recovering log #1682 +2024/05/18-14:08:11.870 13dc Delete type=0 #1682 +2024/05/18-14:08:11.870 13dc Delete type=3 #1681 +2024/05/18-19:40:28.549 18fb8 Level-0 table #1686: started +2024/05/18-19:40:28.549 18fb8 Level-0 table #1686: 0 bytes OK +2024/05/18-19:40:28.552 18fb8 Delete type=0 #1684 +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-0 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.552 18fb8 Manual compaction at level-1 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) diff --git a/packs/gps-homebrew-spells/LOG.old b/packs/gps-homebrew-spells/LOG.old index 9dcaf0f9..df0ede6e 100644 --- a/packs/gps-homebrew-spells/LOG.old +++ b/packs/gps-homebrew-spells/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.872 7284 Recovering log #1651 -2024/05/10-17:34:18.880 7284 Delete type=0 #1651 -2024/05/10-17:34:18.880 7284 Delete type=3 #1649 -2024/05/10-18:08:06.729 358c Level-0 table #1656: started -2024/05/10-18:08:06.729 358c Level-0 table #1656: 0 bytes OK -2024/05/10-18:08:06.735 358c Delete type=0 #1654 -2024/05/10-18:08:06.762 358c Manual compaction at level-0 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.762 358c Manual compaction at level-1 from '!items!iVqgFn89rGOnPTK4' @ 72057594037927935 : 1 .. '!items.effects!iVqgFn89rGOnPTK4.fAK9x7lIORqSnaz1' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.174 ff48 Recovering log #1679 +2024/05/17-18:27:08.179 ff48 Delete type=0 #1679 +2024/05/17-18:27:08.179 ff48 Delete type=3 #1677 diff --git a/packs/gps-homebrew-spells/MANIFEST-001657 b/packs/gps-homebrew-spells/MANIFEST-001683 similarity index 56% rename from packs/gps-homebrew-spells/MANIFEST-001657 rename to packs/gps-homebrew-spells/MANIFEST-001683 index 957a3d1e..2b542a7f 100644 Binary files a/packs/gps-homebrew-spells/MANIFEST-001657 and b/packs/gps-homebrew-spells/MANIFEST-001683 differ diff --git a/packs/gps-items/001983.log b/packs/gps-items/002009.log similarity index 100% rename from packs/gps-items/001983.log rename to packs/gps-items/002009.log diff --git a/packs/gps-items/CURRENT b/packs/gps-items/CURRENT index 9fd6c444..c77b85c6 100644 --- a/packs/gps-items/CURRENT +++ b/packs/gps-items/CURRENT @@ -1 +1 @@ -MANIFEST-001981 +MANIFEST-002007 diff --git a/packs/gps-items/LOG b/packs/gps-items/LOG index 3a95ef7f..38afff4e 100644 --- a/packs/gps-items/LOG +++ b/packs/gps-items/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.144 72c0 Recovering log #1979 -2024/05/10-18:11:17.150 72c0 Delete type=0 #1979 -2024/05/10-18:11:17.150 72c0 Delete type=3 #1977 -2024/05/10-18:13:00.660 358c Level-0 table #1984: started -2024/05/10-18:13:00.660 358c Level-0 table #1984: 0 bytes OK -2024/05/10-18:13:00.665 358c Delete type=0 #1982 -2024/05/10-18:13:00.677 358c Manual compaction at level-0 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.677 358c Manual compaction at level-1 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.758 19eac Recovering log #2006 +2024/05/18-14:08:11.763 19eac Delete type=0 #2006 +2024/05/18-14:08:11.763 19eac Delete type=3 #2005 +2024/05/18-19:40:28.487 18fb8 Level-0 table #2010: started +2024/05/18-19:40:28.487 18fb8 Level-0 table #2010: 0 bytes OK +2024/05/18-19:40:28.490 18fb8 Delete type=0 #2008 +2024/05/18-19:40:28.492 18fb8 Manual compaction at level-0 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.499 18fb8 Manual compaction at level-1 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) diff --git a/packs/gps-items/LOG.old b/packs/gps-items/LOG.old index 8a7edb77..0a0a1261 100644 --- a/packs/gps-items/LOG.old +++ b/packs/gps-items/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.767 7274 Recovering log #1975 -2024/05/10-17:34:18.775 7274 Delete type=0 #1975 -2024/05/10-17:34:18.775 7274 Delete type=3 #1973 -2024/05/10-18:08:06.702 358c Level-0 table #1980: started -2024/05/10-18:08:06.702 358c Level-0 table #1980: 0 bytes OK -2024/05/10-18:08:06.706 358c Delete type=0 #1978 -2024/05/10-18:08:06.713 358c Manual compaction at level-0 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.713 358c Manual compaction at level-1 from '!items!0qTQDQ2Cipf15JGW' @ 72057594037927935 : 1 .. '!items.effects!wds22ulA8PSTvYWP.ZrTNMwai89gqFKJo' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.118 20538 Recovering log #2003 +2024/05/17-18:27:08.124 20538 Delete type=0 #2003 +2024/05/17-18:27:08.124 20538 Delete type=3 #2001 diff --git a/packs/gps-items/MANIFEST-001981 b/packs/gps-items/MANIFEST-002007 similarity index 63% rename from packs/gps-items/MANIFEST-001981 rename to packs/gps-items/MANIFEST-002007 index 3ffac2ef..000cee99 100644 Binary files a/packs/gps-items/MANIFEST-001981 and b/packs/gps-items/MANIFEST-002007 differ diff --git a/packs/gps-monster-features/001894.ldb b/packs/gps-monster-features/001894.ldb deleted file mode 100644 index 0e76bff5..00000000 Binary files a/packs/gps-monster-features/001894.ldb and /dev/null differ diff --git a/packs/gps-monster-features/001995.ldb b/packs/gps-monster-features/001995.ldb new file mode 100644 index 00000000..f4b62dfe Binary files /dev/null and b/packs/gps-monster-features/001995.ldb differ diff --git a/packs/gps-monster-features/001979.log b/packs/gps-monster-features/002008.log similarity index 100% rename from packs/gps-monster-features/001979.log rename to packs/gps-monster-features/002008.log diff --git a/packs/gps-monster-features/CURRENT b/packs/gps-monster-features/CURRENT index db5a56fa..f0039f1b 100644 --- a/packs/gps-monster-features/CURRENT +++ b/packs/gps-monster-features/CURRENT @@ -1 +1 @@ -MANIFEST-001977 +MANIFEST-002006 diff --git a/packs/gps-monster-features/LOG b/packs/gps-monster-features/LOG index 39515a0e..9db99d9b 100644 --- a/packs/gps-monster-features/LOG +++ b/packs/gps-monster-features/LOG @@ -1,8 +1,8 @@ -2024/05/10-18:11:17.163 7284 Recovering log #1975 -2024/05/10-18:11:17.170 7284 Delete type=0 #1975 -2024/05/10-18:11:17.170 7284 Delete type=3 #1973 -2024/05/10-18:13:00.674 358c Level-0 table #1980: started -2024/05/10-18:13:00.674 358c Level-0 table #1980: 0 bytes OK -2024/05/10-18:13:00.677 358c Delete type=0 #1978 -2024/05/10-18:13:00.677 358c Manual compaction at level-0 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.678 358c Manual compaction at level-1 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.784 13dc Recovering log #2005 +2024/05/18-14:08:11.790 13dc Delete type=0 #2005 +2024/05/18-14:08:11.790 13dc Delete type=3 #2004 +2024/05/18-19:40:28.509 18fb8 Level-0 table #2009: started +2024/05/18-19:40:28.509 18fb8 Level-0 table #2009: 0 bytes OK +2024/05/18-19:40:28.511 18fb8 Delete type=0 #2007 +2024/05/18-19:40:28.519 18fb8 Manual compaction at level-0 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.537 18fb8 Manual compaction at level-1 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) diff --git a/packs/gps-monster-features/LOG.old b/packs/gps-monster-features/LOG.old index 103412cb..32ffa9ee 100644 --- a/packs/gps-monster-features/LOG.old +++ b/packs/gps-monster-features/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.787 7284 Recovering log #1971 -2024/05/10-17:34:18.795 7284 Delete type=0 #1971 -2024/05/10-17:34:18.796 7284 Delete type=3 #1969 -2024/05/10-18:08:06.709 358c Level-0 table #1976: started -2024/05/10-18:08:06.709 358c Level-0 table #1976: 0 bytes OK -2024/05/10-18:08:06.713 358c Delete type=0 #1974 -2024/05/10-18:08:06.713 358c Manual compaction at level-0 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.713 358c Manual compaction at level-1 from '!folders!44lJ4L7xySVYZzED' @ 72057594037927935 : 1 .. '!items.effects!yp0IIuvsEkJd6KKW.WlySPDKKWMIOowHi' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.134 ff48 Recovering log #2002 +2024/05/17-18:27:08.139 ff48 Delete type=0 #2002 +2024/05/17-18:27:08.139 ff48 Delete type=3 #2000 diff --git a/packs/gps-monster-features/MANIFEST-001977 b/packs/gps-monster-features/MANIFEST-001977 deleted file mode 100644 index 691bb567..00000000 Binary files a/packs/gps-monster-features/MANIFEST-001977 and /dev/null differ diff --git a/packs/gps-monster-features/MANIFEST-002006 b/packs/gps-monster-features/MANIFEST-002006 new file mode 100644 index 00000000..13d93316 Binary files /dev/null and b/packs/gps-monster-features/MANIFEST-002006 differ diff --git a/packs/gps-spells/002014.log b/packs/gps-spells/002044.log similarity index 100% rename from packs/gps-spells/002014.log rename to packs/gps-spells/002044.log diff --git a/packs/gps-spells/002007.ldb b/packs/gps-spells/002047.ldb similarity index 87% rename from packs/gps-spells/002007.ldb rename to packs/gps-spells/002047.ldb index 835fd4d6..9451ecb8 100644 Binary files a/packs/gps-spells/002007.ldb and b/packs/gps-spells/002047.ldb differ diff --git a/packs/gps-spells/CURRENT b/packs/gps-spells/CURRENT index 51f02d4b..1ef8d078 100644 --- a/packs/gps-spells/CURRENT +++ b/packs/gps-spells/CURRENT @@ -1 +1 @@ -MANIFEST-002012 +MANIFEST-002041 diff --git a/packs/gps-spells/LOG b/packs/gps-spells/LOG index 8f39cb6d..73d4a7b5 100644 --- a/packs/gps-spells/LOG +++ b/packs/gps-spells/LOG @@ -1,8 +1,23 @@ -2024/05/10-18:11:17.106 72c0 Recovering log #2010 -2024/05/10-18:11:17.112 72c0 Delete type=0 #2010 -2024/05/10-18:11:17.112 72c0 Delete type=3 #2008 -2024/05/10-18:13:00.650 358c Level-0 table #2015: started -2024/05/10-18:13:00.650 358c Level-0 table #2015: 0 bytes OK -2024/05/10-18:13:00.655 358c Delete type=0 #2013 -2024/05/10-18:13:00.656 358c Manual compaction at level-0 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) -2024/05/10-18:13:00.657 358c Manual compaction at level-1 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) +2024/05/18-14:08:11.709 19eac Recovering log #2040 +2024/05/18-14:08:11.709 19eac Level-0 table #2042: started +2024/05/18-14:08:11.713 19eac Level-0 table #2042: 68952 bytes OK +2024/05/18-14:08:11.719 19eac Delete type=0 #2040 +2024/05/18-14:08:11.719 19eac Delete type=3 #2039 +2024/05/18-19:40:28.490 18fb8 Level-0 table #2045: started +2024/05/18-19:40:28.490 18fb8 Level-0 table #2045: 0 bytes OK +2024/05/18-19:40:28.492 18fb8 Delete type=0 #2043 +2024/05/18-19:40:28.492 18fb8 Manual compaction at level-0 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at '!items!FgsZ9i4opay0zeXp' @ 701 : 1 +2024/05/18-19:40:28.492 18fb8 Compacting 1@0 + 0@1 files +2024/05/18-19:40:28.497 18fb8 Generated table #2046@0: 1 keys, 4939 bytes +2024/05/18-19:40:28.497 18fb8 Compacted 1@0 + 0@1 files => 4939 bytes +2024/05/18-19:40:28.499 18fb8 compacted to: files[ 0 1 1 0 0 0 0 ] +2024/05/18-19:40:28.499 18fb8 Delete type=2 #2042 +2024/05/18-19:40:28.511 18fb8 Manual compaction at level-0 from '!items!FgsZ9i4opay0zeXp' @ 701 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) +2024/05/18-19:40:28.519 18fb8 Manual compaction at level-1 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at '!items!FgsZ9i4opay0zeXp' @ 715 : 1 +2024/05/18-19:40:28.519 18fb8 Compacting 1@1 + 1@2 files +2024/05/18-19:40:28.528 18fb8 Generated table #2047@1: 44 keys, 153732 bytes +2024/05/18-19:40:28.528 18fb8 Compacted 1@1 + 1@2 files => 153732 bytes +2024/05/18-19:40:28.530 18fb8 compacted to: files[ 0 0 1 0 0 0 0 ] +2024/05/18-19:40:28.531 18fb8 Delete type=2 #2030 +2024/05/18-19:40:28.531 18fb8 Delete type=2 #2046 +2024/05/18-19:40:28.541 18fb8 Manual compaction at level-1 from '!items!FgsZ9i4opay0zeXp' @ 715 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) diff --git a/packs/gps-spells/LOG.old b/packs/gps-spells/LOG.old index 170caf18..75678a78 100644 --- a/packs/gps-spells/LOG.old +++ b/packs/gps-spells/LOG.old @@ -1,8 +1,3 @@ -2024/05/10-17:34:18.725 7274 Recovering log #2005 -2024/05/10-17:34:18.735 7274 Delete type=0 #2005 -2024/05/10-17:34:18.735 7274 Delete type=3 #2003 -2024/05/10-18:08:06.696 358c Level-0 table #2011: started -2024/05/10-18:08:06.696 358c Level-0 table #2011: 0 bytes OK -2024/05/10-18:08:06.702 358c Delete type=0 #2009 -2024/05/10-18:08:06.713 358c Manual compaction at level-0 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) -2024/05/10-18:08:06.713 358c Manual compaction at level-1 from '!items!0gEfNrgZuAxvnL5H' @ 72057594037927935 : 1 .. '!items.effects!vxrggTopkxhq3MAn.T70VAw9NbZZUV7tZ' @ 0 : 0; will stop at (end) +2024/05/17-18:27:08.077 20538 Recovering log #2037 +2024/05/17-18:27:08.083 20538 Delete type=0 #2037 +2024/05/17-18:27:08.083 20538 Delete type=3 #2035 diff --git a/packs/gps-spells/MANIFEST-002012 b/packs/gps-spells/MANIFEST-002012 deleted file mode 100644 index 6dfb207e..00000000 Binary files a/packs/gps-spells/MANIFEST-002012 and /dev/null differ diff --git a/packs/gps-spells/MANIFEST-002041 b/packs/gps-spells/MANIFEST-002041 new file mode 100644 index 00000000..7dffb6d2 Binary files /dev/null and b/packs/gps-spells/MANIFEST-002041 differ diff --git a/scripts/helpers.js b/scripts/helpers.js index 2dc078fd..4355d6bc 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -10,6 +10,12 @@ export async function gmIdentifyItem({ itemUuid }) { if(itemData) await itemData.update({"system.identified": true}); } +export async function chooseUseItemUser({ itemUuid }) { + if(!itemUuid) return; + let itemData = await fromUuid(`${itemUuid}`); + if(itemData) await itemData.use(); +} + export async function gmUpdateTemplateSize({ templateUuid, templateSize }) { if(!templateUuid || !templateSize) return; let template = await fromUuid(`${templateUuid}`); @@ -32,6 +38,19 @@ export async function closeDialogById({ dialogId }) { } } +export function pauseDialogById({ dialogId, timeLeft, isPaused }) { + let activeDialog = ui.activeWindow?.data?.id; + + if (activeDialog.split('_')[0] === dialogId.split('_')[0]) { + ui.activeWindow.updateTimer(timeLeft, isPaused); + } else { + let dialog = Object.values(ui.windows).find(d => d.data?.id.split('_')[0] === dialogId.split('_')[0]); + if (dialog) { + dialog.updateTimer(timeLeft, isPaused); + } + } +} + export async function rollAsUser({ rollParams, type }) { if(!rollParams) return; let reroll; @@ -85,9 +104,11 @@ export async function handleDialogPromises(userDialogPromise, gmDialogPromise) { }); } -export function findValidTokens({token, target, itemName, itemType, itemChecked, reactionCheck, sightCheck, rangeCheck, rangeTotal, dispositionCheck, dispositionCheckType, workflowType, workflowCombat}) { +export function findValidTokens({initiatingToken, targetedToken, itemName, itemType, itemChecked, reactionCheck, sightCheck, rangeCheck, rangeTotal, dispositionCheck, dispositionCheckType, workflowType, workflowCombat}) { let validTokens; + let debugEnabled = MidiQOL.safeGetGameSetting('gambits-premades', 'debugEnabled'); + if (workflowCombat === false) { validTokens = canvas.tokens.placeables.filter(t => filterToken(t)); } else { @@ -97,28 +118,34 @@ export function findValidTokens({token, target, itemName, itemType, itemChecked, function filterToken(t) { // Check if invalid token on the canvas if (!t.actor) return; + if(debugEnabled) console.log(`${t.actor.name} made it past actor`) // Check if the token has the actual item to use let checkItem = t.actor.items.find(i => i.name.toLowerCase() === itemName); if(!checkItem) return; + if(debugEnabled) console.log(`${t.actor.name} made it past check item initial`) // Check if the tokens reaction already used if (reactionCheck && t.actor.effects.find(i => i.name.toLowerCase() === "reaction")) return; - + if(debugEnabled) console.log(`${t.actor.name} made it past reaction`) + // Check if the token is the initiating token or not a qualifying token disposition - if (dispositionCheck && (t.id === token.id || (dispositionCheckType === "enemy" && t.document.disposition === token.document.disposition) || (dispositionCheckType === "ally" && t.document.disposition !== target.document.disposition))) { + if (dispositionCheck && (t.id === initiatingToken.id || ((dispositionCheckType === "enemy" || dispositionCheckType === "enemyAlly") && t.document.disposition === initiatingToken.document.disposition) || (dispositionCheckType === "ally" && t.document.disposition !== initiatingToken.document.disposition))) { return; } + if(debugEnabled) console.log(`${t.actor.name} made it past disposition check`) // Check if token can see initiating token - if(sightCheck && !MidiQOL.canSee(t, token)) return; + if(sightCheck && !MidiQOL.canSee(t, initiatingToken)) return; + if(debugEnabled) console.log(`${t.actor.name} made it past sight check`) - // Check if token is within 60 feet + // Check if token is within range if(rangeCheck) { - let measuredDistance = (dispositionCheckType === "ally") ? MidiQOL.computeDistance(target,t,true) : MidiQOL.computeDistance(token,t,true); + let measuredDistance = (dispositionCheckType === "ally" || dispositionCheckType === "enemyAlly") ? MidiQOL.computeDistance(targetedToken,t,true) : MidiQOL.computeDistance(initiatingToken,t,true); let range = game.gps.convertFromFeet({range: rangeTotal}); if (measuredDistance === -1 || (measuredDistance > range)) return; } + if(debugEnabled) console.log(`${t.actor.name} made it past range check`) // Check if the token has available spell slots/uses if(itemType === "spell") { @@ -153,6 +180,7 @@ export function findValidTokens({token, target, itemName, itemType, itemChecked, return; } } + if(debugEnabled) console.log(`${t.actor.name} made it past check spell`) // Check if the token has available resource or item uses if(itemType === "feature") { @@ -168,6 +196,7 @@ export function findValidTokens({token, target, itemName, itemType, itemChecked, if (!resourceExistsWithValue && !itemExistsWithValue) return; } + if(debugEnabled) console.log(`${t.actor.name} made it past check feature`) if(itemType === "item") { const itemNames = itemChecked.map(item => item.toLowerCase()); @@ -175,6 +204,7 @@ export function findValidTokens({token, target, itemName, itemType, itemChecked, if (!itemExists) return; } + if(debugEnabled) console.log(`${t.actor.name} Reaction validation passed`) return t; }; diff --git a/scripts/macros/counterspell.js b/scripts/macros/counterspell.js index 3c716c04..b6c89517 100644 --- a/scripts/macros/counterspell.js +++ b/scripts/macros/counterspell.js @@ -1,76 +1,18 @@ -export async function counterspell({ workflowData }) { +export async function counterspell({ workflowData,workflowType,workflowCombat }) { const module = await import('../module.js'); const socket = module.socket; + const helpers = await import('../helpers.js'); const workflowUuid = workflowData; const workflow = await MidiQOL.Workflow.getWorkflow(`${workflowUuid}`); + let itemName = "counterspell"; + let itemProperName = "Counterspell"; + let dialogId = "counterspell"; if(!workflow) return; - if(workflow.item.type !== "spell" || workflow.item.name.toLowerCase().includes("counterspell")) return; + if(workflow.item.type !== "spell" || workflow.item.name === itemProperName) return; const lastMessage = game.messages.contents[game.messages.contents.length - 1]; // Use to hide initial spell message if (!game.combat) return; - function findCounterspellTokens(token, dispositionCheck) { - let validTokens = game.combat.combatants.map(combatant => canvas.tokens.get(combatant.tokenId)).filter(t => { - // Check if invalid token on the canvas - if (!t.actor) return; - - // Check if the token has counterspell available - let checkSpells = t.actor.items.filter(i => i.name.toLowerCase().includes("counterspell")); - let checkSpell = checkSpells.find(spell => spell?.system?.preparation?.mode); - if(!checkSpell) return; - - // Check if the tokens reaction already used - if (t.actor.effects.find(i => i.name.toLowerCase() === "reaction")) return; - - // Check if the token is the initiating token or is not an opposite token disposition - if (dispositionCheck(t, token)) return; - - // Check if token can see initiating token that cast spell - if(!MidiQOL.canSee(t, token)) return; - - // Check if token is within 60 feet - let measuredDistance = MidiQOL.computeDistance(token,t,true); - let range = game.gps.convertFromFeet({range: 60}); - if (measuredDistance === -1 || (measuredDistance > range)) return; - - // Check if the token has available spell slots/uses for counterspell - const spells = t.actor.system.spells; - - let checkType = checkSpell?.system?.preparation?.mode; - let hasSpellSlots = false; - if(checkType === "prepared" && checkSpell.system.preparation.prepared === false) return; - if(checkType === "prepared" || checkType === "always") - { - for (let level = 3; level <= 9; level++) { - let spellSlot = t.actor.system.spells[`spell${level}`].value; - if (spellSlot > 0) { - hasSpellSlots = true; - break; - } - } - } - else if(checkType === "pact") - { - let spellSlotValue = spells.pact.value; - if (spellSlotValue > 0) hasSpellSlots = true; - } - else if(checkType === "innate" || checkType === "atwill") - { - let slotValue = checkSpell.system.uses.value; - let slotEnabled = checkSpell.system.uses.per; - if (slotValue > 0 || slotEnabled === null) hasSpellSlots = true; - } - - if (!hasSpellSlots) { - return; - } - - return t; - }); - - return validTokens; - } - let selectedToken = workflow.token; let castLevel = false; let browserUser; @@ -78,19 +20,18 @@ export async function counterspell({ workflowData }) { await initialCounterspellProcess(workflow, lastMessage, castLevel, selectedToken); async function initialCounterspellProcess(workflow, lastMessage, castLevel, selectedToken) { - let findCounterspellTokensPrimary = findCounterspellTokens(selectedToken, (checkedToken, initiatingToken) => { - return checkedToken.id === initiatingToken.id || checkedToken.document.disposition === initiatingToken.document.disposition; - }); - if(findCounterspellTokensPrimary.length === 0 || !findCounterspellTokensPrimary) return; + let findValidTokens = helpers.findValidTokens({initiatingToken: selectedToken, targetedToken: null, itemName: itemName, itemType: "spell", itemChecked: null, reactionCheck: true, sightCheck: true, rangeCheck: true, rangeTotal: 60, dispositionCheck: true, dispositionCheckType: "enemy", workflowType: workflowType, workflowCombat: workflowCombat}); + + if(findValidTokens.length === 0 || !findValidTokens) return; - for (const validTokenPrimary of findCounterspellTokensPrimary) { + for (const validTokenPrimary of findValidTokens) { if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [game.users.find((u) => u.isGM && u.active).id] }); let workflowStatus = workflow.aborted; if(workflowStatus === true) return; let actorUuidPrimary = validTokenPrimary.actor.uuid; - const dialogTitlePrimary = `${validTokenPrimary.actor.name} | Counterspell`; - const dialogTitleGM = `Waiting for ${validTokenPrimary.actor.name}'s selection | Counterspell`; + const dialogTitlePrimary = `${validTokenPrimary.actor.name} | ${itemProperName}`; + const dialogTitleGM = `Waiting for ${validTokenPrimary.actor.name}'s selection | ${itemProperName}`; castLevel = !castLevel ? workflow.castData.castLevel : castLevel; let originTokenUuidPrimary = workflow.token.document.uuid; browserUser = MidiQOL.playerForActor(validTokenPrimary.actor); @@ -98,10 +39,10 @@ export async function counterspell({ workflowData }) { browserUser = game.users?.activeGM; } - const currentIndex = findCounterspellTokensPrimary.indexOf(validTokenPrimary); - const isLastToken = currentIndex === findCounterspellTokensPrimary.length - 1; + const currentIndex = findValidTokens.indexOf(validTokenPrimary); + const isLastToken = currentIndex === findValidTokens.length - 1; - let content = ` ${validTokenPrimary.actor.name} has a reaction available for a spell triggering Counterspell.` + let content = ` ${validTokenPrimary.actor.name} has a reaction available for a spell triggering ${itemProperName}.` let chatData = { user: game.users.find(u => u.isGM).id, content: content, @@ -112,31 +53,32 @@ export async function counterspell({ workflowData }) { let result; if (MidiQOL.safeGetGameSetting('gambits-premades', 'Mirror 3rd Party Dialog for GMs') && browserUser.id !== game.users?.activeGM.id) { - let userDialogPromise = socket.executeAsUser("showCounterspellDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, castLevel, dialogTitlePrimary, `counterspell_${browserUser.id}`, 'user').then(res => ({...res, source: "user", type: "multiDialog"})); - let gmDialogPromise = socket.executeAsGM("showCounterspellDialog", originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, castLevel, dialogTitleGM, `counterspell_${game.users?.activeGM.id}`, 'gm').then(res => ({...res, source: "gm", type: "multiDialog"})); + let userDialogPromise = socket.executeAsUser("showCounterspellDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitlePrimary, dialogId: `${dialogId}_${browserUser.id}`, itemProperName: itemProperName}).then(res => ({...res, source: "user", type: "multiDialog"})); + + let gmDialogPromise = socket.executeAsGM("showCounterspellDialog", {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitleGM, dialogId: `${dialogId}_${game.users?.activeGM.id}`, itemProperName: itemProperName}).then(res => ({...res, source: "gm", type: "multiDialog"})); result = await socket.executeAsGM("handleDialogPromises", userDialogPromise, gmDialogPromise); } else { - result = await socket.executeAsUser("showCounterspellDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, castLevel, dialogTitlePrimary).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); + result = await socket.executeAsUser("showCounterspellDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitlePrimary, itemProperName: itemProperName}).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); } - let { counterspellSuccess, counterspellLevel, source, type } = result; + let { userDecision, counterspellLevel, source, type } = result; - if (!counterspellSuccess) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `counterspell_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `counterspell_${browserUser.id}` }); + if (!userDecision) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessage._id }); continue; } - else if (!counterspellSuccess && isLastToken) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `counterspell_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `counterspell_${browserUser.id}` }); + else if (!userDecision && isLastToken) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessageSecondary._id }); return workflow.aborted = false; } - else if (counterspellSuccess === true) { + else if (userDecision === true) { if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessage._id }); castLevel = counterspellLevel; @@ -147,26 +89,25 @@ export async function counterspell({ workflowData }) { } async function secondaryCounterspellProcess(workflow, lastMessage, castLevel, validTokenPrimary) { - let findCounterspellTokensSecondary = findCounterspellTokens(validTokenPrimary, (checkedToken, initiatingToken) => { - return checkedToken.document.disposition === initiatingToken.document.disposition; - }); - if(findCounterspellTokensSecondary.length === 0 || !findCounterspellTokensSecondary) return workflow.aborted = true; + let findValidTokens = helpers.findValidTokens({initiatingToken: validTokenPrimary, targetedToken: null, itemName: itemName, itemType: "spell", itemChecked: null, reactionCheck: true, sightCheck: true, rangeCheck: true, rangeTotal: 60, dispositionCheck: true, dispositionCheckType: "enemy", workflowType: workflowType, workflowCombat: workflowCombat}); + + if(findValidTokens.length === 0 || !findValidTokens) return workflow.aborted = true; - for (const validTokenSecondary of findCounterspellTokensSecondary) { + for (const validTokenSecondary of findValidTokens) { let actorUuidSecondary = validTokenSecondary.actor.uuid; - const dialogTitleSecondary = `${validTokenSecondary.actor.name} | Counterspell`; - const dialogTitleGMSecondary = `Waiting for ${validTokenSecondary.actor.name}'s selection | Counterspell`; + const dialogTitleSecondary = `${validTokenSecondary.actor.name} | ${itemProperName}`; + const dialogTitleGMSecondary = `Waiting for ${validTokenSecondary.actor.name}'s selection | ${itemProperName}`; let originTokenUuidSecondary = validTokenPrimary.document.uuid; - const currentIndex = findCounterspellTokensSecondary.indexOf(validTokenSecondary); - const isLastToken = currentIndex === findCounterspellTokensSecondary.length - 1; + const currentIndex = findValidTokens.indexOf(validTokenSecondary); + const isLastToken = currentIndex === findValidTokens.length - 1; browserUser = MidiQOL.playerForActor(validTokenSecondary.actor); if (!browserUser.active) { browserUser = game.users?.activeGM; } - let contentSecondary = ` ${validTokenSecondary.actor.name} has a reaction available for a spell triggering Counterspell.` + let contentSecondary = ` ${validTokenSecondary.actor.name} has a reaction available for a spell triggering ${itemProperName}.` let chatData = { user: game.users.find(u => u.isGM).id, content: contentSecondary, @@ -177,33 +118,34 @@ export async function counterspell({ workflowData }) { let result; if (MidiQOL.safeGetGameSetting('gambits-premades', 'Mirror 3rd Party Dialog for GMs') && browserUser.id !== game.users?.activeGM.id) { - let userDialogPromise = socket.executeAsUser("showCounterspellDialog", browserUser.id, originTokenUuidSecondary, actorUuidSecondary, validTokenSecondary.document.uuid, castLevel, dialogTitleSecondary, `counterspell_${browserUser.id}`, 'user').then(res => ({...res, source: "user", type: "multiDialog"})); - let gmDialogPromise = socket.executeAsGM("showCounterspellDialog", originTokenUuidSecondary, actorUuidSecondary, validTokenSecondary.document.uuid, castLevel, dialogTitleGMSecondary, `counterspell_${game.users?.activeGM.id}`, 'gm').then(res => ({...res, source: "gm", type: "multiDialog"})); + let userDialogPromise = socket.executeAsUser("showCounterspellDialog", browserUser.id, {targetUuids: originTokenUuidSecondary, actorUuid: actorUuidSecondary, tokenUuid: validTokenSecondary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitleSecondary, dialogId: `${dialogId}_${browserUser.id}`, itemProperName: itemProperName}).then(res => ({...res, source: "user", type: "multiDialog"})); + + let gmDialogPromise = socket.executeAsGM("showCounterspellDialog", {targetUuids: originTokenUuidSecondary, actorUuid: actorUuidSecondary, tokenUuid: validTokenSecondary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitleGMSecondary, dialogId: `${dialogId}_${game.users?.activeGM.id}`, itemProperName: itemProperName}).then(res => ({...res, source: "gm", type: "multiDialog"})); result = await socket.executeAsGM("handleDialogPromises", userDialogPromise, gmDialogPromise); } else { - result = await socket.executeAsUser("showCounterspellDialog", browserUser.id, originTokenUuidSecondary, actorUuidSecondary, validTokenSecondary.document.uuid, castLevel, dialogTitleSecondary).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); + result = await socket.executeAsUser("showCounterspellDialog", browserUser.id, {targetUuids: originTokenUuidSecondary, actorUuid: actorUuidSecondary, tokenUuid: validTokenSecondary.document.uuid, castLevel: castLevel, dialogTitle: dialogTitleSecondary, itemProperName: itemProperName}).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); } - let { counterspellSuccess, counterspellLevel, source, type } = result; + let { userDecision, counterspellLevel, source, type } = result; - if (counterspellSuccess === true) { + if (userDecision === true) { if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessageSecondary._id }); castLevel = counterspellLevel; await initialCounterspellProcess(workflow, lastMessage, castLevel, validTokenSecondary); break; } - else if (!counterspellSuccess && isLastToken) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `counterspell_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `counterspell_${browserUser.id}` }); + else if (!userDecision && isLastToken) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); if(lastMessage && validTokenPrimary.actor.type === "character") lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessageSecondary._id }); return workflow.aborted = true; } - else if (!counterspellSuccess) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `counterspell_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `counterspell_${browserUser.id}` }); + else if (!userDecision) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); if(lastMessage) lastMessage.update({ whisper: [] }); await socket.executeAsGM("deleteChatMessage", { chatId: notificationMessageSecondary._id }); continue; @@ -212,18 +154,18 @@ export async function counterspell({ workflowData }) { } } -export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUuid, castLevel, dialogTitle, dialogId, source) { +export async function showCounterspellDialog({targetUuids, actorUuid, tokenUuid, castLevel, dialogTitle, dialogId, source, type, itemProperName}) { const module = await import('../module.js'); const socket = module.socket; return await new Promise(resolve => { async function wait(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); }; - const initialTimeLeft = Number(MidiQOL.safeGetGameSetting('gambits-premades', 'Counterspell Timeout')); + const initialTimeLeft = Number(MidiQOL.safeGetGameSetting('gambits-premades', `${itemProperName} Timeout`)); let dialogContent = `
- Would you like to use your reaction to counterspell?

+ Would you like to use your reaction to ${itemProperName}?

Time remaining

@@ -246,13 +188,13 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu dialog.dialogState.decision = "yes"; let actor = await fromUuid(actorUuid); let browserUser = MidiQOL.playerForActor(actor); - if(source && source === "user") await socket.executeAsGM("closeDialogById", { dialogId: `counterspell_${game.users?.activeGM.id}` }); - if(source && source === "gm") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `counterspell_${browserUser.id}` }); + if(source && source === "user") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); let uuid = actor.uuid; let token = await fromUuid(tokenUuid); - let originToken = await fromUuid(originTokenUuid); + let originToken = await fromUuid(targetUuids); - let chosenSpell = actor.items.find(i => i.name.toLowerCase().includes("counterspell")); + let chosenSpell = actor.items.find(i => i.name === itemProperName); chosenSpell.prepareData(); chosenSpell.prepareFinalAttributes(); @@ -266,7 +208,9 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu }; const itemRoll = await MidiQOL.completeItemUse(chosenSpell, {}, options); - let counterspellSuccess = false; + if(itemRoll.aborted === true) return resolve({ userDecision: false, counterspellLevel: false, programmaticallyClosed: false }); + + let userDecision = false; let counterspellLevel = false; let programmaticallyClosed = false; @@ -281,17 +225,17 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu abjurationCheck ? skillCheckTotal = skillCheck.total + actor.system?.attributes?.prof : skillCheckTotal = skillCheck.total; if (skillCheckTotal >= spellThreshold) { chatList = `The creature was counterspelled, you rolled a ${skillCheckTotal} ${skillCheck.options.flavor}. `; - counterspellSuccess = true; + userDecision = true; counterspellLevel = itemRoll.castData.castLevel; } else { chatList = `The creature was not counterspelled, you rolled a ${skillCheckTotal} ${skillCheck.options.flavor} and needed a ${spellThreshold}. `; - counterspellSuccess = false; + userDecision = false; } } else { - chatList = `The creature was counterspelled because you cast counterspell at an equal or higher level. `; - counterspellSuccess = true; + chatList = `The creature was counterspelled because you cast ${itemProperName} at an equal or higher level. `; + userDecision = true; counterspellLevel = itemRoll.castData.castLevel; } @@ -314,7 +258,7 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu content = content.slice(0, insertPosition) + chatList + content.slice(insertPosition); } await chatMessage.update({ content: content }); - resolve({counterspellSuccess, counterspellLevel, programmaticallyClosed}); + resolve({userDecision, counterspellLevel, programmaticallyClosed}); } }, no: { @@ -323,7 +267,7 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu // Reaction Declined dialog.dialogState.interacted = true; dialog.dialogState.decision = "no"; - resolve({ counterspellSuccess: false, counterspellLevel: false, programmaticallyClosed: false }); + resolve({ userDecision: false, counterspellLevel: false, programmaticallyClosed: false }); } }, }, default: "no", @@ -333,8 +277,15 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu let isPaused = false; const countdownElement = html.find("#countdown"); const pauseButton = html.find("#pauseButton"); - - const timer = setInterval(() => { + + dialog.updateTimer = (newTimeLeft, paused) => { + timeLeft = newTimeLeft; + isPaused = paused; + countdownElement.text(`${timeLeft}`); + pauseButton.text(isPaused ? 'Paused' : 'Pause'); + }; + + timer = setInterval(() => { if (!isPaused) { timeLeft--; countdownElement.text(`${timeLeft}`); @@ -344,27 +295,28 @@ export async function showCounterspellDialog(originTokenUuid, actorUuid, tokenUu } } }, 1000); - + pauseButton.click(() => { isPaused = !isPaused; pauseButton.text(isPaused ? 'Paused' : 'Pause'); + if (source && source === "user" && type === "multiDialog") { + socket.executeAsGM("pauseDialogById", { dialogId, timeLeft, isPaused }); + } else if (source && source === "gm" && type === "multiDialog") { + socket.executeAsUser("pauseDialogById", browserUser.id, { dialogId, timeLeft, isPaused }); + } }); }, close: () => { clearInterval(timer); if (dialog.dialogState.programmaticallyClosed) { - resolve({counterspellSuccess: false, counterspellLevel: null, programmaticallyClosed: true}); + resolve({ userDecision: false, programmaticallyClosed: true }); } else if (!dialog.dialogState.interacted) { - resolve({ counterspellSuccess: false, counterspellLevel: null, programmaticallyClosed: false }); + resolve({ userDecision: false, programmaticallyClosed: false }); } } }); - dialog.dialogState = { - interacted: false, - decision: null, - programmaticallyClosed: false - }; + dialog.dialogState = { interacted: false, decision: null, programmaticallyClosed: false }; dialog.render(true); - }) + }); } \ No newline at end of file diff --git a/scripts/macros/cuttingWords.js b/scripts/macros/cuttingWords.js index 8ed23118..1e393e11 100644 --- a/scripts/macros/cuttingWords.js +++ b/scripts/macros/cuttingWords.js @@ -1,73 +1,32 @@ -export async function cuttingWords({workflowData,workflowType}) { +export async function cuttingWords({workflowData,workflowType,workflowCombat}) { const module = await import('../module.js'); const socket = module.socket; + const helpers = await import('../helpers.js'); const workflowUuid = workflowData; const workflow = await MidiQOL.Workflow.getWorkflow(workflowUuid); + let itemName = "cutting words"; + let itemProperName = "Cutting Words"; + let dialogId = "cuttingwords"; if(!workflow) return; - if(workflow.item.name.toLowerCase() === "cutting words") return; + if(workflow.item.name === itemProperName) return; if (!game.combat) return; // Check if Opportunity Attack is initiating the workflow if(workflow.item.name === "Opportunity Attack") return; - function findCuttingWordsTokens(token, dispositionCheck) { - let validTokens = game.combat.combatants.map(combatant => canvas.tokens.get(combatant.tokenId)).filter(t => { - // Check if invalid token on the canvas - if (!t.actor) return; - - // Check if the token has cutting words available - if (!t.actor.items.find(i => i.name.toLowerCase() === "cutting words")) return; - - // Check if the tokens reaction already used - let reactionUsed = t.actor.effects.find(i => i.name.toLowerCase() === "reaction"); - if (reactionUsed) return; - - // Check if the token is the initiating token or is not an opposite token disposition - if (workflowType === "attack" || workflowType === "damage") { - if (dispositionCheck(t, token)) return; - } - - let midiSightTest = MidiQOL.canSee(t, token); - - if (midiSightTest === false) return; - - // Check if token is within 60 feet - let measuredDistance = MidiQOL.computeDistance(token,t,true); - let range = game.gps.convertFromFeet({range: 60}); - if (measuredDistance === -1 || (measuredDistance > range)) return; + let findValidTokens; - // Check if the token has available uses of Bardic Inspiration for Cutting Words - const itemNames = ["bardic inspiration"]; - - let resourceExistsWithValue = [t.actor.system.resources.primary, t.actor.system.resources.secondary, t.actor.system.resources.tertiary].some(resource => - itemNames.includes(resource?.label.toLowerCase()) && resource.value !== 0); - let itemExistsWithValue; - - if (!resourceExistsWithValue) { - itemExistsWithValue = !!t.actor.items.find(i => itemNames.includes(i.name.toLowerCase()) && i.system.uses.value !== 0); - } - - if (!resourceExistsWithValue && !itemExistsWithValue) return; - - return t; - }); - - return validTokens; - } - - let findCuttingWords = findCuttingWordsTokens(workflow.token, (checkedToken, initiatingToken) => { - return checkedToken.id === initiatingToken.id || checkedToken.document.disposition === initiatingToken.document.disposition; - }); + findValidTokens = helpers.findValidTokens({initiatingToken: workflow.token, targetedToken: null, itemName: itemName, itemType: "feature", itemChecked: ["bardic inspiration"], reactionCheck: true, sightCheck: true, rangeCheck: true, rangeTotal: 60, dispositionCheck: true, dispositionCheckType: "enemy", workflowType: workflowType, workflowCombat: workflowCombat}); let browserUser; - for (const validTokenPrimary of findCuttingWords) { + for (const validTokenPrimary of findValidTokens) { let actorUuidPrimary = validTokenPrimary.actor.uuid; - const dialogTitlePrimary = `${validTokenPrimary.actor.name} | Cutting Words`; - const dialogTitleGM = `Waiting for ${validTokenPrimary.actor.name}'s selection | Cutting Words`; + const dialogTitlePrimary = `${validTokenPrimary.actor.name} | ${itemProperName}`; + const dialogTitleGM = `Waiting for ${validTokenPrimary.actor.name}'s selection | ${itemProperName}`; let originTokenUuidPrimary = workflow.token.document.uuid; - let spellData = validTokenPrimary.actor.items.find(i => i.name.toLowerCase() === "cutting words"); + let spellData = validTokenPrimary.actor.items.find(i => i.name === itemProperName); let bardicDie = validTokenPrimary.actor.system.scale.bard["bardic-inspiration"].die; browserUser = MidiQOL.playerForActor(validTokenPrimary.actor); if (!browserUser.active) { @@ -82,22 +41,23 @@ export async function cuttingWords({workflowData,workflowType}) { let result; if (MidiQOL.safeGetGameSetting('gambits-premades', 'Mirror 3rd Party Dialog for GMs') && browserUser.id !== game.users?.activeGM.id) { - let userDialogPromise = socket.executeAsUser("showCuttingWordsDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitlePrimary, originTokenUuidPrimary, "damage", damageTypes, `cuttingwords_${browserUser.id}`, 'user', damageTotals).then(res => ({...res, source: "user", type: "multiDialog"})); - let gmDialogPromise = socket.executeAsGM("showCuttingWordsDialog", originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitleGM, originTokenUuidPrimary, "damage", damageTypes, `cuttingwords_${game.users?.activeGM.id}`, 'gm', damageTotals).then(res => ({...res, source: "gm", type: "multiDialog"})); + let userDialogPromise = socket.executeAsUser("showCuttingWordsDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitlePrimary, targetNames: originTokenUuidPrimary, outcomeType: "damage", damageTypes: damageTypes, dialogId: `${dialogId}_${browserUser.id}`, rollTotals: damageTotals, itemProperName: itemProperName}).then(res => ({...res, source: "user", type: "multiDialog"})); + + let gmDialogPromise = socket.executeAsGM("showCuttingWordsDialog", {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitleGM, targetNames: originTokenUuidPrimary, outcomeType: "damage", damageTypes: damageTypes, dialogId: `${dialogId}_${game.users?.activeGM.id}`, rollTotals: damageTotals, itemProperName: itemProperName}).then(res => ({...res, source: "gm", type: "multiDialog"})); result = await socket.executeAsGM("handleDialogPromises", userDialogPromise, gmDialogPromise); } else { - result = await socket.executeAsUser("showCuttingWordsDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitlePrimary, originTokenUuidPrimary, "damage", damageTypes, null, null, damageTotals).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); + result = await socket.executeAsUser("showCuttingWordsDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitlePrimary, targetNames: originTokenUuidPrimary, outcomeType: "damage", damageTypes: damageTypes, rollTotals: damageTotals, itemProperName: itemProperName}).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); } - const { cuttingWordsDecision, damageChosen, source, type } = result; + const { userDecision, damageChosen, source, type } = result; - if (cuttingWordsDecision === false || !cuttingWordsDecision) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `cuttingwords_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `cuttingwords_${browserUser.id}` }); + if (userDecision === false || !userDecision) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); continue; } - if (cuttingWordsDecision === true) { + if (userDecision === true) { const saveSetting = workflow.options.noOnUseMacro; workflow.options.noOnUseMacro = true; let reroll; @@ -164,22 +124,23 @@ export async function cuttingWords({workflowData,workflowType}) { let result; if (MidiQOL.safeGetGameSetting('gambits-premades', 'Mirror 3rd Party Dialog for GMs') && browserUser.id !== game.users?.activeGM.id) { - let userDialogPromise = socket.executeAsUser("showCuttingWordsDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitlePrimary, originTokenUuidPrimary, "attack", null, `cuttingwords_${browserUser.id}`, 'user', workflow.attackTotal).then(res => ({...res, source: "user", type: "multiDialog"})); - let gmDialogPromise = socket.executeAsGM("showCuttingWordsDialog", originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitleGM, originTokenUuidPrimary, "attack", null, `cuttingwords_${game.users?.activeGM.id}`, 'gm', workflow.attackTotal).then(res => ({...res, source: "gm", type: "multiDialog"})); + let userDialogPromise = socket.executeAsUser("showCuttingWordsDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitlePrimary, targetNames: originTokenUuidPrimary, outcomeType: "attack", dialogId: `${dialogId}_${browserUser.id}`, rollTotals: workflow.attackTotal, itemProperName: itemProperName}).then(res => ({...res, source: "user", type: "multiDialog"})); + + let gmDialogPromise = socket.executeAsGM("showCuttingWordsDialog", {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitleGM, targetNames: originTokenUuidPrimary, outcomeType: "attack", dialogId: `${dialogId}_${game.users?.activeGM.id}`, rollTotals: workflow.attackTotal, itemProperName: itemProperName}).then(res => ({...res, source: "gm", type: "multiDialog"})); result = await socket.executeAsGM("handleDialogPromises", userDialogPromise, gmDialogPromise); } else { - result = await socket.executeAsUser("showCuttingWordsDialog", browserUser.id, originTokenUuidPrimary, actorUuidPrimary, validTokenPrimary.document.uuid, dialogTitlePrimary, originTokenUuidPrimary, "attack", null, null, null, workflow.attackTotal).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); + result = await socket.executeAsUser("showCuttingWordsDialog", browserUser.id, {targetUuids: originTokenUuidPrimary, actorUuid: actorUuidPrimary, tokenUuid: validTokenPrimary.document.uuid, dialogTitle: dialogTitlePrimary, targetNames: originTokenUuidPrimary, outcomeType: "attack", rollTotals: workflow.attackTotal, itemProperName: itemProperName}).then(res => ({...res, source: browserUser.isGM ? "gm" : "user", type: "singleDialog"})); } - const { cuttingWordsDecision, damageChosen, source, type } = result; + const { userDecision, damageChosen, source, type } = result; - if (cuttingWordsDecision === false || !cuttingWordsDecision) { - if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `cuttingwords_${game.users?.activeGM.id}` }); - if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `cuttingwords_${browserUser.id}` }); + if (userDecision === false || !userDecision) { + if(source && source === "user" && type === "multiDialog") await socket.executeAsGM("closeDialogById", { dialogId: `${dialogId}_${game.users?.activeGM.id}` }); + if(source && source === "gm" && type === "multiDialog") await socket.executeAsUser("closeDialogById", browserUser.id, { dialogId: `${dialogId}_${browserUser.id}` }); continue; } - if (cuttingWordsDecision === true) { + if (userDecision === true) { let targetAC = workflow.hitTargets.first().actor.system.attributes.ac.value; const saveSetting = workflow.options.noOnUseMacro; workflow.options.noOnUseMacro = true; @@ -233,12 +194,12 @@ export async function cuttingWords({workflowData,workflowType}) { } } -export async function showCuttingWordsDialog(tokenUuids, actorUuid, tokenUuid, dialogTitle, targetNames, outcomeType, damageTypes, dialogId, source, rollTotals) { +export async function showCuttingWordsDialog({targetUuids, actorUuid, tokenUuid, dialogTitle, targetNames, outcomeType, damageTypes, dialogId, source, type, itemProperName, rollTotals}) { const module = await import('../module.js'); const socket = module.socket; return await new Promise(resolve => { - const initialTimeLeft = Number(MidiQOL.safeGetGameSetting('gambits-premades', 'Cutting Words Timeout')); + const initialTimeLeft = Number(MidiQOL.safeGetGameSetting('gambits-premades', `${itemProperName} Timeout`)); let dialogContent; let originToken = fromUuidSync(tokenUuid); @@ -249,11 +210,12 @@ export async function showCuttingWordsDialog(tokenUuids, actorUuid, tokenUuid, d dialogContent = `
-

${["none", "detailsDSN", "details"].includes(rollDetailSetting) ? `The target rolled a ${rollTotals} to attack. ` : ""}Would you like to use your reaction to use Cutting Words for this ${outcomeType} roll?

+

${["none", "detailsDSN", "details"].includes(rollDetailSetting) ? `The target rolled a ${rollTotals} to attack. ` : ""}Would you like to use your reaction to use ${itemProperName} for this ${outcomeType} roll?

Time Remaining

${initialTimeLeft} seconds

+
`; @@ -263,7 +225,7 @@ export async function showCuttingWordsDialog(tokenUuids, actorUuid, tokenUuid, d dialogContent = `
-

Would you like to use your reaction to use Cutting Words for this ${outcomeType} roll?

+

Would you like to use your reaction to use ${itemProperName} for this ${outcomeType} roll?

@@ -279,6 +241,7 @@ export async function showCuttingWordsDialog(tokenUuids, actorUuid, tokenUuid, d

Time remaining

${initialTimeLeft} seconds

+