diff --git a/module.json b/module.json index 62d33b7..b318571 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "id": "swade-mb-helpers", "title": "SWADE Helpers (MB)", "description": "Mike's collection of swade helpers", - "version": "1.2.0", + "version": "1.2.1", "authors": [ { "name": "Mike" @@ -27,17 +27,6 @@ "ASSISTANT": "OWNER" } }, - { - "name": "effect-macros", - "label": "SWADE MB Effect Macros", - "path": "packs/effect-macros", - "type": "Macro", - "system": "swade", - "ownership": { - "PLAYER": "OBSERVER", - "ASSISTANT": "OWNER" - } - }, { "name": "helper-macros", "label": "SWADE MB Helper Macros", @@ -59,6 +48,17 @@ "PLAYER": "OBSERVER", "ASSISTANT": "OWNER" } + }, + { + "name": "helper-actors", + "label": "SWADE MB Helper Actors", + "path": "packs/helper-actors", + "type": "Actor", + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + }, + "system": "swade" } ], "packFolders": [ @@ -68,10 +68,10 @@ "color": "#008080", "folders": [], "packs": [ - "module-docs", - "effect-macros", - "helper-macros", - "Common Actions" + "module-docs", + "helper-macros", + "helper-actors", + "Common Actions" ] } ], @@ -104,7 +104,8 @@ }, { "id": "torch", - "type": "module" + "type": "module", + "compatibility": {} } ] }, diff --git a/packs/common-actions/000060.ldb b/packs/common-actions/000060.ldb deleted file mode 100644 index 00b2b7f..0000000 Binary files a/packs/common-actions/000060.ldb and /dev/null differ diff --git a/packs/common-actions/000137.ldb b/packs/common-actions/000137.ldb new file mode 100644 index 0000000..fd4a57b Binary files /dev/null and b/packs/common-actions/000137.ldb differ diff --git a/packs/common-actions/CURRENT b/packs/common-actions/CURRENT index 1fb45e8..448b6f3 100644 --- a/packs/common-actions/CURRENT +++ b/packs/common-actions/CURRENT @@ -1 +1 @@ -MANIFEST-000103 +MANIFEST-000138 diff --git a/packs/common-actions/LOG b/packs/common-actions/LOG index 09dcc00..6c64bd7 100644 --- a/packs/common-actions/LOG +++ b/packs/common-actions/LOG @@ -1,8 +1,8 @@ -2023/09/10-23:06:22.613628 7febd9214700 Recovering log #102 -2023/09/10-23:06:22.626850 7febd9214700 Delete type=0 #102 -2023/09/10-23:06:22.626874 7febd9214700 Delete type=3 #101 -2023/09/10-23:07:07.251557 7febcb05d700 Level-0 table #106: started -2023/09/10-23:07:07.251576 7febcb05d700 Level-0 table #106: 0 bytes OK -2023/09/10-23:07:07.254523 7febcb05d700 Delete type=0 #104 -2023/09/10-23:07:07.257493 7febcb05d700 Manual compaction at level-0 from '!items!2jAOeH9QKQqjugAt' @ 72057594037927935 : 1 .. '!items!nQHHXfEN7Ey2iWIM' @ 0 : 0; will stop at (end) -2023/09/10-23:07:07.257579 7febcb05d700 Manual compaction at level-1 from '!items!2jAOeH9QKQqjugAt' @ 72057594037927935 : 1 .. '!items!nQHHXfEN7Ey2iWIM' @ 0 : 0; will stop at (end) +2023/09/25-22:33:46.979390 7fe7b968d700 Recovering log #135 +2023/09/25-22:33:46.999374 7fe7b968d700 Delete type=3 #133 +2023/09/25-22:33:46.999397 7fe7b968d700 Delete type=0 #135 +2023/09/25-22:34:49.573980 7fe51bfff700 Level-0 table #141: started +2023/09/25-22:34:49.573997 7fe51bfff700 Level-0 table #141: 0 bytes OK +2023/09/25-22:34:49.583422 7fe51bfff700 Delete type=0 #139 +2023/09/25-22:34:49.602253 7fe51bfff700 Manual compaction at level-0 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items!xA7qKMmugJv7z6j1' @ 0 : 0; will stop at (end) +2023/09/25-22:34:49.611494 7fe51bfff700 Manual compaction at level-1 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items!xA7qKMmugJv7z6j1' @ 0 : 0; will stop at (end) diff --git a/packs/common-actions/LOG.old b/packs/common-actions/LOG.old index d0b838c..f1f09f1 100644 --- a/packs/common-actions/LOG.old +++ b/packs/common-actions/LOG.old @@ -1,3 +1,15 @@ -2023/09/10-23:05:53.772370 7f36d57fa700 Recovering log #99 -2023/09/10-23:05:53.784345 7f36d57fa700 Delete type=0 #99 -2023/09/10-23:05:53.784375 7f36d57fa700 Delete type=3 #97 +2023/09/24-17:51:32.119358 7fe7b9e8e700 Recovering log #132 +2023/09/24-17:51:32.127144 7fe7b9e8e700 Delete type=3 #131 +2023/09/24-17:51:32.127174 7fe7b9e8e700 Delete type=0 #132 +2023/09/25-22:27:28.458282 7fe51bfff700 Level-0 table #136: started +2023/09/25-22:27:28.461383 7fe51bfff700 Level-0 table #136: 5360 bytes OK +2023/09/25-22:27:28.464487 7fe51bfff700 Delete type=0 #134 +2023/09/25-22:27:28.468877 7fe51bfff700 Manual compaction at level-0 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items!xA7qKMmugJv7z6j1' @ 0 : 0; will stop at (end) +2023/09/25-22:27:28.468974 7fe51bfff700 Manual compaction at level-1 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items!xA7qKMmugJv7z6j1' @ 0 : 0; will stop at '!items!vdYpJXIMdqUi7IDh' @ 170 : 1 +2023/09/25-22:27:28.468980 7fe51bfff700 Compacting 1@1 + 1@2 files +2023/09/25-22:27:28.471549 7fe51bfff700 Generated table #137@1: 17 keys, 8737 bytes +2023/09/25-22:27:28.471557 7fe51bfff700 Compacted 1@1 + 1@2 files => 8737 bytes +2023/09/25-22:27:28.474310 7fe51bfff700 compacted to: files[ 0 0 1 0 0 0 0 ] +2023/09/25-22:27:28.474351 7fe51bfff700 Delete type=2 #136 +2023/09/25-22:27:28.474385 7fe51bfff700 Delete type=2 #130 +2023/09/25-22:27:28.482548 7fe51bfff700 Manual compaction at level-1 from '!items!vdYpJXIMdqUi7IDh' @ 170 : 1 .. '!items!xA7qKMmugJv7z6j1' @ 0 : 0; will stop at (end) diff --git a/packs/common-actions/MANIFEST-000103 b/packs/common-actions/MANIFEST-000103 deleted file mode 100644 index 8931630..0000000 Binary files a/packs/common-actions/MANIFEST-000103 and /dev/null differ diff --git a/packs/common-actions/MANIFEST-000138 b/packs/common-actions/MANIFEST-000138 new file mode 100644 index 0000000..17c47ee Binary files /dev/null and b/packs/common-actions/MANIFEST-000138 differ diff --git a/packs/effect-macros/000097.ldb b/packs/effect-macros/000097.ldb deleted file mode 100644 index b3e18a1..0000000 Binary files a/packs/effect-macros/000097.ldb and /dev/null differ diff --git a/packs/effect-macros/CURRENT b/packs/effect-macros/CURRENT deleted file mode 100644 index c8e9be6..0000000 --- a/packs/effect-macros/CURRENT +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000104 diff --git a/packs/effect-macros/LOG b/packs/effect-macros/LOG deleted file mode 100644 index 6857cd5..0000000 --- a/packs/effect-macros/LOG +++ /dev/null @@ -1,8 +0,0 @@ -2023/09/10-23:06:22.599116 7febd9214700 Recovering log #103 -2023/09/10-23:06:22.611701 7febd9214700 Delete type=0 #103 -2023/09/10-23:06:22.611728 7febd9214700 Delete type=3 #102 -2023/09/10-23:07:07.248454 7febcb05d700 Level-0 table #107: started -2023/09/10-23:07:07.248477 7febcb05d700 Level-0 table #107: 0 bytes OK -2023/09/10-23:07:07.251508 7febcb05d700 Delete type=0 #105 -2023/09/10-23:07:07.257465 7febcb05d700 Manual compaction at level-0 from '!folders!xeSN3oIIO3p9MUtF' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) -2023/09/10-23:07:07.257570 7febcb05d700 Manual compaction at level-1 from '!folders!xeSN3oIIO3p9MUtF' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) diff --git a/packs/effect-macros/LOG.old b/packs/effect-macros/LOG.old deleted file mode 100644 index f4433ae..0000000 --- a/packs/effect-macros/LOG.old +++ /dev/null @@ -1,3 +0,0 @@ -2023/09/10-23:05:53.762234 7f36d67fc700 Recovering log #100 -2023/09/10-23:05:53.770717 7f36d67fc700 Delete type=0 #100 -2023/09/10-23:05:53.770733 7f36d67fc700 Delete type=3 #98 diff --git a/packs/effect-macros/MANIFEST-000104 b/packs/effect-macros/MANIFEST-000104 deleted file mode 100644 index 4bb6522..0000000 Binary files a/packs/effect-macros/MANIFEST-000104 and /dev/null differ diff --git a/packs/helper-actors/000005.ldb b/packs/helper-actors/000005.ldb new file mode 100644 index 0000000..3fcf79e Binary files /dev/null and b/packs/helper-actors/000005.ldb differ diff --git a/packs/helper-actors/CURRENT b/packs/helper-actors/CURRENT new file mode 100644 index 0000000..e2c0c4b --- /dev/null +++ b/packs/helper-actors/CURRENT @@ -0,0 +1 @@ +MANIFEST-000040 diff --git a/packs/effect-macros/LOCK b/packs/helper-actors/LOCK similarity index 100% rename from packs/effect-macros/LOCK rename to packs/helper-actors/LOCK diff --git a/packs/helper-actors/LOG b/packs/helper-actors/LOG new file mode 100644 index 0000000..d88e867 --- /dev/null +++ b/packs/helper-actors/LOG @@ -0,0 +1,8 @@ +2023/09/25-22:33:47.001326 7fe7b9e8e700 Recovering log #38 +2023/09/25-22:33:47.021271 7fe7b9e8e700 Delete type=0 #38 +2023/09/25-22:33:47.021294 7fe7b9e8e700 Delete type=3 #36 +2023/09/25-22:34:49.621185 7fe51bfff700 Level-0 table #43: started +2023/09/25-22:34:49.621202 7fe51bfff700 Level-0 table #43: 0 bytes OK +2023/09/25-22:34:49.630680 7fe51bfff700 Delete type=0 #41 +2023/09/25-22:34:49.650161 7fe51bfff700 Manual compaction at level-0 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end) +2023/09/25-22:34:49.659391 7fe51bfff700 Manual compaction at level-1 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end) diff --git a/packs/helper-actors/LOG.old b/packs/helper-actors/LOG.old new file mode 100644 index 0000000..3ca7f7b --- /dev/null +++ b/packs/helper-actors/LOG.old @@ -0,0 +1,8 @@ +2023/09/24-17:51:32.129349 7fe7ba68f700 Recovering log #35 +2023/09/24-17:51:32.137024 7fe7ba68f700 Delete type=0 #35 +2023/09/24-17:51:32.137042 7fe7ba68f700 Delete type=3 #34 +2023/09/25-22:27:28.464580 7fe51bfff700 Level-0 table #39: started +2023/09/25-22:27:28.464601 7fe51bfff700 Level-0 table #39: 0 bytes OK +2023/09/25-22:27:28.468758 7fe51bfff700 Delete type=0 #37 +2023/09/25-22:27:28.468891 7fe51bfff700 Manual compaction at level-0 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end) +2023/09/25-22:27:28.482519 7fe51bfff700 Manual compaction at level-1 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end) diff --git a/packs/helper-actors/MANIFEST-000040 b/packs/helper-actors/MANIFEST-000040 new file mode 100644 index 0000000..264546d Binary files /dev/null and b/packs/helper-actors/MANIFEST-000040 differ diff --git a/packs/helper-macros/000005.ldb b/packs/helper-macros/000005.ldb deleted file mode 100644 index f0a41fb..0000000 Binary files a/packs/helper-macros/000005.ldb and /dev/null differ diff --git a/packs/helper-macros/000059.ldb b/packs/helper-macros/000059.ldb deleted file mode 100644 index a83eb6b..0000000 Binary files a/packs/helper-macros/000059.ldb and /dev/null differ diff --git a/packs/helper-macros/000167.ldb b/packs/helper-macros/000167.ldb new file mode 100644 index 0000000..4a2e2dd Binary files /dev/null and b/packs/helper-macros/000167.ldb differ diff --git a/packs/helper-macros/CURRENT b/packs/helper-macros/CURRENT index e333c89..57112f5 100644 --- a/packs/helper-macros/CURRENT +++ b/packs/helper-macros/CURRENT @@ -1 +1 @@ -MANIFEST-000102 +MANIFEST-000168 diff --git a/packs/helper-macros/LOG b/packs/helper-macros/LOG index 469f180..2908180 100644 --- a/packs/helper-macros/LOG +++ b/packs/helper-macros/LOG @@ -1,8 +1,8 @@ -2023/09/10-23:06:22.600245 7febcbfff700 Recovering log #101 -2023/09/10-23:06:22.613671 7febcbfff700 Delete type=3 #100 -2023/09/10-23:06:22.613760 7febcbfff700 Delete type=0 #101 -2023/09/10-23:07:07.244680 7febcb05d700 Level-0 table #105: started -2023/09/10-23:07:07.244692 7febcb05d700 Level-0 table #105: 0 bytes OK -2023/09/10-23:07:07.248349 7febcb05d700 Delete type=0 #103 -2023/09/10-23:07:07.254566 7febcb05d700 Manual compaction at level-0 from '!macros!AjuA11hQ48UJNwlH' @ 72057594037927935 : 1 .. '!macros!QMnx9cuyw81kRS2o' @ 0 : 0; will stop at (end) -2023/09/10-23:07:07.257519 7febcb05d700 Manual compaction at level-1 from '!macros!AjuA11hQ48UJNwlH' @ 72057594037927935 : 1 .. '!macros!QMnx9cuyw81kRS2o' @ 0 : 0; will stop at (end) +2023/09/25-22:33:46.957940 7fe7b9e8e700 Recovering log #165 +2023/09/25-22:33:46.977376 7fe7b9e8e700 Delete type=0 #165 +2023/09/25-22:33:46.977395 7fe7b9e8e700 Delete type=3 #163 +2023/09/25-22:34:49.583492 7fe51bfff700 Level-0 table #171: started +2023/09/25-22:34:49.583508 7fe51bfff700 Level-0 table #171: 0 bytes OK +2023/09/25-22:34:49.592987 7fe51bfff700 Delete type=0 #169 +2023/09/25-22:34:49.611444 7fe51bfff700 Manual compaction at level-0 from '!folders!hIbrWxg1nDutCSwt' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) +2023/09/25-22:34:49.611542 7fe51bfff700 Manual compaction at level-1 from '!folders!hIbrWxg1nDutCSwt' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) diff --git a/packs/helper-macros/LOG.old b/packs/helper-macros/LOG.old index d776ad9..6713735 100644 --- a/packs/helper-macros/LOG.old +++ b/packs/helper-macros/LOG.old @@ -1,3 +1,15 @@ -2023/09/10-23:05:53.762243 7f36d57fa700 Recovering log #98 -2023/09/10-23:05:53.770714 7f36d57fa700 Delete type=3 #96 -2023/09/10-23:05:53.770736 7f36d57fa700 Delete type=0 #98 +2023/09/24-17:51:32.110592 7fe7ba68f700 Recovering log #162 +2023/09/24-17:51:32.118170 7fe7ba68f700 Delete type=3 #161 +2023/09/24-17:51:32.118190 7fe7ba68f700 Delete type=0 #162 +2023/09/25-22:27:28.431163 7fe51bfff700 Level-0 table #166: started +2023/09/25-22:27:28.433469 7fe51bfff700 Level-0 table #166: 724 bytes OK +2023/09/25-22:27:28.436317 7fe51bfff700 Delete type=0 #164 +2023/09/25-22:27:28.445034 7fe51bfff700 Manual compaction at level-0 from '!folders!hIbrWxg1nDutCSwt' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) +2023/09/25-22:27:28.445112 7fe51bfff700 Manual compaction at level-1 from '!folders!hIbrWxg1nDutCSwt' @ 72057594037927935 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at '!macros!8gxeYSUJ1FQhmJRw' @ 37 : 1 +2023/09/25-22:27:28.445116 7fe51bfff700 Compacting 1@1 + 1@2 files +2023/09/25-22:27:28.449145 7fe51bfff700 Generated table #167@1: 19 keys, 4653 bytes +2023/09/25-22:27:28.449155 7fe51bfff700 Compacted 1@1 + 1@2 files => 4653 bytes +2023/09/25-22:27:28.452097 7fe51bfff700 compacted to: files[ 0 0 1 0 0 0 0 ] +2023/09/25-22:27:28.452136 7fe51bfff700 Delete type=2 #128 +2023/09/25-22:27:28.452197 7fe51bfff700 Delete type=2 #166 +2023/09/25-22:27:28.468818 7fe51bfff700 Manual compaction at level-1 from '!macros!8gxeYSUJ1FQhmJRw' @ 37 : 1 .. '!macros!wU2mAUnw3RW9qMT8' @ 0 : 0; will stop at (end) diff --git a/packs/helper-macros/MANIFEST-000102 b/packs/helper-macros/MANIFEST-000102 deleted file mode 100644 index d2e4235..0000000 Binary files a/packs/helper-macros/MANIFEST-000102 and /dev/null differ diff --git a/packs/helper-macros/MANIFEST-000168 b/packs/helper-macros/MANIFEST-000168 new file mode 100644 index 0000000..0bcc0e5 Binary files /dev/null and b/packs/helper-macros/MANIFEST-000168 differ diff --git a/packs/module-docs/000096.ldb b/packs/module-docs/000096.ldb deleted file mode 100644 index a2988a7..0000000 Binary files a/packs/module-docs/000096.ldb and /dev/null differ diff --git a/packs/module-docs/000167.ldb b/packs/module-docs/000167.ldb new file mode 100644 index 0000000..96da6ce Binary files /dev/null and b/packs/module-docs/000167.ldb differ diff --git a/packs/module-docs/CURRENT b/packs/module-docs/CURRENT index 1fb45e8..57112f5 100644 --- a/packs/module-docs/CURRENT +++ b/packs/module-docs/CURRENT @@ -1 +1 @@ -MANIFEST-000103 +MANIFEST-000168 diff --git a/packs/module-docs/LOG b/packs/module-docs/LOG index 3e056d6..458d29a 100644 --- a/packs/module-docs/LOG +++ b/packs/module-docs/LOG @@ -1,8 +1,8 @@ -2023/09/10-23:06:22.585546 7febd9214700 Recovering log #102 -2023/09/10-23:06:22.598553 7febd9214700 Delete type=0 #102 -2023/09/10-23:06:22.598574 7febd9214700 Delete type=3 #101 -2023/09/10-23:07:07.241420 7febcb05d700 Level-0 table #106: started -2023/09/10-23:07:07.241437 7febcb05d700 Level-0 table #106: 0 bytes OK -2023/09/10-23:07:07.244507 7febcb05d700 Delete type=0 #104 -2023/09/10-23:07:07.244613 7febcb05d700 Manual compaction at level-0 from '!journal!Mw1g2Fx5dp4SoqVP' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.i31qmsZnIGhjvA2K' @ 0 : 0; will stop at (end) -2023/09/10-23:07:07.248425 7febcb05d700 Manual compaction at level-1 from '!journal!Mw1g2Fx5dp4SoqVP' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.i31qmsZnIGhjvA2K' @ 0 : 0; will stop at (end) +2023/09/25-22:33:46.936754 7fe7b968d700 Recovering log #165 +2023/09/25-22:33:46.956358 7fe7b968d700 Delete type=0 #165 +2023/09/25-22:33:46.956379 7fe7b968d700 Delete type=3 #163 +2023/09/25-22:34:49.564751 7fe51bfff700 Level-0 table #171: started +2023/09/25-22:34:49.564770 7fe51bfff700 Level-0 table #171: 0 bytes OK +2023/09/25-22:34:49.573732 7fe51bfff700 Delete type=0 #169 +2023/09/25-22:34:49.573869 7fe51bfff700 Manual compaction at level-0 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 0 : 0; will stop at (end) +2023/09/25-22:34:49.583466 7fe51bfff700 Manual compaction at level-1 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 0 : 0; will stop at (end) diff --git a/packs/module-docs/LOG.old b/packs/module-docs/LOG.old index c271a8e..03aff9c 100644 --- a/packs/module-docs/LOG.old +++ b/packs/module-docs/LOG.old @@ -1,3 +1,15 @@ -2023/09/10-23:05:53.751263 7f36d57fa700 Recovering log #99 -2023/09/10-23:05:53.759524 7f36d57fa700 Delete type=0 #99 -2023/09/10-23:05:53.759553 7f36d57fa700 Delete type=3 #97 +2023/09/24-17:51:32.100602 7fe7b9e8e700 Recovering log #162 +2023/09/24-17:51:32.108259 7fe7b9e8e700 Delete type=3 #161 +2023/09/24-17:51:32.108296 7fe7b9e8e700 Delete type=0 #162 +2023/09/25-22:27:28.439755 7fe51bfff700 Level-0 table #166: started +2023/09/25-22:27:28.442121 7fe51bfff700 Level-0 table #166: 10961 bytes OK +2023/09/25-22:27:28.444862 7fe51bfff700 Delete type=0 #164 +2023/09/25-22:27:28.445099 7fe51bfff700 Manual compaction at level-0 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 0 : 0; will stop at (end) +2023/09/25-22:27:28.452245 7fe51bfff700 Manual compaction at level-1 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 0 : 0; will stop at '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 63 : 1 +2023/09/25-22:27:28.452253 7fe51bfff700 Compacting 1@1 + 1@2 files +2023/09/25-22:27:28.455468 7fe51bfff700 Generated table #167@1: 7 keys, 4142 bytes +2023/09/25-22:27:28.455475 7fe51bfff700 Compacted 1@1 + 1@2 files => 4142 bytes +2023/09/25-22:27:28.458177 7fe51bfff700 compacted to: files[ 0 0 1 0 0 0 0 ] +2023/09/25-22:27:28.458213 7fe51bfff700 Delete type=2 #166 +2023/09/25-22:27:28.458245 7fe51bfff700 Delete type=2 #96 +2023/09/25-22:27:28.468848 7fe51bfff700 Manual compaction at level-1 from '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 63 : 1 .. '!journal.pages!Mw1g2Fx5dp4SoqVP.lhULHNp4gz9IjOR3' @ 0 : 0; will stop at (end) diff --git a/packs/module-docs/MANIFEST-000103 b/packs/module-docs/MANIFEST-000103 deleted file mode 100644 index 53d9c33..0000000 Binary files a/packs/module-docs/MANIFEST-000103 and /dev/null differ diff --git a/packs/module-docs/MANIFEST-000168 b/packs/module-docs/MANIFEST-000168 new file mode 100644 index 0000000..71d20da Binary files /dev/null and b/packs/module-docs/MANIFEST-000168 differ diff --git a/scripts/module.js b/scripts/module.js index 71ec9e8..70760fe 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -1,4 +1,5 @@ import { api } from './api.js' +import { shapeChangeOnDismiss } from './powerEffects.js' import { log } from './shim.js' function _checkModule (name) { @@ -15,4 +16,5 @@ Hooks.on('setup', api.registerFunctions) Hooks.on('ready', () => { _checkModule('warpgate') log('Initialized SWADE MB Helpers') + warpgate.event.watch(warpgate.EVENT.DISMISS, shapeChangeOnDismiss) }) diff --git a/scripts/powerEffects.js b/scripts/powerEffects.js index 4839d2d..4a324d1 100644 --- a/scripts/powerEffects.js +++ b/scripts/powerEffects.js @@ -141,6 +141,63 @@ class TargetedPowerEffect extends PowerEffect { } } +class LingeringDamagePowerEffect extends TargetedPowerEffect { + get baseDurationRounds () { + return 1 + } + + async prepMenu () { + this.menuData.inputs.splice(this.menuData.inputs.length - 1, 0, { + type: 'checkbox', label: 'Lingering Damage (+2)' + }) + } + + globalModifierEffects () { + super.globalModifierEffects() + this.inputIndex += 1 + if (this.inputs[7]) { // lingering damage + const doc = shim.createEffectDocument( + 'icons/magic/death/skull-poison-green.webp', + `Lingering Damage (${this.name})`, + 1 + ) + doc.flags.swade.expiration = CONST.SWADE.STATUS_EFFECT_EXPIRATION.StartOfTurnPrompt + this.effectDocs.push(doc) + } + } +} + +class ArcaneProtectionEffect extends TargetedPowerEffect { + get name () { + return 'Arcane Protection' + } + + get baseDurationRounds () { + return 5 + } + + async prepMenu () { + this.menuData.inputs.push( + { type: 'checkbox', label: 'Greater', options: false }) + } + + async prepResult () { + const greater = !!this.inputs[this.inputIndex] + const raise = this.buttons === 'raise' + const amount = (raise ? -4 : -2) + (greater ? -2 : 0) + const icon = 'icons/magic/defensive/shield-barrier-flaming-pentagon-blue.webp' + const name = `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})` + this.effectDocs.push( + shim.createEffectDocument(icon, name, this.durationRounds, [])) + } +} + +class BlastEffect extends LingeringDamagePowerEffect { + get name () { + return 'Blast' + } +} + class BlindEffect extends TargetedPowerEffect { async prepMenu (token, targets) { this.menuData.inputs.push({ @@ -184,6 +241,12 @@ class BlindEffect extends TargetedPowerEffect { } } +class BoltEffect extends LingeringDamagePowerEffect { + get name () { + return 'Bolt' + } +} + class BoostLowerTraitEffect extends TargetedPowerEffect { get name () { return 'Boost/Lower Trait' @@ -279,6 +342,12 @@ class BoostLowerTraitEffect extends TargetedPowerEffect { } } +class BurstEffect extends LingeringDamagePowerEffect { + get name () { + return 'Burst' + } +} + class ConfusionEffect extends TargetedPowerEffect { get name () { return 'Confusion' @@ -472,6 +541,205 @@ class ProtectionEffect extends TargetedPowerEffect { } } +class ShapeChangeEffect extends TargetedPowerEffect { + get actorFolderBase () { + return 'Morphables' + } + + get tempActorFolder () { + return `${this.actorFolderBase}/Changed` + } + + get actorFolder () { + return `${this.actorFolderBase}/${this.name}` + } + + get name () { + return 'Shape Change' + } + + get baseDurationRounds () { + if (this.increasedDuration ?? false) { + return 50 + } + return 5 + } + + async prepFolders () { + const folders = [] + const folderNames = [ + this.actorFolder, + `${this.actorFolder} - Default`, + `${this.actorFolder}/Default`, + `${this.actorFolder} - ${this.token.name}`, + `${this.actorFolder} - ${this.token.actor.name}`, + `${this.actorFolder}/${this.token.name}`, + `${this.actorFolder}/${this.token.actor.name}` + ] + for (const folderName of folderNames) { + const folder = shim.getActorFolderByPath(folderName) + if (folder) { + log(`Found actor folder ${folderName}`) + folders.push(folder) + } + } + if (folders.length > 1) { + folders.shift() + } + return folders + } + + async prepActors () { + const folders = await this.prepFolders() + const actors = {} + for (const folder of folders) { + const folderActors = shim.getActorsInFolder(folder) + for (const key in folderActors) { + actors[key] = folderActors[key] + } + } + return actors + } + + async prepMenu () { + const actors = await this.prepActors() + this.cancel = false + if (Object.keys(actors).length < 1) { + shim.notifications.error('No summonables found') + this.cancel = true + } + + function actorData (key) { + return { + value: actors[key].id, + html: key + } + } + + this.summonableActors = actors + + this.menuData.inputs = this.menuData.inputs.concat([ + { + type: 'select', + label: 'Turn into creature', + options: Object.keys(actors).filter( + k => !k.includes('_template')).sort().map(actorData) + }, { + type: 'checkbox', + label: 'Duration (+1, rounds to minutes)', + options: false + } + ]) + } + + async prepResult () { + this.raise = (this.buttons === 'raise') + this.actorId = (this.inputs[this.inputIndex]) + this.increasedDuration = (!!this.inputs[this.inputIndex + 1]) + this.actor = shim.actors.get(this.actorId) + this.icon = this.targets[0].document.texture.src + const targetActor = this.targets[0].actor + this.protoDoc = await this.actor.getTokenDocument() + this.spawnOptions = { + controllingActor: this.targets[0].actor, + duplicates: 1, + updateOpts: { + embedded: { + Item: { + renderSheet: null + } + } + }, + crosshairs: { + rememberControlled: true + } + } + const effectChanges = [] + if (this.raise) { + for (const stat of ['vigor', 'strength']) { + effectChanges.push({ + key: `system.attributes.${stat}.die.sides`, + mode: CONST.FOUNDRY.ACTIVE_EFFECT_MODES.ADD, + value: '+2', + priority: 0 + }) + } + } + this.effectDocs.push( + shim.createEffectDocument( + this.icon, + `Shape Change into ${this.protoDoc.name}`, + this.durationRounds, effectChanges) + ) + + this.spawnMutation = { + actor: { + name: `${this.targets[0].actor.name} (${this.actor.name} form)`, + system: { + attributes: { + smarts: { die: targetActor.system.attributes.smarts.die }, + spirit: { die: targetActor.system.attributes.spirit.die } + }, + wildcard: targetActor.system.wildcard + } + }, + token: { + flags: { + 'swade-mb-helpers.shapeChange.srcTokenId': this.targets[0].id + }, + actorLink: false, + name: `${this.targets[0].name} (${this.protoDoc.name} form) `, + elevation: this.targets[0].document.elevation, + disposition: this.targets[0].document.disposition + }, + embedded: { ActiveEffect: {}, Item: {} } + } + for (const doc of this.effectDocs) { + this.spawnMutation.embedded.ActiveEffect[doc.name] = doc + } + for (const doc of this.targets[0].actor.effects) { + this.spawnMutation.embedded.ActiveEffect[doc.name] = this.targets[0].actor.getEmbeddedDocument('ActiveEffect', doc.id) + } + for (const item of targetActor.items) { + if (item.type === 'skill' && ['smarts', 'spirit'].includes(item.system.attribute)) { + const doc = await this.targets[0].actor.getEmbeddedDocument('Item', item.id) + this.spawnMutation.embedded.Item[item.name] = doc + } + if (['power', 'edge', 'hindrance', 'action'].includes(item.type)) { + const doc = await this.targets[0].actor.getEmbeddedDocument('Item', item.id) + this.spawnMutation.embedded.Item[item.name] = doc + } + } + } + + async applyResult () { + log('protoDoc', this.protoDoc) + log('spawnOptions', this.spawnOptions) + log('spawnMutation', this.spawnMutation) + const newTokenId = (await shim.warpgateSpawnAt( + this.targets[0].center, + this.protoDoc, + this.spawnMutation, + {}, + this.spawnOptions + ))[0] + await this.targets[0].document.setFlag('swade-mb-helpers', 'shapeChange', { + toId: newTokenId, + saved: { + alpha: this.targets[0].document.alpha, + hidden: this.targets[0].document.hidden, + x: this.targets[0].document.x, + y: this.targets[0].document.y, + elevation: this.targets[0].document.elevation + } + }) + await this.targets[0].document.update({ + hidden: true, + alpha: 0.05 + }) + } +} + class SmiteEffect extends TargetedPowerEffect { get name () { return 'Smite' @@ -508,20 +776,15 @@ class SmiteEffect extends TargetedPowerEffect { const raise = (this.buttons === 'raise') const greater = !!this.inputs[this.inputIndex] const changeValue = (greater ? (raise ? '+6' : '+4') : (raise ? '+4' : '+2')) + const changeKey = 'system.stats.globalMods.damage' for (const token of this.targets) { const weaponName = this.inputs[this.tokenWeapons[token.id]] - const weaponId = token.actor.items.getName(weaponName)?.id - const changeKey = `@Weapon{${weaponName}}[system.actions.dmgMod]` - if (!weaponId) { - continue - } - const effectName = `${this.buttons === 'raise' ? 'major' : 'minor'} Smite${greater ? ' (greater)' : ''} (${weaponName})` + const effectName = `Smite (${weaponName})` const changes = [ { key: changeKey, mode, value: changeValue, priority: 0 } ] this.baseEffect.changes = changes this.baseEffect.name = effectName - console.log(token, weaponName, weaponId, effectName, changeKey) await shim.applyActiveEffects(token, [this.baseEffect].concat(this.effectDocs)) } } @@ -629,6 +892,13 @@ class SummonEffect extends PowerEffect { this.spawnOptions = { controllingActor: this.token.actor, duplicates: this.number, + updateOpts: { + embedded: { + Item: { + renderSheet: null + } + } + }, crosshairs: { icon: this.icon, label: `Summon ${this.actor.name}`, @@ -719,6 +989,9 @@ class SummonEffect extends PowerEffect { async applyResult () { await this.prepAdditional() + log('protoDoc', this.protoDoc) + log('spawnOptions', this.spawnOptions) + log('spawnMutation', this.spawnMutation) await shim.warpgateSpawn(this.protoDoc, this.spawnMutation, {}, this.spawnOptions) } } @@ -801,7 +1074,7 @@ class SummonAllyEffect extends SummonEffect { } const edge = template.items.getName(inputs[i]) if (edge) { - const doc = template.getEmbeddedDocument('Item', edge.id) + const doc = await template.getEmbeddedDocument('Item', edge.id) this.spawnMutation.embedded.Item[edge.name] = doc } } @@ -815,7 +1088,6 @@ class SummonAllyEffect extends SummonEffect { for (const item of template.items) { const doc = await template.getEmbeddedDocument('Item', item.id) this.spawnMutation.embedded.Item[item.name] = doc - log(`Added ${item.name} to spawn mutation`) } } @@ -827,12 +1099,10 @@ class SummonAllyEffect extends SummonEffect { for (const item of template.items) { const doc = await template.getEmbeddedDocument('Item', item.id) this.spawnMutation.embedded.Item[item.name] = doc - log(`Added ${item.name} to spawn mutation`) } for (const effect of template.effects.values()) { const doc = shim.ActiveEffect.fromSource(effect) this.spawnMutation.embedded.ActiveEffect[effect.name] = doc - log(`Added ${effect.name} to spawn mutation`) } } @@ -867,7 +1137,7 @@ class SummonAllyEffect extends SummonEffect { this.spawnOptions.crosshairs.icon = this.icon for (const mirrorItem of mirrorActor.items) { this.spawnMutation.embedded.Item[mirrorItem.name] = - mirrorActor.getEmbeddedDocument('Item', mirrorItem.id) + await mirrorActor.getEmbeddedDocument('Item', mirrorItem.id) } this.spawnMutation.embedded.Item['Summon Ally'] = CONST.WARPGATE.DELETE const effectChanges = [] @@ -916,9 +1186,13 @@ class SummonUndeadEffect extends SummonEffect { } const PowerClasses = { + 'arcane protection': ArcaneProtectionEffect, + blast: BlastEffect, blind: BlindEffect, + bolt: BoltEffect, 'boost/lower trait': BoostLowerTraitEffect, 'boost trait': BoostLowerTraitEffect, + burst: BurstEffect, confusion: ConfusionEffect, deflection: DeflectionEffect, entangle: EntangleEffect, @@ -926,13 +1200,15 @@ const PowerClasses = { invisibility: InvisibilityEffect, 'lower trait': BoostLowerTraitEffect, protection: ProtectionEffect, + 'shape change': ShapeChangeEffect, smite: SmiteEffect, 'summon ally': SummonAllyEffect, 'summon animal': SummonAnimalEffect, 'summon monster': SummonMonsterEffect, "summon nature's ally": SummonNaturesAllyEffect, 'summon planar ally': SummonPlanarAllyEffect, - 'summon undead': SummonUndeadEffect + 'summon undead': SummonUndeadEffect, + zombie: SummonUndeadEffect } export async function powerEffects (options = {}) { @@ -956,3 +1232,25 @@ export async function powerEffects (options = {}) { } shim.notifications.error(`No power effect found for ${name}`) } + +export async function shapeChangeOnDismiss (data) { + if (shim.user.id !== data.userId) { return } + const dismissedToken = data.actorData.prototypeToken + const flags = dismissedToken.flags['swade-mb-helpers']?.shapeChange + const srcTokenId = flags?.srcTokenId + if (!srcTokenId) { return } + const scene = shim.scenes.get(data.sceneId) + const token = scene.tokens.get(srcTokenId) + if (!token) { return } + const saved = token.flags['swade-mb-helpers']?.shapeChange?.saved + if (saved) { + const update = { + alpha: saved.alpha, + hidden: saved.hidden, + x: dismissedToken.x, + y: dismissedToken.y, + elevation: dismissedToken.elevation + } + await token.update(update) + } +} diff --git a/scripts/shim.js b/scripts/shim.js index b2d4adc..fef99b3 100644 --- a/scripts/shim.js +++ b/scripts/shim.js @@ -33,18 +33,22 @@ export class shim { return game.user.targets } - static get notifications () { - return ui.notifications - } - static get user () { return game.user } + static get notifications () { + return ui.notifications + } + static get actors () { return game.actors } + static get scenes () { + return game.scenes + } + static mergeObject (...args) { return mergeObject(...args) } @@ -90,7 +94,7 @@ export class shim { } const mutateOptions = { permanent: true, - description: effectDocuments[effectDocuments.length - 1] + description: effectDocuments[effectDocuments.length - 1]?.name } for (const effectDocument of effectDocuments) { mutation.embedded.ActiveEffect[effectDocument.name] = effectDocument @@ -106,6 +110,10 @@ export class shim { return warpgate.spawn(...args) } + static warpgateSpawnAt (...args) { + return warpgate.spawnAt(...args) + } + static getActorFolderByPath (path) { const names = path.split('/') if (names[0] === '') {