intelligent-system-design-language 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/langium-language-designer.md +38 -0
- package/.claude/agents/typescript-vscode-expert.md +29 -0
- package/.claude/agents/ui-ux-designer.md +36 -0
- package/.claude/settings.local.json +33 -0
- package/.idea/inspectionProfiles/Project_Default.xml +7 -0
- package/.idea/isdl.iml +14 -0
- package/.idea/modules.xml +9 -0
- package/.idea/vcs.xml +7 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.vscodeignore +18 -0
- package/LICENSE +674 -0
- package/README.md +86 -0
- package/bin/cli.js +4 -0
- package/bin/lsp.js +8 -0
- package/isdl.png +0 -0
- package/out/_backgrounds.scss +91 -0
- package/out/_handlebars.scss +505 -0
- package/out/_isdlStyles.scss +1357 -0
- package/out/_vuetifyOverrides.scss +425 -0
- package/out/_vuetifyStyles.scss +31957 -0
- package/out/cli/cli-util.js +39 -0
- package/out/cli/cli-util.js.map +1 -0
- package/out/cli/components/_backgrounds.scss +91 -0
- package/out/cli/components/_handlebars.scss +505 -0
- package/out/cli/components/_isdlStyles.scss +1357 -0
- package/out/cli/components/_vuetifyOverrides.scss +425 -0
- package/out/cli/components/_vuetifyStyles.scss +31957 -0
- package/out/cli/components/active-effect-sheet-generator.js +643 -0
- package/out/cli/components/active-effect-sheet-generator.js.map +1 -0
- package/out/cli/components/base-actor-sheet-generator.js +125 -0
- package/out/cli/components/base-actor-sheet-generator.js.map +1 -0
- package/out/cli/components/base-sheet-generator.js +525 -0
- package/out/cli/components/base-sheet-generator.js.map +1 -0
- package/out/cli/components/chat-card-generator.js +683 -0
- package/out/cli/components/chat-card-generator.js.map +1 -0
- package/out/cli/components/css-generator.js +58 -0
- package/out/cli/components/css-generator.js.map +1 -0
- package/out/cli/components/damage-roll-generator.js +173 -0
- package/out/cli/components/damage-roll-generator.js.map +1 -0
- package/out/cli/components/datamodel-generator.js +672 -0
- package/out/cli/components/datamodel-generator.js.map +1 -0
- package/out/cli/components/derived-data-generator.js +1340 -0
- package/out/cli/components/derived-data-generator.js.map +1 -0
- package/out/cli/components/hotbar-drop-hook-generator.js +95 -0
- package/out/cli/components/hotbar-drop-hook-generator.js.map +1 -0
- package/out/cli/components/init-hook-generator.js +597 -0
- package/out/cli/components/init-hook-generator.js.map +1 -0
- package/out/cli/components/keywords-generator.js +220 -0
- package/out/cli/components/keywords-generator.js.map +1 -0
- package/out/cli/components/language-generator.js +110 -0
- package/out/cli/components/language-generator.js.map +1 -0
- package/out/cli/components/measured-template-preview.js +234 -0
- package/out/cli/components/measured-template-preview.js.map +1 -0
- package/out/cli/components/method-generator.js +1812 -0
- package/out/cli/components/method-generator.js.map +1 -0
- package/out/cli/components/ready-hook-generator.js +448 -0
- package/out/cli/components/ready-hook-generator.js.map +1 -0
- package/out/cli/components/token-generator.js +138 -0
- package/out/cli/components/token-generator.js.map +1 -0
- package/out/cli/components/utils.js +176 -0
- package/out/cli/components/utils.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-attribute.js +148 -0
- package/out/cli/components/vue/base-components/vue-attribute.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-boolean.js +77 -0
- package/out/cli/components/vue/base-components/vue-boolean.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-calculator.js +106 -0
- package/out/cli/components/vue/base-components/vue-calculator.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-damage-application.js +369 -0
- package/out/cli/components/vue/base-components/vue-damage-application.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-damage-bonuses.js +225 -0
- package/out/cli/components/vue/base-components/vue-damage-bonuses.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-damage-resistances.js +256 -0
- package/out/cli/components/vue/base-components/vue-damage-resistances.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-damage-track.js +134 -0
- package/out/cli/components/vue/base-components/vue-damage-track.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-date-time.js +55 -0
- package/out/cli/components/vue/base-components/vue-date-time.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-dice.js +111 -0
- package/out/cli/components/vue/base-components/vue-dice.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-die.js +86 -0
- package/out/cli/components/vue/base-components/vue-die.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-document-choice.js +172 -0
- package/out/cli/components/vue/base-components/vue-document-choice.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-document-choices.js +203 -0
- package/out/cli/components/vue/base-components/vue-document-choices.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-document-link.js +73 -0
- package/out/cli/components/vue/base-components/vue-document-link.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-extended-choice.js +101 -0
- package/out/cli/components/vue/base-components/vue-extended-choice.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-inventory.js +532 -0
- package/out/cli/components/vue/base-components/vue-inventory.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-macro-choice.js +150 -0
- package/out/cli/components/vue/base-components/vue-macro-choice.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-measured-template.js +543 -0
- package/out/cli/components/vue/base-components/vue-measured-template.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-money.js +496 -0
- package/out/cli/components/vue/base-components/vue-money.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-number.js +184 -0
- package/out/cli/components/vue/base-components/vue-number.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-paperdoll.js +56 -0
- package/out/cli/components/vue/base-components/vue-paperdoll.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-parent-property-reference.js +89 -0
- package/out/cli/components/vue/base-components/vue-parent-property-reference.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-prosemirror.js +31 -0
- package/out/cli/components/vue/base-components/vue-prosemirror.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-resource.js +149 -0
- package/out/cli/components/vue/base-components/vue-resource.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-roll-visualizer.js +121 -0
- package/out/cli/components/vue/base-components/vue-roll-visualizer.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-self-property-reference.js +75 -0
- package/out/cli/components/vue/base-components/vue-self-property-reference.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-string-choice.js +111 -0
- package/out/cli/components/vue/base-components/vue-string-choice.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-string-choices.js +216 -0
- package/out/cli/components/vue/base-components/vue-string-choices.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-string.js +73 -0
- package/out/cli/components/vue/base-components/vue-string.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-text-field.js +66 -0
- package/out/cli/components/vue/base-components/vue-text-field.js.map +1 -0
- package/out/cli/components/vue/base-components/vue-tracker.js +444 -0
- package/out/cli/components/vue/base-components/vue-tracker.js.map +1 -0
- package/out/cli/components/vue/vue-action-component-generator.js +88 -0
- package/out/cli/components/vue/vue-action-component-generator.js.map +1 -0
- package/out/cli/components/vue/vue-active-effect-sheet-generator.js +1016 -0
- package/out/cli/components/vue/vue-active-effect-sheet-generator.js.map +1 -0
- package/out/cli/components/vue/vue-base-components-generator.js +59 -0
- package/out/cli/components/vue/vue-base-components-generator.js.map +1 -0
- package/out/cli/components/vue/vue-datatable-component-generator.js +307 -0
- package/out/cli/components/vue/vue-datatable-component-generator.js.map +1 -0
- package/out/cli/components/vue/vue-datatable-sheet-class-generator.js +342 -0
- package/out/cli/components/vue/vue-datatable-sheet-class-generator.js.map +1 -0
- package/out/cli/components/vue/vue-datatable2-component-generator.js +939 -0
- package/out/cli/components/vue/vue-datatable2-component-generator.js.map +1 -0
- package/out/cli/components/vue/vue-document-creation-app.js +140 -0
- package/out/cli/components/vue/vue-document-creation-app.js.map +1 -0
- package/out/cli/components/vue/vue-document-creation-sheet.js +105 -0
- package/out/cli/components/vue/vue-document-creation-sheet.js.map +1 -0
- package/out/cli/components/vue/vue-generator.js +240 -0
- package/out/cli/components/vue/vue-generator.js.map +1 -0
- package/out/cli/components/vue/vue-mixin.js +338 -0
- package/out/cli/components/vue/vue-mixin.js.map +1 -0
- package/out/cli/components/vue/vue-pinned-datatable-component-generator.js +306 -0
- package/out/cli/components/vue/vue-pinned-datatable-component-generator.js.map +1 -0
- package/out/cli/components/vue/vue-prompt-generator.js +201 -0
- package/out/cli/components/vue/vue-prompt-generator.js.map +1 -0
- package/out/cli/components/vue/vue-prompt-sheet-class-generator.js +252 -0
- package/out/cli/components/vue/vue-prompt-sheet-class-generator.js.map +1 -0
- package/out/cli/components/vue/vue-sheet-application-generator.js +2008 -0
- package/out/cli/components/vue/vue-sheet-application-generator.js.map +1 -0
- package/out/cli/components/vue/vue-sheet-class-generator.js +484 -0
- package/out/cli/components/vue/vue-sheet-class-generator.js.map +1 -0
- package/out/cli/generator.js +659 -0
- package/out/cli/generator.js.map +1 -0
- package/out/cli/main.js +43 -0
- package/out/cli/main.js.map +1 -0
- package/out/datatables.min.css +54 -0
- package/out/datatables.min.js +178 -0
- package/out/extension/github/githubAuthProvider.js +345 -0
- package/out/extension/github/githubAuthProvider.js.map +1 -0
- package/out/extension/github/githubConfig.js +132 -0
- package/out/extension/github/githubConfig.js.map +1 -0
- package/out/extension/github/githubGistActions.js +251 -0
- package/out/extension/github/githubGistActions.js.map +1 -0
- package/out/extension/github/githubGistManager.js +255 -0
- package/out/extension/github/githubGistManager.js.map +1 -0
- package/out/extension/github/githubManager.js +1735 -0
- package/out/extension/github/githubManager.js.map +1 -0
- package/out/extension/github/githubQuickActions.js +659 -0
- package/out/extension/github/githubQuickActions.js.map +1 -0
- package/out/extension/github/githubTreeProvider.js +181 -0
- package/out/extension/github/githubTreeProvider.js.map +1 -0
- package/out/extension/github/system-workflow.yml +48 -0
- package/out/extension/main.cjs +70315 -0
- package/out/extension/main.cjs.map +7 -0
- package/out/extension/main.js +237 -0
- package/out/extension/main.js.map +1 -0
- package/out/extension/package.json +426 -0
- package/out/isdl.png +0 -0
- package/out/language/generated/ast.js +2992 -0
- package/out/language/generated/ast.js.map +1 -0
- package/out/language/generated/grammar.js +13970 -0
- package/out/language/generated/grammar.js.map +1 -0
- package/out/language/generated/module.js +20 -0
- package/out/language/generated/module.js.map +1 -0
- package/out/language/intelligent-system-design-language-formatter.js +85 -0
- package/out/language/intelligent-system-design-language-formatter.js.map +1 -0
- package/out/language/intelligent-system-design-language-module.js +69 -0
- package/out/language/intelligent-system-design-language-module.js.map +1 -0
- package/out/language/intelligent-system-design-language-quickfixes.js +37 -0
- package/out/language/intelligent-system-design-language-quickfixes.js.map +1 -0
- package/out/language/intelligent-system-design-language-validator.js +515 -0
- package/out/language/intelligent-system-design-language-validator.js.map +1 -0
- package/out/language/isdl-hover-provider.js +77 -0
- package/out/language/isdl-hover-provider.js.map +1 -0
- package/out/language/isdl-scope-provider.js +149 -0
- package/out/language/isdl-scope-provider.js.map +1 -0
- package/out/language/main.cjs +47655 -0
- package/out/language/main.cjs.map +7 -0
- package/out/language/main.js +11 -0
- package/out/language/main.js.map +1 -0
- package/out/missing-character.png +0 -0
- package/out/package.json +426 -0
- package/out/paperdoll_default.png +0 -0
- package/out/progressbar.min.js +7 -0
- package/out/styles.scss +722 -0
- package/out/test/formatting/formatter.test.js +46 -0
- package/out/test/formatting/formatter.test.js.map +1 -0
- package/out/vuetify.esm.js +30279 -0
- package/package.json +426 -0
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
import { isAction, isActor, isDocumentCreatableParam, isDocumentDefaultParam, isDocumentDescriptionParam, isDocumentSvgParam, isIconParam, isItem, isPrompt, isResourceExp, isStatusParamWhen, isStatusProperty, isVariableExpression } from "../../language/generated/ast.js";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import { expandToNode, joinToNode, toString } from "langium/generate";
|
|
5
|
+
import { getAllOfType } from "./utils.js";
|
|
6
|
+
import { collectAllKeywords } from "./keywords-generator.js";
|
|
7
|
+
export function generateInitHookMjs(entry, id, destination) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9
|
+
const generatedFileDir = path.join(destination, "system", "hooks");
|
|
10
|
+
const generatedFilePath = path.join(generatedFileDir, `init.mjs`);
|
|
11
|
+
if (!fs.existsSync(generatedFileDir)) {
|
|
12
|
+
fs.mkdirSync(generatedFileDir, { recursive: true });
|
|
13
|
+
}
|
|
14
|
+
function generateTrackableResourceBars(document) {
|
|
15
|
+
let resourceExps = getAllOfType(document.body, isResourceExp);
|
|
16
|
+
return expandToNode `
|
|
17
|
+
"${document.name.toLowerCase()}": {
|
|
18
|
+
"bar": [${joinToNode(resourceExps, x => `"${x.name.toLowerCase()}"`, { separator: ',' })}],
|
|
19
|
+
"value": []
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
}
|
|
23
|
+
function generateStatusEffect(document) {
|
|
24
|
+
var _a;
|
|
25
|
+
let svg = (_a = document.params.find(p => isDocumentSvgParam(p))) === null || _a === void 0 ? void 0 : _a.value;
|
|
26
|
+
if (!svg) {
|
|
27
|
+
if (document.name.toLowerCase() === "dead")
|
|
28
|
+
svg = "icons/svg/skull.svg";
|
|
29
|
+
else
|
|
30
|
+
svg = "icons/svg/upgrade.svg";
|
|
31
|
+
}
|
|
32
|
+
let calculated = document.params.find(p => isStatusParamWhen(p)) ? true : false;
|
|
33
|
+
return expandToNode `
|
|
34
|
+
{
|
|
35
|
+
id: "${document.name.toLowerCase()}",
|
|
36
|
+
name: "${document.name}",
|
|
37
|
+
label: "${document.name}",
|
|
38
|
+
icon: "${svg}",
|
|
39
|
+
img: "${svg}",
|
|
40
|
+
calculated: ${calculated}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
function generateKeywordConfig(entry) {
|
|
45
|
+
const keywords = collectAllKeywords(entry);
|
|
46
|
+
if (keywords.size === 0) {
|
|
47
|
+
return expandToNode ``;
|
|
48
|
+
}
|
|
49
|
+
return joinToNode(Array.from(keywords.entries()), ([key, data]) => `${key}: {
|
|
50
|
+
name: "${data.name}",
|
|
51
|
+
description: "${data.description.replace(/"/g, '\\"')}",
|
|
52
|
+
color: "${data.color}",
|
|
53
|
+
icon: "${data.icon}",
|
|
54
|
+
type: "${data.type}"${data.label ? `,
|
|
55
|
+
label: "${data.label}"` : ''}
|
|
56
|
+
}`, { separator: ',\n ' }) || expandToNode ``;
|
|
57
|
+
}
|
|
58
|
+
function generateMacroActionConfig(entry) {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
const macroEntries = [];
|
|
61
|
+
for (const document of entry.documents) {
|
|
62
|
+
const actions = getAllOfType(document.body, isAction, false);
|
|
63
|
+
const macroAction = actions.find(a => a.isMacro);
|
|
64
|
+
if (macroAction) {
|
|
65
|
+
const icon = (_b = (_a = macroAction.params.find(p => isIconParam(p))) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "fa-solid fa-bolt";
|
|
66
|
+
macroEntries.push(`"${document.name.toLowerCase()}": { action: "${macroAction.name.toLowerCase()}", name: "${macroAction.name}", icon: "${icon}" }`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (macroEntries.length === 0) {
|
|
70
|
+
return expandToNode ``;
|
|
71
|
+
}
|
|
72
|
+
return expandToNode `${macroEntries.join(',\n ')}`;
|
|
73
|
+
}
|
|
74
|
+
function generateRegisterStatusEffects() {
|
|
75
|
+
let statusEffects = getAllOfType(entry.documents, isStatusProperty, false);
|
|
76
|
+
if (statusEffects.length === 0)
|
|
77
|
+
return expandToNode `
|
|
78
|
+
function registerStatusEffects() {
|
|
79
|
+
game.system.statusEffects = [];
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
let hasDead = statusEffects.find(x => x.name.toLowerCase() === "dead");
|
|
83
|
+
return expandToNode `
|
|
84
|
+
function registerStatusEffects() {
|
|
85
|
+
CONFIG.statusEffects = [
|
|
86
|
+
${hasDead ? '' : `{"id":"dead","name":"EFFECT.StatusDead","img":"icons/svg/skull.svg"},`}
|
|
87
|
+
{"id":"unconscious","name":"EFFECT.StatusUnconscious","img":"icons/svg/unconscious.svg"},
|
|
88
|
+
{"id":"invisible","name":"EFFECT.StatusInvisible","img":"icons/svg/invisible.svg"},
|
|
89
|
+
${joinToNode(statusEffects, generateStatusEffect, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
// Also store for journal generation
|
|
93
|
+
game.system.statusEffects = CONFIG.statusEffects;
|
|
94
|
+
}
|
|
95
|
+
`.appendNewLine();
|
|
96
|
+
}
|
|
97
|
+
let actorDocs = entry.documents.filter(d => isActor(d)).map(d => d);
|
|
98
|
+
let actorDefaultType = (_b = (_a = actorDocs.find(a => a.params.find(p => isDocumentDefaultParam(p) && p.value))) === null || _a === void 0 ? void 0 : _a.name.toLowerCase()) !== null && _b !== void 0 ? _b : (_c = actorDocs[0]) === null || _c === void 0 ? void 0 : _c.name.toLowerCase();
|
|
99
|
+
let actorArtworks = actorDocs.filter(a => a.params.find(p => isDocumentSvgParam(p)));
|
|
100
|
+
let actorDescriptions = actorDocs.filter(a => a.params.find(p => isDocumentDescriptionParam(p)));
|
|
101
|
+
let actorCreatables = actorDocs.filter(a => a.params.find(p => isDocumentCreatableParam(p)));
|
|
102
|
+
let itemDocs = entry.documents.filter(d => isItem(d)).map(d => d);
|
|
103
|
+
let itemDefaultType = (_e = (_d = itemDocs.find(a => a.params.find(p => isDocumentDefaultParam(p) && p.value))) === null || _d === void 0 ? void 0 : _d.name.toLowerCase()) !== null && _e !== void 0 ? _e : (_f = itemDocs[0]) === null || _f === void 0 ? void 0 : _f.name.toLowerCase();
|
|
104
|
+
let itemArtworks = itemDocs.filter(a => a.params.find(p => isDocumentSvgParam(p)));
|
|
105
|
+
let itemDescriptions = itemDocs.filter(a => a.params.find(p => isDocumentDescriptionParam(p)));
|
|
106
|
+
let itemCreatables = itemDocs.filter(a => a.params.find(p => isDocumentCreatableParam(p)));
|
|
107
|
+
function generateDocumentPromptImports(document) {
|
|
108
|
+
const actions = getAllOfType(document.body, isAction, false);
|
|
109
|
+
return joinToNode(actions.map(x => generatePromptImports(x, document)).filter(x => x !== undefined).map(x => x), { appendNewLineIfNotEmpty: true });
|
|
110
|
+
}
|
|
111
|
+
function generatePromptImports(action, document) {
|
|
112
|
+
const type = isActor(document) ? 'actor' : 'item';
|
|
113
|
+
const variables = action.method.body.filter(x => isVariableExpression(x));
|
|
114
|
+
const prompts = variables.filter(x => isPrompt(x.value)).map(x => x.value);
|
|
115
|
+
return joinToNode(prompts.map(x => `import ${document.name}${action.name}PromptApp from "../sheets/vue/${type}/prompts/${document.name.toLowerCase()}-${action.name}-prompt-app.mjs";`), { appendNewLineIfNotEmpty: true });
|
|
116
|
+
}
|
|
117
|
+
function generateDocumentPromptAssignment(document) {
|
|
118
|
+
const actions = getAllOfType(document.body, isAction, false);
|
|
119
|
+
return joinToNode(actions.map(x => generatePromptAssignments(x, document)).filter(x => x !== undefined).map(x => x), { appendNewLineIfNotEmpty: true, separator: ',' });
|
|
120
|
+
}
|
|
121
|
+
function generatePromptAssignments(action, document) {
|
|
122
|
+
const variables = action.method.body.filter(x => isVariableExpression(x));
|
|
123
|
+
const prompts = variables.filter(x => isPrompt(x.value)).map(x => x.value);
|
|
124
|
+
return joinToNode(prompts.map(x => `${document.name.toLowerCase()}${action.name}: ${document.name}${action.name}PromptApp`), { appendNewLineIfNotEmpty: true, separator: ',' });
|
|
125
|
+
}
|
|
126
|
+
const fileNode = expandToNode `
|
|
127
|
+
${joinToNode(entry.documents, document => `import ${document.name}TypeDataModel from "../datamodels/${isActor(document) ? "actor" : "item"}/${document.name.toLowerCase()}.mjs"`, { appendNewLineIfNotEmpty: true })}
|
|
128
|
+
${joinToNode(entry.documents, document => `import ${document.name}VueSheet from "../sheets/vue/${isActor(document) ? "actor" : "item"}/${document.name.toLowerCase()}-sheet.mjs"`, { appendNewLineIfNotEmpty: true })}
|
|
129
|
+
import DataTableApp from "../sheets/vue/datatable-app.mjs";
|
|
130
|
+
${joinToNode(entry.documents, generateDocumentPromptImports, { appendNewLineIfNotEmpty: true })}
|
|
131
|
+
import ${entry.config.name}EffectVueSheet from "../sheets/vue/active-effect-sheet.mjs";
|
|
132
|
+
import ${entry.config.name}Actor from "../documents/actor.mjs";
|
|
133
|
+
import ${entry.config.name}Item from "../documents/item.mjs";
|
|
134
|
+
import ${entry.config.name}Combatant from "../documents/combatant.mjs";
|
|
135
|
+
import ${entry.config.name}TokenDocument from "../documents/token.mjs";
|
|
136
|
+
import ${entry.config.name}Token from "../canvas/token.mjs";
|
|
137
|
+
import ${entry.config.name}Roll from "../rolls/roll.mjs";
|
|
138
|
+
import ${entry.config.name}DamageRoll from "../rolls/damage-roll.mjs";
|
|
139
|
+
import DocumentCreationVueDialog from "../sheets/vue/document-creation-dialog.mjs";
|
|
140
|
+
import MeasuredTemplatePreview from "../placeables/measured-template-preview.mjs";
|
|
141
|
+
|
|
142
|
+
export function init() {
|
|
143
|
+
console.log('${id} | Initializing System');
|
|
144
|
+
|
|
145
|
+
CONFIG.ActiveEffect.legacyTransferral = false;
|
|
146
|
+
|
|
147
|
+
registerSettings();
|
|
148
|
+
registerDataModels();
|
|
149
|
+
registerDocumentSheets();
|
|
150
|
+
registerDocumentClasses();
|
|
151
|
+
registerPromptClasses();
|
|
152
|
+
registerCanvasClasses();
|
|
153
|
+
registerTypeInfo();
|
|
154
|
+
registerHandlebarsHelpers();
|
|
155
|
+
registerResourceBars();
|
|
156
|
+
registerStatusEffects();
|
|
157
|
+
registerMacroActions();
|
|
158
|
+
registerKeywords();
|
|
159
|
+
setupKeywordEnricher();
|
|
160
|
+
registerUtils();
|
|
161
|
+
//addVueImportMap();
|
|
162
|
+
|
|
163
|
+
game.system.documentHooks = new Map();
|
|
164
|
+
game.system.datatableApp = DataTableApp;
|
|
165
|
+
game.system.rollClass = ${entry.config.name}Roll;
|
|
166
|
+
game.system.damageRollClass = ${entry.config.name}DamageRoll;
|
|
167
|
+
CONFIG.Dice.rolls.push(${entry.config.name}Roll);
|
|
168
|
+
CONFIG.Dice.rolls.push(${entry.config.name}DamageRoll);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* -------------------------------------------- */
|
|
172
|
+
|
|
173
|
+
function registerSettings() {
|
|
174
|
+
|
|
175
|
+
game.settings.register('${id}', 'createSystemJournal', {
|
|
176
|
+
name: game.i18n.localize("SETTINGS.CreateSystemJournalName"),
|
|
177
|
+
hint: game.i18n.localize("SETTINGS.CreateSystemJournalHint"),
|
|
178
|
+
scope: 'world',
|
|
179
|
+
config: true,
|
|
180
|
+
default: true,
|
|
181
|
+
type: Boolean
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
game.settings.register('${id}', 'roundUpDamageApplication', {
|
|
185
|
+
name: game.i18n.localize("SETTINGS.RoundUpDamageApplicationName"),
|
|
186
|
+
hint: game.i18n.localize("SETTINGS.RoundUpDamageApplicationHint"),
|
|
187
|
+
scope: 'world',
|
|
188
|
+
config: true,
|
|
189
|
+
default: true,
|
|
190
|
+
type: Boolean
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
game.settings.register('${id}', 'allowTargetDamageApplication', {
|
|
194
|
+
name: game.i18n.localize('SETTINGS.AllowTargetDamageApplicationName'),
|
|
195
|
+
hint: game.i18n.localize('SETTINGS.AllowTargetDamageApplicationHint'),
|
|
196
|
+
scope: 'world',
|
|
197
|
+
config: true,
|
|
198
|
+
default: false,
|
|
199
|
+
type: Boolean,
|
|
200
|
+
requiresReload: true
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
game.settings.register('${id}', 'userTargetDamageApplicationType', {
|
|
204
|
+
scope: 'client',
|
|
205
|
+
config: false,
|
|
206
|
+
default: 'selected',
|
|
207
|
+
type: String
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
game.settings.register('${id}', 'damageApplicationChatCard', {
|
|
211
|
+
name: game.i18n.localize('SETTINGS.DamageApplicationChatCardName'),
|
|
212
|
+
hint: game.i18n.localize('SETTINGS.DamageApplicationChatCardHint'),
|
|
213
|
+
scope: 'world',
|
|
214
|
+
config: true,
|
|
215
|
+
default: 'gm',
|
|
216
|
+
type: String,
|
|
217
|
+
choices: {
|
|
218
|
+
'none': game.i18n.localize('SETTINGS.DamageApplicationChatCard.None'),
|
|
219
|
+
'public': game.i18n.localize('SETTINGS.DamageApplicationChatCard.Public'),
|
|
220
|
+
'gm': game.i18n.localize('SETTINGS.DamageApplicationChatCard.GM')
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
game.settings.register('${id}', 'hotReloadLastState', {
|
|
225
|
+
scope: 'client',
|
|
226
|
+
config: false,
|
|
227
|
+
default: { openWindows: [] },
|
|
228
|
+
type: Object
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
game.settings.register('${id}', 'documentColorThemes', {
|
|
232
|
+
scope: 'client',
|
|
233
|
+
config: false,
|
|
234
|
+
default: {},
|
|
235
|
+
type: Object
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
game.settings.register('${id}', 'documentLastState', {
|
|
239
|
+
scope: 'client',
|
|
240
|
+
config: false,
|
|
241
|
+
default: {},
|
|
242
|
+
type: Object
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
game.settings.register('${id}', 'documentTableColumns', {
|
|
246
|
+
scope: 'client',
|
|
247
|
+
config: false,
|
|
248
|
+
default: {},
|
|
249
|
+
type: Object
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* -------------------------------------------- */
|
|
254
|
+
|
|
255
|
+
function registerDataModels() {
|
|
256
|
+
CONFIG.Actor.dataModels = {
|
|
257
|
+
${joinToNode(entry.documents.filter(d => isActor(d)), document => `${document.name.toLowerCase()}: ${document.name}TypeDataModel`, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
CONFIG.Item.dataModels = {
|
|
261
|
+
${joinToNode(entry.documents.filter(d => isItem(d)), document => `${document.name.toLowerCase()}: ${document.name}TypeDataModel`, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* -------------------------------------------- */
|
|
266
|
+
|
|
267
|
+
function registerDocumentSheets() {
|
|
268
|
+
Actors.unregisterSheet("core", ActorSheet);
|
|
269
|
+
Items.unregisterSheet("core", ItemSheet);
|
|
270
|
+
|
|
271
|
+
// Actors
|
|
272
|
+
${joinToNode(entry.documents.filter(d => isActor(d)), document => `Actors.registerSheet("${id}", ${document.name}VueSheet, {types: ["${document.name.toLowerCase()}"], makeDefault: true});`, { appendNewLineIfNotEmpty: true })}
|
|
273
|
+
|
|
274
|
+
// Items
|
|
275
|
+
${joinToNode(entry.documents.filter(d => isItem(d)), document => `Items.registerSheet("${id}", ${document.name}VueSheet, {types: ["${document.name.toLowerCase()}"], makeDefault: true});`, { appendNewLineIfNotEmpty: true })}
|
|
276
|
+
|
|
277
|
+
// Active Effects
|
|
278
|
+
DocumentSheetConfig.registerSheet(ActiveEffect, "${id}", ${entry.config.name}EffectVueSheet, { makeDefault: true });
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* -------------------------------------------- */
|
|
282
|
+
|
|
283
|
+
function registerDocumentClasses() {
|
|
284
|
+
CONFIG.Actor.documentClass = ${entry.config.name}Actor;
|
|
285
|
+
CONFIG.Item.documentClass = ${entry.config.name}Item;
|
|
286
|
+
CONFIG.Combatant.documentClass = ${entry.config.name}Combatant;
|
|
287
|
+
CONFIG.Token.documentClass = ${entry.config.name}TokenDocument;
|
|
288
|
+
|
|
289
|
+
game.system.measuredTemplatePreviewClass = MeasuredTemplatePreview;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* -------------------------------------------- */
|
|
293
|
+
|
|
294
|
+
function registerPromptClasses() {
|
|
295
|
+
game.system.prompts = {
|
|
296
|
+
${joinToNode(entry.documents, document => generateDocumentPromptAssignment(document), { separator: ',\n' })}
|
|
297
|
+
};
|
|
298
|
+
game.system.documentCreateDialog = DocumentCreationVueDialog;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/* -------------------------------------------- */
|
|
302
|
+
|
|
303
|
+
function registerCanvasClasses() {
|
|
304
|
+
CONFIG.Token.objectClass = ${entry.config.name}Token;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* -------------------------------------------- */
|
|
308
|
+
|
|
309
|
+
function registerTypeInfo() {
|
|
310
|
+
CONFIG.Actor.defaultType = "${actorDefaultType}";
|
|
311
|
+
CONFIG.Item.defaultType = "${itemDefaultType}";
|
|
312
|
+
|
|
313
|
+
CONFIG.Actor.typeArtworks = {
|
|
314
|
+
${joinToNode(actorArtworks, document => {
|
|
315
|
+
var _a, _b;
|
|
316
|
+
const path = (_b = (_a = document.params.find(p => isDocumentSvgParam(p))) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
|
|
317
|
+
const fullPath = path.startsWith('/icons/') ? path : `systems/${id}/${path}`;
|
|
318
|
+
return `"${document.name.toLowerCase()}": "${fullPath}"`;
|
|
319
|
+
}, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
CONFIG.Item.typeArtworks = {
|
|
323
|
+
${joinToNode(itemArtworks, document => {
|
|
324
|
+
var _a, _b;
|
|
325
|
+
const path = (_b = (_a = document.params.find(p => isDocumentSvgParam(p))) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
|
|
326
|
+
const fullPath = path.startsWith('/icons/') ? path : `systems/${id}/${path}`;
|
|
327
|
+
return `"${document.name.toLowerCase()}": "${fullPath}"`;
|
|
328
|
+
}, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
CONFIG.Actor.typeDescriptions = {
|
|
332
|
+
${joinToNode(actorDescriptions, document => { var _a; return `"${document.name.toLowerCase()}": "${(_a = document.params.find(p => isDocumentDescriptionParam(p))) === null || _a === void 0 ? void 0 : _a.value}"`; }, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
333
|
+
}
|
|
334
|
+
CONFIG.Item.typeDescriptions = {
|
|
335
|
+
${joinToNode(itemDescriptions, document => { var _a; return `"${document.name.toLowerCase()}": "${(_a = document.params.find(p => isDocumentDescriptionParam(p))) === null || _a === void 0 ? void 0 : _a.value}"`; }, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
CONFIG.Actor.typeCreatables = {
|
|
339
|
+
${joinToNode(actorCreatables, document => { var _a; return `"${document.name.toLowerCase()}": ${(_a = document.params.find(p => isDocumentCreatableParam(p))) === null || _a === void 0 ? void 0 : _a.value}`; }, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
340
|
+
}
|
|
341
|
+
CONFIG.Item.typeCreatables = {
|
|
342
|
+
${joinToNode(itemCreatables, document => { var _a; return `"${document.name.toLowerCase()}": ${(_a = document.params.find(p => isDocumentCreatableParam(p))) === null || _a === void 0 ? void 0 : _a.value}`; }, { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* -------------------------------------------- */
|
|
347
|
+
|
|
348
|
+
function registerHandlebarsHelpers() {
|
|
349
|
+
|
|
350
|
+
// Convert a type and value to a localized label
|
|
351
|
+
Handlebars.registerHelper("typeLabel", (type, value) => {
|
|
352
|
+
return game.i18n.localize(CONFIG.SYSTEM[type][value]?.label);
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
// Truncate a string to a certain length with an ellipsis
|
|
356
|
+
Handlebars.registerHelper("truncate", (str, len) => {
|
|
357
|
+
if (str.length > len) {
|
|
358
|
+
return \`\${str.slice(0, len)}...\`;
|
|
359
|
+
}
|
|
360
|
+
return str;
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
// Get a property on an object using a string key
|
|
364
|
+
Handlebars.registerHelper("getProperty", (obj, key) => {
|
|
365
|
+
if (obj == null) return "";
|
|
366
|
+
return foundry.utils.getProperty(obj, key);
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
// Humanize a string
|
|
370
|
+
Handlebars.registerHelper("humanize", (str) => {
|
|
371
|
+
let humanized = str.replace(/_/g, " ");
|
|
372
|
+
humanized = humanized.replace("system.", "").replaceAll(".", " ");
|
|
373
|
+
humanized = humanized.charAt(0).toUpperCase() + humanized.slice(1);
|
|
374
|
+
return humanized;
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/* -------------------------------------------- */
|
|
379
|
+
|
|
380
|
+
function registerResourceBars() {
|
|
381
|
+
CONFIG.Actor.trackableAttributes = {
|
|
382
|
+
${joinToNode(entry.documents.filter(d => isActor(d)), document => generateTrackableResourceBars(document), { appendNewLineIfNotEmpty: true, separator: ',' })}
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* -------------------------------------------- */
|
|
387
|
+
|
|
388
|
+
${generateRegisterStatusEffects()}
|
|
389
|
+
|
|
390
|
+
/* -------------------------------------------- */
|
|
391
|
+
|
|
392
|
+
function registerMacroActions() {
|
|
393
|
+
game.system.macroActions = {
|
|
394
|
+
${generateMacroActionConfig(entry)}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* -------------------------------------------- */
|
|
399
|
+
|
|
400
|
+
function registerKeywords() {
|
|
401
|
+
game.system.keywords = {
|
|
402
|
+
${generateKeywordConfig(entry)}
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* -------------------------------------------- */
|
|
407
|
+
|
|
408
|
+
function setupKeywordEnricher() {
|
|
409
|
+
// Register keyword text enricher
|
|
410
|
+
CONFIG.TextEditor.enrichers.push({
|
|
411
|
+
pattern: /@([a-zA-Z][a-zA-Z0-9]*)/gi,
|
|
412
|
+
replaceParent: true,
|
|
413
|
+
enricher: async (match, options) => {
|
|
414
|
+
const keywordName = match[1].toLowerCase();
|
|
415
|
+
const keyword = game.system.keywords[keywordName];
|
|
416
|
+
|
|
417
|
+
if (!keyword) return null;
|
|
418
|
+
|
|
419
|
+
// Find the system documentation journal and determine which page the keyword is on
|
|
420
|
+
const keywordsJournal = game.journal.find(j => j.getFlag('${id}', 'systemJournal') === true || j.getFlag('core', 'keywordsJournal') === true);
|
|
421
|
+
const isDamageType = keyword.type === 'damage-type';
|
|
422
|
+
const pageType = isDamageType ? 'damage-types' : 'keywords';
|
|
423
|
+
const targetPage = keywordsJournal?.pages.find(p => p.getFlag('core', 'pageType') === pageType);
|
|
424
|
+
|
|
425
|
+
const element = document.createElement('span');
|
|
426
|
+
element.className = 'keyword-reference';
|
|
427
|
+
element.setAttribute('data-keyword', keywordName);
|
|
428
|
+
element.setAttribute('data-journal-uuid', keywordsJournal?.uuid || '');
|
|
429
|
+
element.setAttribute('data-page-uuid', targetPage?.uuid || '');
|
|
430
|
+
element.setAttribute('data-anchor', keywordName);
|
|
431
|
+
element.title = keyword.description;
|
|
432
|
+
|
|
433
|
+
if (keyword.icon) {
|
|
434
|
+
const icon = document.createElement('i');
|
|
435
|
+
icon.className = keyword.icon;
|
|
436
|
+
icon.style.color = keyword.color;
|
|
437
|
+
element.appendChild(icon);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
element.appendChild(document.createTextNode(keyword.name));
|
|
441
|
+
|
|
442
|
+
return element;
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// Register click handler for keyword references
|
|
447
|
+
$(document).on('click', '.keyword-reference', async function() {
|
|
448
|
+
const journalUuid = $(this).data('journal-uuid');
|
|
449
|
+
const pageUuid = $(this).data('page-uuid');
|
|
450
|
+
const anchor = $(this).data('anchor');
|
|
451
|
+
|
|
452
|
+
if (journalUuid && pageUuid) {
|
|
453
|
+
const journal = await fromUuid(journalUuid);
|
|
454
|
+
const page = await fromUuid(pageUuid);
|
|
455
|
+
if (journal && page) {
|
|
456
|
+
journal.sheet.render(true, {pageId: page.id, anchor: anchor});
|
|
457
|
+
}
|
|
458
|
+
} else if (journalUuid) {
|
|
459
|
+
const journal = await fromUuid(journalUuid);
|
|
460
|
+
journal?.sheet.render(true);
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/** -------------------------------------------- */
|
|
466
|
+
|
|
467
|
+
function addVueImportMap() {
|
|
468
|
+
let script = document.createElement('script');
|
|
469
|
+
script.type = 'importmap';
|
|
470
|
+
script.text = \`{
|
|
471
|
+
"imports": {
|
|
472
|
+
"vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js"
|
|
473
|
+
}
|
|
474
|
+
}\`;
|
|
475
|
+
document.head.appendChild(script);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/* -------------------------------------------- */
|
|
479
|
+
|
|
480
|
+
function registerUtils() {
|
|
481
|
+
game.system.utils = {};
|
|
482
|
+
|
|
483
|
+
function flattenObject(obj, _d=0) {
|
|
484
|
+
const flat = {};
|
|
485
|
+
if ( _d > 100 ) {
|
|
486
|
+
throw new Error("Maximum depth exceeded");
|
|
487
|
+
}
|
|
488
|
+
for ( let [k, v] of Object.entries(obj) ) {
|
|
489
|
+
let t = foundry.utils.getType(v);
|
|
490
|
+
if ( t === "Object" ) {
|
|
491
|
+
if ( k == "parent" ) continue;
|
|
492
|
+
if ( foundry.utils.isEmpty(v) ) flat[k] = v;
|
|
493
|
+
let inner = flattenObject(v, _d+1);
|
|
494
|
+
for ( let [ik, iv] of Object.entries(inner) ) {
|
|
495
|
+
flat[\`\${k}.\${ik}\`] = iv;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
else flat[k] = v;
|
|
499
|
+
}
|
|
500
|
+
return flat;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
game.system.utils.flattenObject = flattenObject;
|
|
504
|
+
|
|
505
|
+
function toNearest(interval=1, method="round") {
|
|
506
|
+
if (!Number.isNumeric(this)) {
|
|
507
|
+
throw new Error("toNearest() must be called on a numeric looking value");
|
|
508
|
+
}
|
|
509
|
+
const number = Number.fromString(this);
|
|
510
|
+
return number.toNearest(interval, method);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
Object.defineProperties(String.prototype, {
|
|
514
|
+
toNearest: {value: toNearest}
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
async function callAllAsync(hook, ...args) {
|
|
518
|
+
if ( CONFIG.debug.hooks ) {
|
|
519
|
+
console.log(\`DEBUG | Calling async \${hook} hook with args:\`);
|
|
520
|
+
console.log(args);
|
|
521
|
+
}
|
|
522
|
+
const events = Hooks.events;
|
|
523
|
+
if ( !(hook in events) ) return true;
|
|
524
|
+
for ( const entry of Array.from(events[hook]) ) {
|
|
525
|
+
await entry.fn(...args);
|
|
526
|
+
}
|
|
527
|
+
return true;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
Hooks.callAllAsync = callAllAsync;
|
|
531
|
+
|
|
532
|
+
let audioSources = new Map();
|
|
533
|
+
let gainNodes = new Map();
|
|
534
|
+
|
|
535
|
+
async function playAudio(id, url, onEndCallback, volume=0.5) {
|
|
536
|
+
let audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
537
|
+
let source = audioCtx.createBufferSource();
|
|
538
|
+
let gainNode = audioCtx.createGain();
|
|
539
|
+
audioSources.set(id, source);
|
|
540
|
+
gainNodes.set(id, gainNode);
|
|
541
|
+
source.connect(gainNode).connect(audioCtx.destination);
|
|
542
|
+
|
|
543
|
+
let request = new XMLHttpRequest();
|
|
544
|
+
request.open('GET', url, true);
|
|
545
|
+
request.responseType = 'arraybuffer';
|
|
546
|
+
|
|
547
|
+
request.onload = () => {
|
|
548
|
+
let audioData = request.response;
|
|
549
|
+
audioCtx.decodeAudioData(audioData,
|
|
550
|
+
(buffer) => {
|
|
551
|
+
source.buffer = buffer;
|
|
552
|
+
gainNode.gain.value = volume;
|
|
553
|
+
source.start(0);
|
|
554
|
+
source.onended = () => {
|
|
555
|
+
audioSources.delete(id);
|
|
556
|
+
gainNodes.delete(id);
|
|
557
|
+
onEndCallback();
|
|
558
|
+
};
|
|
559
|
+
},
|
|
560
|
+
(e) => {
|
|
561
|
+
ui.notifications.error("An error occurred while decoding audio data");
|
|
562
|
+
console.log(url);
|
|
563
|
+
console.log(audioData);
|
|
564
|
+
console.log(e);
|
|
565
|
+
onEndCallback();
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
try {
|
|
569
|
+
request.send();
|
|
570
|
+
}
|
|
571
|
+
catch (e) {
|
|
572
|
+
console.error("Error playing sound effect:", e);
|
|
573
|
+
onEndCallback();
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
async function playSfx(url, volume=0.5) {
|
|
578
|
+
// Invoke the playAudio function with the provided parameters and wait for it to complete vis the onEndCallback
|
|
579
|
+
let finishedPromise = new Promise(async (resolve) => {
|
|
580
|
+
let onEndCallback = () => {
|
|
581
|
+
resolve();
|
|
582
|
+
};
|
|
583
|
+
// Attach base url
|
|
584
|
+
if (!url.startsWith("http")) {
|
|
585
|
+
url = \`\${window.location.origin}/systems/${id}/\${url}\`;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
await playAudio(foundry.utils.randomID(), url, onEndCallback, volume);
|
|
589
|
+
});
|
|
590
|
+
return finishedPromise;
|
|
591
|
+
}
|
|
592
|
+
game.system.utils.playSfx = playSfx;
|
|
593
|
+
}
|
|
594
|
+
`.appendNewLineIfNotEmpty();
|
|
595
|
+
fs.writeFileSync(generatedFilePath, toString(fileNode));
|
|
596
|
+
}
|
|
597
|
+
//# sourceMappingURL=init-hook-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-hook-generator.js","sourceRoot":"","sources":["../../../src/cli/components/init-hook-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAII,QAAQ,EAAE,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,0BAA0B,EACtG,kB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