diff --git a/.forgejo/workflows/draft-release.yaml b/.forgejo/workflows/draft-release.yaml index cd816e7..2984948 100644 --- a/.forgejo/workflows/draft-release.yaml +++ b/.forgejo/workflows/draft-release.yaml @@ -43,7 +43,6 @@ jobs: run: node scripts/src/createForgejoRelease.mjs env: TAG: "v${{steps.version.outputs.version}}" - CDN_URL: "${{vars.CDN_URL}}" wiki-release-artifact: name: "Add Wiki to Release" @@ -65,10 +64,10 @@ jobs: token: ${{forgejo.token}} - name: "Install dependencies" - run: "pwd; npm i" + run: "npm i" - - name: "Remove development folders" - run: "rm -rf .git .vscode" + - name: "Remove development/web folders" + run: "rm -rf .git .vscode _*" working-directory: "wiki" - name: "Compress wiki folder" diff --git a/dev/dev.mjs b/dev/dev.mjs new file mode 100644 index 0000000..186743f --- /dev/null +++ b/dev/dev.mjs @@ -0,0 +1 @@ +import "./hooks/renderSettings.mjs"; diff --git a/dev/hooks/renderSettings.mjs b/dev/hooks/renderSettings.mjs new file mode 100644 index 0000000..ad11762 --- /dev/null +++ b/dev/hooks/renderSettings.mjs @@ -0,0 +1,5 @@ +Hooks.on(`renderSettings`, (app, html, ctx, options) => { + /** @type {HTMLElement|undefined} */ + const coreUpdateTooltip = html.querySelector(`.build .value a`); + coreUpdateTooltip?.remove(); +}); diff --git a/langs/en-ca.json b/langs/en-ca.json index bf97c0c..43dcbb0 100644 --- a/langs/en-ca.json +++ b/langs/en-ca.json @@ -64,6 +64,14 @@ "edit": "Edit", "resizable": "Resizable", "not-resizable": "Not Resizable", + "macro-is-in-use": "The Macro is used by {count} items/attributes in the world or Actors, the items will lose their ability to use the macro.", + "roll": "Roll", + "use": "Use", + "version": "Version {version}", + "whats-new": "What's New", + "releases": "Releases", + "wiki": "Wiki", + "issues": "Issues", "item": { "weight": "Weight", "quantity": "Quantity", @@ -88,6 +96,7 @@ "invalid-input-type": "Invalid input type provided: {type}" }, "PlayerSheet": { + "save-attributes-as-defaults": "Save Attributes as Defaults", "create-item": "Create Embedded Item", "current-value": "Current value", "max-value": "Maximum value", diff --git a/module/apps/PlayerSheet.mjs b/module/apps/PlayerSheet.mjs index 7ed89fe..5dfab59 100644 --- a/module/apps/PlayerSheet.mjs +++ b/module/apps/PlayerSheet.mjs @@ -1,9 +1,10 @@ import { __ID__, filePath } from "../consts.mjs"; -import { deleteItemFromElement, editItemFromElement } from "./utils.mjs"; +import { createContextMenuOption, deleteItemFromElement, editItemFromElement } from "./utils.mjs"; import { config } from "../config.mjs"; import { Logger } from "../utils/Logger.mjs"; -import { TAFDocumentSheetConfig } from "./TAFDocumentSheetConfig.mjs"; +import { TAFDocumentSheetConfig } from "./overrides/TAFDocumentSheetConfig.mjs"; import { TAFDocumentSheetMixin } from "./mixins/TAFDocumentSheetMixin.mjs"; +import { TAFActor } from "../documents/Actor.mjs"; const { HandlebarsApplicationMixin } = foundry.applications.api; const { ActorSheetV2 } = foundry.applications.sheets; @@ -38,6 +39,7 @@ export class PlayerSheet extends configureSheet: this.#configureSheet, toggleExpand: this.#toggleExpand, executeTrigger: this.#executeTrigger, + saveDefaultAttrs: this.#saveDefaultAttrs, }, }; @@ -193,6 +195,12 @@ export class PlayerSheet extends const controls = super._getHeaderControls(); controls.push( + { + icon: `fa-solid fa-globe`, + label: `taf.Apps.PlayerSheet.save-attributes-as-defaults`, + action: `saveDefaultAttrs`, + visible: () => game.user.isGM, + }, { icon: `fa-solid fa-suitcase`, label: `taf.Apps.PlayerSheet.create-item`, @@ -218,24 +226,24 @@ export class PlayerSheet extends this.element, `[data-item-uuid]`, [ - { + createContextMenuOption({ label: _loc(`taf.misc.edit`), - condition: (el) => { + visible: (el) => { const itemUuid = el.dataset.itemUuid; const itemExists = itemUuid != null && itemUuid !== ``; return this.isEditable && itemExists; }, onClick: editItemFromElement, - }, - { + }), + createContextMenuOption({ label: _loc(`taf.misc.delete`), - condition: (el) => { + visible: (el) => { const itemUuid = el.dataset.itemUuid; const itemExists = itemUuid != null && itemUuid !== ``; return this.isEditable && itemExists; }, onClick: deleteItemFromElement, - }, + }), ], { jQuery: false, fixed: true }, ); @@ -382,6 +390,7 @@ export class PlayerSheet extends weight: config.weightFormatter(item.system.quantifiedWeight), isExpanded: this.#expandedItems.has(item.uuid), canExpand: item.system.description.length > 0, + trigger: item.system.trigger, }; ctx.description = ``; @@ -474,5 +483,15 @@ export class PlayerSheet extends const item = await fromUuid(itemUuid); await item?.system.execute?.(); }; + + /** + * Saves the Actor's current attribute items into the world setting for newly + * created Actors to have the same attribute list. + * + * @this {PlayerSheet} + */ + static async #saveDefaultAttrs() { + TAFActor.setDefaultAttributes(this.actor); + }; // #endregion Actions }; diff --git a/module/apps/TAFDocumentSheetConfig.mjs b/module/apps/overrides/TAFDocumentSheetConfig.mjs similarity index 96% rename from module/apps/TAFDocumentSheetConfig.mjs rename to module/apps/overrides/TAFDocumentSheetConfig.mjs index c35b8f6..f31f585 100644 --- a/module/apps/TAFDocumentSheetConfig.mjs +++ b/module/apps/overrides/TAFDocumentSheetConfig.mjs @@ -1,6 +1,6 @@ -import { __ID__, filePath } from "../consts.mjs"; -import { getDefaultSizing } from "../utils/getSizing.mjs"; -import { localizer } from "../utils/localizer.mjs"; +import { __ID__, filePath } from "../../consts.mjs"; +import { getDefaultSizing } from "../../utils/getSizing.mjs"; +import { localizer } from "../../utils/localizer.mjs"; const { diffObject, expandObject, flattenObject } = foundry.utils; const { DocumentSheetConfig } = foundry.applications.apps; diff --git a/module/apps/overrides/TAFSettingsSidebar.mjs b/module/apps/overrides/TAFSettingsSidebar.mjs new file mode 100644 index 0000000..b33bbb8 --- /dev/null +++ b/module/apps/overrides/TAFSettingsSidebar.mjs @@ -0,0 +1,30 @@ +import { filePath } from "../../consts.mjs"; + +const { renderTemplate } = foundry.applications.handlebars; +const { Settings } = foundry.applications.sidebar.tabs; + +export class TAFSettingsSidebar extends Settings { + // #region Lifecycle + async _onRender() { + // remove the row from the HTML + const systemRow = this.element.querySelector(`.info .system`); + systemRow?.remove(); + + // add the more customized system info into the sidebar + const systemBlock = this.element.querySelector(`section.system`); + if (!systemBlock) { + const htmlString = await renderTemplate( + filePath(`templates/settings-sidebar-addition.hbs`), + { system: game.system, }, + ); + + const temp = document.createElement(`div`); + temp.innerHTML = htmlString; + const rendered = temp.firstChild; + + const info = this.element.querySelector(`section.info`); + info.insertAdjacentElement(`afterend`, rendered); + }; + }; + // #endregion Lifecycle +}; diff --git a/module/apps/utils.mjs b/module/apps/utils.mjs index de8edcc..b883ddf 100644 --- a/module/apps/utils.mjs +++ b/module/apps/utils.mjs @@ -3,6 +3,25 @@ This file contains utility methods used by Applications in order to be DRYer */ +/** + * A helper function that takes a v14-compatible ContextMenuEntry option + * and adjusts it for v13 if required + * + * @param {ContextMenuEntry} option The v14+ compatible menu entry option + * @returns {ContextMenuEntry} The v14+ or option.onClick(null, target), + }; + }; + + return option; +}; + /** * @param {Event} _event The click event * @param {HTMLElement} target The element to operate on diff --git a/module/data/Actor/player.mjs b/module/data/Actor/player.mjs index 81a197e..58b35b8 100644 --- a/module/data/Actor/player.mjs +++ b/module/data/Actor/player.mjs @@ -1,7 +1,7 @@ import { __ID__ } from "../../consts.mjs"; export class PlayerData extends foundry.abstract.TypeDataModel { - // #region Schema + // MARK: Schema static defineSchema() { const fields = foundry.data.fields; return { @@ -18,7 +18,6 @@ export class PlayerData extends foundry.abstract.TypeDataModel { attr: new fields.ObjectField({ persisted: false, initial: {} }), }; }; - // #endregion Schema // #region Lifecycle /** diff --git a/module/data/Item/attribute.mjs b/module/data/Item/attribute.mjs index 6a2c660..aaa92dc 100644 --- a/module/data/Item/attribute.mjs +++ b/module/data/Item/attribute.mjs @@ -136,16 +136,40 @@ export class AttributeItemData extends foundry.abstract.TypeDataModel { // Provide the chat-specific context when required if (macro.type === `chat`) { + const extraContext = { + name: this.parent.name, + min: this.min, + value: this.value, + max: this.max, + }; + Hooks.once(`taf.getRollData`, (data) => { - data.active = { - min: this.min, - value: this.value, - max: this.max, + data.active = extraContext; + }); + + // Apply any roll data additions to the message flavour as well + // since that doesn't get formatted by the ChatLog + Hooks.once(`preCreateChatMessage`, (message) => { + if (message.flavor.includes(`@active`)) { + const flavor = message.flavor.replaceAll( + /@active\.(\w+)/g, + (fullMatch, key) => { + return extraContext[key] || fullMatch; + }, + ); + message.updateSource({ flavor }); }; }); }; - await macro?.execute({ item: this.parent }); + // Get the speaker so that Foundry has the correct context to be able to call + // the Actor's getData method, letting us augment the context dynamically for + // the @active roll context + const speaker = foundry.documents.ChatMessage.implementation.getSpeaker({ + actor: this.parent.parent, + }); + + await macro?.execute({ item: this.parent, speaker }); }; // #endregion Methods }; diff --git a/module/data/Item/generic.mjs b/module/data/Item/generic.mjs index a8f8490..9af745a 100644 --- a/module/data/Item/generic.mjs +++ b/module/data/Item/generic.mjs @@ -59,15 +59,39 @@ export class GenericItemData extends foundry.abstract.TypeDataModel { // Provide the chat-specific context when required if (macro.type === `chat`) { + const extraContext = { + name: this.parent.name, + quantity: this.quantity, + equipped: this.equipped ? 1 : 0, + }; + Hooks.once(`taf.getRollData`, (data) => { - data.active = { - quantity: this.quantity, - equipped: this.equipped ? 1 : 0, + data.active = extraContext; + }); + + // Apply any roll data additions to the message flavour as well + // since that doesn't get formatted by the ChatLog + Hooks.once(`preCreateChatMessage`, (message) => { + if (message.flavor.includes(`@active`)) { + const flavor = message.flavor.replaceAll( + /@active\.(\w+)/g, + (fullMatch, key) => { + return extraContext[key] || fullMatch; + }, + ); + message.updateSource({ flavor }); }; }); }; - await macro?.execute({ item }); + // Get the speaker so that Foundry has the correct context to be able to call + // the Actor's getData method, letting us augment the context dynamically for + // the @active roll context + const speaker = foundry.documents.ChatMessage.implementation.getSpeaker({ + actor: this.parent.parent, + }); + + await macro?.execute({ item: this.parent, speaker }); }; // #endregion Methods }; diff --git a/module/documents/Actor.mjs b/module/documents/Actor.mjs index 7a0f47c..0c464b5 100644 --- a/module/documents/Actor.mjs +++ b/module/documents/Actor.mjs @@ -71,7 +71,7 @@ export class TAFActor extends Actor { ...this.system.attr, }; - Hooks.call(`taf.getRollData`, data, this); + Hooks.callAll(`taf.getRollData`, data, this); return data; }; @@ -130,8 +130,11 @@ export class TAFActor extends Actor { * This checks and performs all data migrations that the system requires, some * of these are one-time only migrations, others of them will happen every time * an Actor is updated. + * + * The defaulting of options is provided to ensure that the migration doesn't + * cause errors in Foundry v13 */ - static migrateData(data, options) { + static migrateData(data, options = {}) { this.#migrateToAttributeItems(data, options); return super.migrateData(data, options); }; @@ -155,4 +158,30 @@ export class TAFActor extends Actor { }; }; // #endregion Data Migration + + // #region Static API + /** + * Sets the default attributes that are created when a new Actor is created, + * this uses all of the existing values that are a part of the items, it does + * not prompt for default values. + */ + static async setDefaultAttributes(actor) { + if (!game.user.isGM) { return }; + const minifiedData = []; + + const attrs = actor.itemTypes.attribute ?? []; + for (const attr of attrs) { + const raw = attr.toObject(); + minifiedData.push({ + img: raw.img, // doesn't really matter but ¯\_(ツ)_/¯ + name: raw.name, + type: raw.type, + system: raw.system, + }); + }; + + game.settings.set(__ID__, `actorDefaultAttributes`, minifiedData); + ui.notifications.success(_loc(`taf.notifs.success.saved-default-attributes`)); + }; + // #endregion Static API }; diff --git a/module/documents/Item.mjs b/module/documents/Item.mjs new file mode 100644 index 0000000..1a5a42f --- /dev/null +++ b/module/documents/Item.mjs @@ -0,0 +1,8 @@ +export class TAFItem extends foundry.documents.Item { + static getDefaultArtwork(itemData) { + switch (itemData.type) { + case `attribute`: return { img: `icons/svg/jump.svg` }; + }; + return super.getDefaultArtwork(itemData); + }; +}; diff --git a/module/documents/Macro.mjs b/module/documents/Macro.mjs new file mode 100644 index 0000000..3cc3aeb --- /dev/null +++ b/module/documents/Macro.mjs @@ -0,0 +1,38 @@ +export class TAFMacro extends foundry.documents.Macro { + async deleteDialog(options, operation) { + const itemsUsingMacro = new Set(); + + // Check Items on Actors + game.actors.forEach(actor => { + actor.items.forEach(item => { + if (item.system.trigger === this.uuid) { + itemsUsingMacro.add(item.uuid); + }; + }); + }); + + // Check World Items + game.items.forEach(item => { + if (item.system.trigger === this.uuid) { + itemsUsingMacro.add(item.uuid); + }; + }); + + // Modify the dialog arguments + const type = _loc(this.constructor.metadata.label); + const question = _loc(`COMMON.AreYouSure`); + const warning = _loc(`SIDEBAR.DeleteWarning`, { type }); + let content = `

${question} ${warning}

`; + + if (itemsUsingMacro.size) { + const extraInfo = _loc( + `taf.misc.macro-is-in-use`, + { count: itemsUsingMacro.size }, + ); + content += `

${extraInfo}

`; + }; + + options.content = content; + return super.deleteDialog(options, operation); + }; +}; diff --git a/module/hooks/init.mjs b/module/hooks/init.mjs index 54190fc..b06467e 100644 --- a/module/hooks/init.mjs +++ b/module/hooks/init.mjs @@ -13,6 +13,8 @@ import { PlayerData } from "../data/Actor/player.mjs"; // Documents import { TAFActor } from "../documents/Actor.mjs"; import { TAFCombatant } from "../documents/Combatant.mjs"; +import { TAFItem } from "../documents/Item.mjs"; +import { TAFMacro } from "../documents/Macro.mjs"; import { TAFTokenDocument } from "../documents/Token.mjs"; // Settings @@ -24,14 +26,17 @@ import helpers from "../handlebarsHelpers/_index.mjs"; import { Logger } from "../utils/Logger.mjs"; import { registerCustomComponents } from "../apps/elements/_index.mjs"; import { registerSockets } from "../sockets/_index.mjs"; +import { TAFSettingsSidebar } from "../apps/overrides/TAFSettingsSidebar.mjs"; Hooks.on(`init`, () => { Logger.debug(`Initializing`); // #region Documents - CONFIG.Token.documentClass = TAFTokenDocument; CONFIG.Actor.documentClass = TAFActor; CONFIG.Combatant.documentClass = TAFCombatant; + CONFIG.Item.documentClass = TAFItem; + CONFIG.Macro.documentClass = TAFMacro; + CONFIG.Token.documentClass = TAFTokenDocument; // #endregion Documents // #region Data Models @@ -40,6 +45,10 @@ Hooks.on(`init`, () => { CONFIG.Item.dataModels.attribute = AttributeItemData; // #endregion Data Models + // #region App Overrides + CONFIG.ui.settings = TAFSettingsSidebar; + // #endregion App Overrides + // #region Sheets foundry.documents.collections.Actors.registerSheet( __ID__, diff --git a/styles/Apps/PlayerSheet.css b/styles/Apps/PlayerSheet.css index 3442d76..e450389 100644 --- a/styles/Apps/PlayerSheet.css +++ b/styles/Apps/PlayerSheet.css @@ -135,8 +135,8 @@ margin-bottom: 0; .summary { - display: grid; - grid-template-columns: min-content auto 1fr 50px auto; + display: flex; + flex-direction: row; align-items: center; gap: 8px; background: var(--item-card-header-background); @@ -154,6 +154,7 @@ display: flex; flex-direction: column; gap: 4px; + flex-grow: 1; } .name { @@ -164,10 +165,15 @@ opacity: 90%; } + input { + width: 50px; + } + input, button { background: var(--item-card-header-input-background); color: var(--item-card-header-input-colour); text-align: center; + height: 32px; &:disabled { color: var(--item-card-header-disabled-input-colour); @@ -175,14 +181,17 @@ } } - .expand-button { + button { border: none; - aspect-ratio: 1; &:focus-visible { filter: brightness(150%); outline: none; } + } + + .expand-button { + aspect-ratio: 1; &[data-expanded="true"] { rotate: 180deg; diff --git a/styles/Apps/QueryStatus.css b/styles/Apps/QueryStatus.css index 4f45ff4..0cd64e3 100644 --- a/styles/Apps/QueryStatus.css +++ b/styles/Apps/QueryStatus.css @@ -1,4 +1,9 @@ .taf.QueryStatus { + > .window-content { + color: var(--query-status-colour); + background: var(--query-status-background); + } + .user-list { display: flex; flex-direction: column; @@ -11,7 +16,8 @@ display: flex; flex-direction: column; margin: 0; - border: 1px solid rebeccapurple; + color: var(--query-status-user-colour); + background: var(--query-status-user-background); border-radius: 4px; padding: 4px 8px; @@ -22,6 +28,19 @@ /* Same height as the icons used for loading/disconnected */ height: 35px; } + + button { + color: var(--query-status-user-button-colour); + background: var(--query-status-user-button-background); + + &:hover { + background: var(--query-status-user-button-hover-background); + } + + &:focus-visible { + border-color: var(--query-status-user-button-focus); + } + } } } @@ -29,5 +48,23 @@ display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; + + button { + color: var(--query-status-control-colour); + background: var(--query-status-control-background); + + &:hover { + background: var(--query-status-control-hover-background); + } + + &:focus-visible { + border-color: var(--query-status-control-focus); + } + } + } + + button { + border: 2px solid transparent; + outline: none; } } diff --git a/styles/Apps/TAFSettingsSidebar.css b/styles/Apps/TAFSettingsSidebar.css new file mode 100644 index 0000000..010d6b4 --- /dev/null +++ b/styles/Apps/TAFSettingsSidebar.css @@ -0,0 +1,29 @@ +#settings > .system { + .version-info { + display: flex; + justify-content: center; + align-items: center; + flex-direction: row; + gap: 8px; + + .whats-new { + font-size: smaller; + } + } + + .links { + display: flex; + justify-content: center; + align-items: center; + flex-direction: row; + flex-wrap: wrap; + gap: 8px; + list-style-type: none; + padding: 0; + margin: 0; + + li { + margin: 0; + } + } +} diff --git a/styles/elements/div.css b/styles/elements/div.css index b3d1566..6e77ca1 100644 --- a/styles/elements/div.css +++ b/styles/elements/div.css @@ -3,7 +3,6 @@ display: inline flex; color: var(--chip-colour); background: var(--chip-background); - border: 1px solid var(--chip-border-colour); border-radius: 4px; .key { diff --git a/styles/elements/prose-mirror.css b/styles/elements/prose-mirror.css index 6f257f0..138fb7a 100644 --- a/styles/elements/prose-mirror.css +++ b/styles/elements/prose-mirror.css @@ -1,7 +1,7 @@ .taf > .window-content prose-mirror { color: var(--prosemirror-colour); - --table-row-color-odd: var(--steel-550); - --table-row-color-even: var(--steel-600); + --table-row-color-odd: var(--prosemirror-table-row-color-odd); + --table-row-color-even: var(--prosemirror-table-row-color-even); background: var(--prosemirror-background); gap: 0; @@ -44,12 +44,12 @@ pre:has(> code), code:not(pre > code) { padding: 4px 6px; - background: var(--steel-700); - color: var(--steel-200); + background: var(--prosemirror-code-background); + color: var(--prosemirror-code-colour); } blockquote { color: inherit; - border-left: 2px solid var(--steel-200); + border-left: 2px solid var(--prosemirror-blockquote-border); } } diff --git a/styles/main.css b/styles/main.css index 627b546..682b25d 100644 --- a/styles/main.css +++ b/styles/main.css @@ -31,3 +31,4 @@ @import url("./Apps/PlayerSheet.css") layer(apps); @import url("./Apps/QueryStatus.css") layer(apps); @import url("./Apps/TAFDocumentSheetConfig.css") layer(apps); +@import url("./Apps/TAFSettingsSidebar.css") layer(apps); diff --git a/styles/themes/dark.css b/styles/themes/dark.css index 97cf099..5fa22c7 100644 --- a/styles/themes/dark.css +++ b/styles/themes/dark.css @@ -7,6 +7,11 @@ --prosemirror-menu-colour: var(--steel-100); --prosemirror-menu-background: var(--steel-750); --prosemirror-divider-colour: var(--steel-250); + --prosemirror-table-row-color-odd: var(--steel-550); + --prosemirror-table-row-color-even: var(--steel-600); + --prosemirror-code-colour: var(--steel-200); + --prosemirror-code-background: var(--steel-700); + --prosemirror-blockquote-border: var(--steel-200); --spinner-outer-colour: white; --spinner-inner-colour: #FF3D00; @@ -81,10 +86,23 @@ --attribute-sheet-toggle-slider-enabled-colour: var(--item-sheet-toggle-slider-enabled-colour); --attribute-sheet-toggle-slider-disabled-colour: var(--item-sheet-toggle-slider-disabled-colour); + /* Query Status App Variables */ + --query-status-colour: var(--steel-100); + --query-status-background: var(--steel-800); + --query-status-user-colour: var(--steel-100); + --query-status-user-background: var(--steel-700); + --query-status-user-button-colour: var(--steel-100); + --query-status-user-button-background: var(--steel-600); + --query-status-user-button-focus: var(--zinc-100); + --query-status-user-button-hover-background: var(--steel-650); + --query-status-control-colour: var(--steel-100); + --query-status-control-background: var(--steel-600); + --query-status-control-focus: var(--zinc-100); + --query-status-control-hover-background: var(--steel-650); + /* Chip Variables */ - --chip-colour: #fff7ed; - --chip-background: #2b3642; - --chip-value-colour: #fff7ed; - --chip-value-background: #10161d; - --chip-border-colour: var(--chip-value-background); + --chip-colour: var(--steel-100); + --chip-background: var(--steel-600); + --chip-value-colour: var(--steel-100); + --chip-value-background: var(--steel-500); } diff --git a/styles/themes/light.css b/styles/themes/light.css index dd45d6b..ef66d4e 100644 --- a/styles/themes/light.css +++ b/styles/themes/light.css @@ -1,16 +1,108 @@ .theme-light { - --prosemirror-background: white; + /* Prose Mirror Elements */ + --prosemirror-colour: var(--zinc-700); + --prosemirror-background: var(--zinc-300); + --prosemirror-toggle-background: var(--zinc-350); + --prosemirror-toggle-hover-background: var(--zinc-400); + --prosemirror-menu-colour: var(--zinc-700); + --prosemirror-menu-background: var(--zinc-350); + --prosemirror-divider-colour: var(--zinc-600); + --prosemirror-table-row-color-odd: var(--zinc-350); + --prosemirror-table-row-color-even: var(--zinc-400); + --prosemirror-code-colour: var(--zinc-800); + --prosemirror-code-background: var(--zinc-400); + --prosemirror-blockquote-border: var(--zinc-500); - --spinner-outer-colour: black; + --spinner-outer-colour: var(--steel-600); --spinner-inner-colour: #FF3D00; - --tab-button-active: rebeccapurple; - --tab-button-hover-bg: var(--color-light-3); + --toggle-background-colour: var(--zinc-350); + --toggle-slider-unchecked-colour: red; + --toggle-slider-checked-colour: green; + + --tab-nav-divider-colour: var(--zinc-300); + --tab-button-colour: var(--zinc-550); + --tab-button-focus-colour: var(--zinc-750); + --tab-button-hover-colour: var(--zinc-800); + --tab-button-active-colour: var(--zinc-900); + + /* Actor Sheet Variables */ + --actor-sheet-colour: var(--zinc-800); + --actor-sheet-background: var(--zinc-200); + --actor-sheet-divider-colour: var(--zinc-300); + --actor-sheet-header-colour: var(--zinc-800); + --actor-sheet-header-background:var(--zinc-100); + --actor-sheet-header-input-colour: var(--zinc-800); + --actor-sheet-header-input-background: var(--zinc-250); + + --inventory-summary-colour: var(--zinc-600); + --inventory-summary-background: var(--zinc-100); + --inventory-input-colour: var(--zinc-700); + --inventory-input-background: var(--zinc-250); + --inventory-input-disabled-colour: var(--zinc-500); + + --embedded-list-header-colour: var(--inventory-summary-colour); + --embedded-list-header-background: var(--inventory-summary-background); + --embedded-list-header-input-colour: var(--inventory-input-colour); + --embedded-list-header-input-background: var(--inventory-input-background); + + --attribute-colour: var(--zinc-700); + --attribute-background: var(--zinc-300); + --attribute-input-colour: var(--zinc-700); + --attribute-input-background: var(--zinc-350); + --attribute-input-focus-colour: var(--zinc-700); + --attribute-button-active-background: var(--zinc-400); + --attribute-disabled-input-colour: var(--zinc-500); + + --item-card-colour: var(--zinc-800); + --item-card-background: var(--zinc-300); + --item-card-header-colour: var(--zinc-800); + --item-card-header-background: var(--zinc-300); + --item-card-header-input-colour: var(--zinc-700); + --item-card-header-input-background: var(--zinc-350); + --item-card-header-input-focus-colour: var(--zinc-700); + --item-card-header-disabled-input-colour: var(--zinc-700); + + /* Item Sheet Variables */ + --item-sheet-colour: var(--zinc-800); + --item-sheet-background: var(--zinc-200); + --item-sheet-divider-colour: var(--zinc-300); + --item-sheet-input-colour: var(--zinc-800); + --item-sheet-input-background: var(--zinc-300); + --item-sheet-toggle-slider-enabled-colour: green; + --item-sheet-toggle-slider-disabled-colour: red; + --item-sheet-description-menu-colour: var(--zinc-800); + --item-sheet-description-menu-background: var(--zinc-350); + --item-sheet-description-content-background: var(--zinc-300); + + /* Attribute Sheet Variables */ + --attribute-sheet-colour: var(--item-sheet-colour); + --attribute-sheet-background: var(--item-sheet-background); + --attribute-sheet-divider-colour: var(--item-sheet-divider); + --attribute-sheet-hint-colour: var(--zinc-550); + --attribute-sheet-input-colour: var(--item-sheet-input-colour); + --attribute-sheet-input-background: var(--item-sheet-input-background); + --attribute-sheet-disabled-input-colour: var(--zinc-550); + --attribute-sheet-toggle-slider-enabled-colour: var(--item-sheet-toggle-slider-enabled-colour); + --attribute-sheet-toggle-slider-disabled-colour: var(--item-sheet-toggle-slider-disabled-colour); + + /* Query Status App Variables */ + --query-status-colour: var(--zinc-800); + --query-status-background: var(--zinc-200); + --query-status-user-colour: var(--zinc-800); + --query-status-user-background: var(--zinc-300); + --query-status-user-button-colour: var(--steel-700); + --query-status-user-button-background: var(--zinc-350); + --query-status-user-button-focus: var(--steel-700); + --query-status-user-button-hover-background: var(--zinc-400); + --query-status-control-colour: var(--steel-700); + --query-status-control-background: var(--zinc-350); + --query-status-control-focus: var(--steel-700); + --query-status-control-hover-background: var(--zinc-400); /* Chip Variables */ - --chip-colour: #18181b; - --chip-background: #fafafa; - --chip-value-colour: #18181b; - --chip-value-background: #d4d4d8aa; - --chip-border-colour: var(--chip-value-background); + --chip-colour: ; + --chip-background: ; + --chip-value-colour: ; + --chip-value-background: ; } diff --git a/system.json b/system.json index a301e22..22a301f 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "taf", "title": "Text-Based Actors", "description": "An intentionally minimalist system that enables you to play rules-light games without getting in your way!", - "version": "3.0.0", + "version": "3.0.2", "download": "", "manifest": "", "url": "https://git.varify.ca/Foundry/taf", @@ -15,7 +15,8 @@ { "name": "Oliver" } ], "esmodules": [ - "module/main.mjs" + "module/main.mjs", + "dev/dev.mjs" ], "styles": [ { @@ -54,6 +55,7 @@ }, "socket": true, "flags": { + "forgejo_api": "https://git.varify.ca/api/v1", "hotReload": { "extensions": ["css", "hbs", "json", "js", "mjs", "svg"], "paths": ["templates", "langs", "styles", "module", "assets"] diff --git a/templates/PlayerSheet/tabs/attributes/attribute.hbs b/templates/PlayerSheet/tabs/attributes/attribute.hbs index ac84637..f2123ca 100644 --- a/templates/PlayerSheet/tabs/attributes/attribute.hbs +++ b/templates/PlayerSheet/tabs/attributes/attribute.hbs @@ -10,7 +10,7 @@ type="button" data-action="executeTrigger" > - Roll + {{ localize "taf.misc.roll" }} {{/if}} {{ name }} {{ weight }} + {{#if trigger}} + + {{/if}} +

+ {{ system.title }} +

+
+ + {{localize "taf.misc.version" version=system.version}} + + + {{localize "taf.misc.whats-new"}} + +
+ +