Reorganize templates file structure
This commit is contained in:
parent
17a270d361
commit
49b450daee
57 changed files with 266 additions and 263 deletions
|
@ -33,8 +33,8 @@ export class DS4ActorSheet extends ActorSheet<ActorSheet.Data<DS4Actor>> {
|
|||
|
||||
/** @override */
|
||||
get template(): string {
|
||||
const path = "systems/ds4/templates/actor";
|
||||
return `${path}/${this.actor.data.type}-sheet.hbs`;
|
||||
const basePath = "systems/ds4/templates/sheets/actor";
|
||||
return `${basePath}/${this.actor.data.type}-sheet.hbs`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,29 +1,31 @@
|
|||
export default async function registerHandlebarsPartials(): Promise<void> {
|
||||
const templatePaths = [
|
||||
"systems/ds4/templates/item/partials/sheet-header.hbs",
|
||||
"systems/ds4/templates/item/partials/description.hbs",
|
||||
"systems/ds4/templates/item/partials/details.hbs",
|
||||
"systems/ds4/templates/item/partials/effects.hbs",
|
||||
"systems/ds4/templates/item/partials/body.hbs",
|
||||
"systems/ds4/templates/actor/partials/items-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/talents-abilities-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/spells-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/overview-add-button.hbs",
|
||||
"systems/ds4/templates/actor/partials/overview-control-buttons.hbs",
|
||||
"systems/ds4/templates/actor/partials/core-values.hbs",
|
||||
"systems/ds4/templates/actor/partials/combat-values.hbs",
|
||||
"systems/ds4/templates/actor/partials/profile.hbs",
|
||||
"systems/ds4/templates/actor/partials/values-tab.hbs",
|
||||
"systems/ds4/templates/actor/partials/character-progression.hbs",
|
||||
"systems/ds4/templates/actor/partials/special-creature-abilities-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/character-inventory.hbs",
|
||||
"systems/ds4/templates/actor/partials/creature-inventory.hbs",
|
||||
"systems/ds4/templates/actor/partials/talent-rank-equation.hbs",
|
||||
"systems/ds4/templates/actor/partials/item-list-header.hbs",
|
||||
"systems/ds4/templates/actor/partials/item-list-entry.hbs",
|
||||
"systems/ds4/templates/actor/partials/currency.hbs",
|
||||
"systems/ds4/templates/common/partials/rollable-image.hbs",
|
||||
"systems/ds4/templates/actor/partials/core-value.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/character-progression.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/combat-values.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/core-value.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/core-values.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/currency.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/item-list-entry.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/item-list-header.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/items-overview.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/overview-add-button.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/overview-control-buttons.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/rollable-image.hbs",
|
||||
"systems/ds4/templates/sheets/actor/components/talent-rank-equation.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/biography.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/character-inventory.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/creature-inventory.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/description.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/profile.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/special-creature-abilities.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/spells.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/talents-abilities.hbs",
|
||||
"systems/ds4/templates/sheets/actor/tabs/values.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/body.hbs",
|
||||
"systems/ds4/templates/sheets/item/components/sheet-header.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/description.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/details.hbs",
|
||||
"systems/ds4/templates/sheets/item/tabs/effects.hbs",
|
||||
];
|
||||
await loadTemplates(templatePaths);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ export class DS4ItemSheet extends ItemSheet<ItemSheet.Data<DS4Item>> {
|
|||
|
||||
/** @override */
|
||||
get template(): string {
|
||||
const path = "systems/ds4/templates/item";
|
||||
return `${path}/${this.item.data.type}-sheet.hbs`;
|
||||
const basePath = "systems/ds4/templates/sheets/item";
|
||||
return `${basePath}/${this.item.data.type}-sheet.hbs`;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
|
|
@ -155,7 +155,7 @@ export class DS4Item extends Item<DS4ItemData, DS4ItemPreparedData> {
|
|||
const label = game.i18n.localize("DS4.AttackType");
|
||||
const answer = Dialog.prompt({
|
||||
title: game.i18n.localize("DS4.AttackTypeSelection"),
|
||||
content: await renderTemplate("systems/ds4/templates/common/simple-select-form.hbs", {
|
||||
content: await renderTemplate("systems/ds4/templates/dialogs/simple-select-form.hbs", {
|
||||
label,
|
||||
identifier,
|
||||
options: { melee, ranged },
|
||||
|
|
|
@ -106,7 +106,7 @@ async function askGmModifier(
|
|||
options: Partial<DS4CheckFactoryOptions> = {},
|
||||
{ template, title }: { template?: string; title?: string } = {},
|
||||
): Promise<Partial<IntermediateGmModifierData>> {
|
||||
const usedTemplate = template ?? "systems/ds4/templates/roll/roll-options.hbs";
|
||||
const usedTemplate = template ?? "systems/ds4/templates/dialogs/roll-options.hbs";
|
||||
const usedTitle = title ?? game.i18n.localize("DS4.RollDialogDefaultTitle");
|
||||
const templateData = {
|
||||
title: usedTitle,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue