generated from typhonjs-fvtt-demo/template-svelte-esm
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
144 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MANIFEST-000552 | ||
MANIFEST-000565 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
2023/11/01-16:20:29.175765 ffff6ffff160 Recovering log #551 | ||
2023/11/01-16:20:29.183931 ffff6ffff160 Delete type=0 #551 | ||
2023/11/01-16:20:29.183962 ffff6ffff160 Delete type=3 #550 | ||
2023/11/01-16:21:29.225133 ffff6f791160 Level-0 table #555: started | ||
2023/11/01-16:21:29.228069 ffff6f791160 Level-0 table #555: 1201 bytes OK | ||
2023/11/01-16:21:29.231250 ffff6f791160 Delete type=0 #553 | ||
2023/11/01-16:21:29.234021 ffff6f791160 Manual compaction at level-0 from '!macros!BkJGkiXhrmghklQ4' @ 72057594037927935 : 1 .. '!macros!mnKNj84r6ZmGZyX3' @ 0 : 0; will stop at '!macros!BkJGkiXhrmghklQ4' @ 20 : 1 | ||
2023/11/01-16:21:29.234035 ffff6f791160 Compacting 1@0 + 1@1 files | ||
2023/11/01-16:21:29.237042 ffff6f791160 Generated table #556@0: 4 keys, 1826 bytes | ||
2023/11/01-16:21:29.237065 ffff6f791160 Compacted 1@0 + 1@1 files => 1826 bytes | ||
2023/11/01-16:21:29.239804 ffff6f791160 compacted to: files[ 0 1 0 0 0 0 0 ] | ||
2023/11/01-16:21:29.239923 ffff6f791160 Delete type=2 #525 | ||
2023/11/01-16:21:29.239987 ffff6f791160 Delete type=2 #555 | ||
2023/11/01-16:21:29.243120 ffff6f791160 Manual compaction at level-0 from '!macros!BkJGkiXhrmghklQ4' @ 20 : 1 .. '!macros!mnKNj84r6ZmGZyX3' @ 0 : 0; will stop at (end) | ||
2023/11/01-20:02:52.724974 ffff7dd17160 Recovering log #563 | ||
2023/11/01-20:02:52.733002 ffff7dd17160 Delete type=3 #561 | ||
2023/11/01-20:02:52.733031 ffff7dd17160 Delete type=0 #563 | ||
2023/11/01-20:17:12.926270 ffff6f791160 Level-0 table #568: started | ||
2023/11/01-20:17:12.926315 ffff6f791160 Level-0 table #568: 0 bytes OK | ||
2023/11/01-20:17:12.929574 ffff6f791160 Delete type=0 #566 | ||
2023/11/01-20:17:12.929669 ffff6f791160 Manual compaction at level-0 from '!macros!BkJGkiXhrmghklQ4' @ 72057594037927935 : 1 .. '!macros!mnKNj84r6ZmGZyX3' @ 0 : 0; will stop at (end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
2023/11/01-16:07:16.624125 ffff6ffff160 Recovering log #548 | ||
2023/11/01-16:07:16.631301 ffff6ffff160 Delete type=0 #548 | ||
2023/11/01-16:07:16.631340 ffff6ffff160 Delete type=3 #546 | ||
2023/11/01-19:51:48.086537 ffff6ffff160 Recovering log #559 | ||
2023/11/01-19:51:48.095614 ffff6ffff160 Delete type=0 #559 | ||
2023/11/01-19:51:48.095642 ffff6ffff160 Delete type=3 #557 | ||
2023/11/01-20:02:45.672737 ffff6f791160 Level-0 table #564: started | ||
2023/11/01-20:02:45.672793 ffff6f791160 Level-0 table #564: 0 bytes OK | ||
2023/11/01-20:02:45.676101 ffff6f791160 Delete type=0 #562 | ||
2023/11/01-20:02:45.676226 ffff6f791160 Manual compaction at level-0 from '!macros!BkJGkiXhrmghklQ4' @ 72057594037927935 : 1 .. '!macros!mnKNj84r6ZmGZyX3' @ 0 : 0; will stop at (end) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { moduleID, debug } from '../../utils'; | ||
/** | ||
* Creates new actors. | ||
* | ||
* @param {object} defaultToken The default token to use for the blank actors. | ||
* | ||
* @returns {Promise<boolean>} Returns true once the actors are created. | ||
*/ | ||
export default async function createBlanks(defaultToken) { | ||
let npcFolder = game.folders.get(game.settings.get(moduleID, 'hiddenFolder')); | ||
|
||
if (!npcFolder) { | ||
npcFolder = await Folder.create({ name: 'Foundry Summons Blank Actors', type: 'Actor', parent: null }); | ||
game.settings.set(moduleID, 'hiddenFolder', npcFolder.id); | ||
} | ||
|
||
let blankNPCs = game.settings.get(moduleID, 'blankNPC'); | ||
|
||
debug('Available Blank NPCs', blankNPCs); | ||
|
||
if (blankNPCs.length > 2) { | ||
npcFolder.content.forEach(async (actor) => { | ||
await actor.delete(); | ||
}); | ||
game.settings.set(moduleID, 'blankNPC', []); | ||
blankNPCs = []; | ||
} | ||
|
||
if (!blankNPCs.find((blank) => game.actors.get(blank.id)?.type === 'character')) { | ||
Actor.create({ | ||
name: `Blank Character`, | ||
type: 'character', | ||
img: `icons/svg/cowled.svg`, | ||
prototypeToken: { | ||
width: 1, | ||
height: 1, | ||
...defaultToken, | ||
}, | ||
folder: npcFolder.id, | ||
}).then((actor) => { | ||
blankNPCs.push({ id: actor.id }); | ||
game.settings.set(moduleID, 'blankNPC', blankNPCs); | ||
}); | ||
} | ||
|
||
if (!blankNPCs.find((blank) => game.actors.get(blank.id)?.type === 'ephemeral')) { | ||
Actor.create({ | ||
name: `Blank Ephemeral`, | ||
type: 'ephemeral', | ||
img: `icons/svg/cowled.svg`, | ||
prototypeToken: { | ||
width: 1, | ||
height: 1, | ||
...defaultToken, | ||
}, | ||
folder: npcFolder.id, | ||
}).then((actor) => { | ||
blankNPCs.push({ id: actor.id }); | ||
game.settings.set(moduleID, 'blankNPC', blankNPCs); | ||
}); | ||
} | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters