diff --git a/.cz.yaml b/.cz.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0365eedb58f48ba14ff71111d1819f352d5f50b0 --- /dev/null +++ b/.cz.yaml @@ -0,0 +1,107 @@ +commitizen: + annotated_tag: true + bump_message: "bump: release $current_version \u2192 $new_version" + changelog_file: CHANGELOG.md + customize: + bump_map: + break: MAJOR + bugfix: PATCH + docs: PATCH + feature: MINOR + hotfix: PATCH + perf: MINOR + refactor: PATCH + style: PATCH + test: MINOR + bump_pattern: ^(break|feature|bugfix|hotfix|docs|performance|refactor|test|style) + change_type_map: + break: Breaking Changes + bugfix: Fix + docs: Cosmetic + feature: Feature + hotfix: Fix + performance: Feature + refactor: Cosmetic + style: Cosmetic + test: Test + change_type_order: + - BREAKING CHANGE + - feature + - performance + - bugfix + - hotfix + - test + - refactor + - docs + - style + changelog_pattern: ^(break|bump|feature|bugfix|hotfix|docs|performance|refactor|test|style)?(!)? + commit_parser: ^(?P<change_type>break|feature|bugfix|hotfix|docs|performance|refactor|test|style):\s(?P<message>.*)? + example: 'feature: this feature enable customize through config file' + message_template: '{{ change_type }}:{% if jira_ticket %} [{{ jira_ticket }}]{% + endif %} {{ message }}{% if body %} + + + {{ body }}{% endif %}' + questions: + - choices: + - name: 'feature: New feature' + value: feature + - name: 'bugfix: Bugfix' + value: bugfix + - name: 'hotfix: Emergency fix' + value: hotfix + - name: 'test: Change to tests' + value: test + - name: 'docs: Change to documentation' + value: docs + - name: 'refactor: Code refactoring' + value: refactor + - name: 'performance: Performance improvement' + value: performance + - name: 'style: Change to the code formatting' + value: style + - name: 'break: BREAKING CHANGE - BREAKS BACKWARDS COMPATIBILITY AND WILL + CREATE A NEW MAJOR VERSION' + value: break + message: Select the type of change you are committing + name: change_type + type: list + - message: 'Commit Title:' + name: message + type: input + - message: 'JIRA Ticket (leave empty to skip):' + name: jira_ticket + type: input + - message: 'Longer commit message (one line - leave empty to skip):' + name: body + type: input + schema: '<type>: <body>' + schema_pattern: (break|bump|feature|bugfix|hotfix|docs|performance|refactor|test|style):(\s.*) + name: cz_customize + style: + - - qmark + - fg:#ff9d00 bold + - - question + - bold + - - answer + - fg:#ff9d00 bold + - - pointer + - fg:#ff9d00 bold + - - highlighted + - fg:#ff9d00 bold + - - selected + - fg:#cc5454 + - - separator + - fg:#cc5454 + - - instruction + - '' + - - text + - '' + - - disabled + - fg:#858585 italic + tag_format: $major.$minor.$patch + update_changelog_on_bump: true + use_shortcuts: true + version: 1.3.9 + version_files: + - system.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..508f9728e652b8daf642dca0ab8af662971e2cc7 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,59 @@ +image: git.lynxcore.org/operations/gitlab/docker_images/pre_commit:latest + +stages: + - changelog + - release + +'bump version and generate changelog': + tags: ['k8'] + stage: changelog + variables: + CI_SKIP: '-o ci.skip' + before_script: + - git config --global user.email "root@lynxcore.org" + - git config --global user.name "gitlab-ci" + script: + - git remote set-url origin https://gitlab-ci:${PRIVATE_GITLAB_TOKEN}@${CI_REPOSITORY_URL#*@} + - 'exists=`git show-ref refs/heads/$CI_DEFAULT_BRANCH` && if [ -n "$exists" ]; then git branch -D $CI_DEFAULT_BRANCH; fi' + - git checkout -b $CI_DEFAULT_BRANCH + - git fetch --all --tags + - cz bump --changelog + - git push $CI_SKIP origin $CI_DEFAULT_BRANCH:$CI_COMMIT_REF_NAME + - git push origin $(cz version -p) -o ci.variable="BUMP=1" # THIS IS WHERE THE MAGIC HAPPENS + dependencies: [] + needs: [] + # runs only on master if a .cz.yaml exists and env var BUMP is not 1 + # does not run on feature branches, merge requests or tags + rules: + - if: '$BUMP != "1" && ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH)' + exists: + - .cz.yaml + allow_failure: true + when: on_success + - if: '$CI_MERGE_REQUEST_ID' + when: never + - if: '$CI_COMMIT_TAG' + when: never + +'release new version': + tags: ['k8'] + stage: release + before_script: + - git config --global user.email "admin@senec.com" + - git config --global user.name "gitlab-ci" + script: + - export TAG=$(cz version -p) + - export DESCR=$(cz changelog $TAG --dry-run) + - echo $TAG + - echo $DESCR + - release-cli create --name "Release $TAG" --description "$DESCR" --tag-name "$TAG" --ref "$CI_COMMIT_SHA" + cache: + key: pre-commit + paths: + - $HOME/.cache/pre-commit + # runs only on tagged commits on master + rules: + - if: '$CI_COMMIT_TAG' + when: manual + - if: '$CI_MERGE_REQUEST_ID' + when: never diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97beac73647027d02f7a28ad0ded6ef6928d6f56..840732964d2b86372096dca12e81d2fea6d0fe5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,8 +14,8 @@ repos: stages: [commit] - id: trailing-whitespace stages: [commit] - - repo: https://github.com/prettier/prettier - rev: 2.0.4 + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v2.7.1 hooks: - id: prettier stages: [commit] @@ -25,3 +25,8 @@ repos: hooks: - id: eslint args: [--fix] + - repo: https://github.com/commitizen-tools/commitizen + rev: v2.28.0 + hooks: + - id: commitizen + stages: [commit-msg] diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bb5bcd06565de53053cd2c03b027b38478ec3e7..0912d77b606124a25e180ceab7a5f5380387cfb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,176 +1,27 @@ -# Changelog +## Unreleased -All notable changes to this project will be documented in this file. +## 1.3.9 (2022-01-16) -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.3.6 (2021-05-16) -## [Unreleased] +## 1.3.5 (2021-04-05) -## [v1.3.5] - 2021-04-05 +## 1.3.4 (2021-04-04) -## Changed +## 1.3.3 (2021-04-04) -- All compendium icons +## 1.3.2 (2021-04-03) -## [v1.3.4] - 2021-04-04 +## 1.3.1 (2021-04-03) -## Fixed +## 1.3.0 (2021-03-29) -- Tooltip disabled in edit mode for advantages/disadvantages +## 1.2.2 (2021-03-28) -## [v1.3.3] - 2021-04-04 +## 1.1.0 (2021-03-20) -## Changed +## 1.0.1 (2021-03-19) -- Set correct defaults for char and item sheets +## 1.0.0 (2021-03-18) -## [v1.3.2] - 2021-04-03 - -## Added - -- Skills list can now be fulltext filtered - -## [v1.3.1] - 2021-04-03 - -## Changed - -- Gear List now takes up most of the column -- Move Advantages/Disadvantages to Gear List -- Move Secondary Attributes below Sidebar -- Redesign Gear List entries - -## [v1.3.0] - 2021-03-29 - -## Added - -- All core ruleset weapons -- All core ruleset armor -- All core ruleset items -- All core ruleset advantages -- All core ruleset disadvantages -- All GM screen Lookup Tables -- All SM screen Rollable Tables - -## [v1.2.1] - 2021-03-28 - -## Added - -- Various item characteristics - -## Changed - -- Item Sheets redesigned -- Some functionality in Char sheet - -## [v1.2.1] - 2021-03-27 - -## Changed - -- Complete Refactor - -## [v1.2.0] - 2021-03-25 - -## Added - -- Damage bonus gets applied based on weapon type (full on melee, half on thrown, none on ranged) (#10) -- Armor calculations (#10) -- Weapon Skill dropdowns for Weapons (#17) -- Attribute dropdown for Skills (#17) -- Edit Mode (#17) -- Sheet changes background on negative Mental Balance (#17) - -### Changed - -- Redesigned Charsheets (#1, #2, #17, #9, #8) -- Moved most custom functions to `helpers.js` (#15) - -## [v1.0.0] - 2021-03-17 - -### Changed - -- Base Systems complete -- First public release - -## [v0.0.24] - 2021-03-16 - -### Changed - -- Bugfix - -## [v0.0.23] - 2021-03-16 - -### Changed - -- Bugfix - -## [v0.0.22] - 2021-03-16 - -### Added - -- German localization - -### Changed - -- Wounds now track correctly -- Cleanup of interface and some files -- Finished localization - -## [v0.0.21] - 2021-03-16 - -### Changed - -- Bugfix - -## [v0.0.20] - 2021-03-16 - -### Changed - -- Add localization for character sheet template -- Add english localization -- Add localization file template - -## [v0.0.19] - 2021-03-16 - -### Changed - -- Bugfix - -## [v0.0.18] - 2021-03-15 - -### Changed - -- Bloodify CSS - -## [v0.0.17] - 2021-03-15 - -### Added - -- Custom CSS - -## [v0.0.16] - 2021-03-15 - -### Added - -- Testpack for skills -- Empty packs for weapons -- Empty packs for advantages -- Empty packs for disadvantages - -## [v0.0.15] - 2021-03-15 - -### Added - -- Changelog (CHANGELOG.md) -- Readme (README.md) -- Character Sheet -- Item Sheet -- Weapon Sheet -- Skill Sheet -- Advantage Sheet -- Disadvantage Sheet -- Custom CSS - -### Changed - -### Removed +## 0.0.22 (2021-03-16) diff --git a/module/actor/actor.js b/module/actor/actor.js index 48870fdf89d81d5435a2f30c33271905f94a9787..9081cbd9bd31b1712f931f31a20442bd4ee60a4c 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -14,20 +14,36 @@ import { * @extends {Actor} */ export class Kult2eActor extends Actor { + /** @override */ + prepareData() { + // Prepare data for the actor. Calling the super version of this executes + // the following, in order: data reset (to clear active effects), + // prepareBaseData(), prepareEmbeddedDocuments() (including active effects), + // prepareDerivedData(). + super.prepareData(); + } + /** - * Augment the basic actor data with additional dynamic data. + * @override + * Prepare data related to this Document itself, before any embedded Documents or derived data is computed. + * @memberof ClientDocumentMixin# */ - prepareData() { - if (this.data.type === 'character') + prepareBaseData() { + // Data modifications in this step occur before processing embedded + // documents or derived data. + } + + /** @override */ + prepareDerivedData() { + if (this.system.type === 'character') CONST.DEFAULT_TOKEN = 'systems/kult2e/assets/icons/svg/characters/character.svg'; - if (this.data.type === 'npc') + if (this.system.type === 'npc') CONST.DEFAULT_TOKEN = 'systems/kult2e/assets/icons/svg/characters/npc.svg'; - if (this.data.type === 'monster') + if (this.system.type === 'monster') CONST.DEFAULT_TOKEN = 'systems/kult2e/assets/icons/svg/characters/monster.svg'; - super.prepareData(); - const actorData = this.data; - const data = actorData.data; + const actorData = this; + const data = actorData.system; const flags = actorData.flags; // Make separate methods for each Actor type (character, npc, etc.) to keep @@ -37,28 +53,28 @@ export class Kult2eActor extends Actor { if (actorData.type === 'monster') this._prepareMonsterData(actorData); } - /** - * Prepare Character type specific data - */ + /* + * Prepare Character type specific data + */ _prepareCharacterData(actorData) { - const data = actorData.data; - actorData.data.derived = {}; + actorData.system.derived = {}; + const data = actorData.system; - actorData.data.derived.movement = getMovement(data); - actorData.data.derived.initiative_bonus = getInitiativeBonus(data); - actorData.data.derived.load_capacity = getLoadCapacity(data); - actorData.data.derived.endurance = getEndurance(data); - actorData.data.derived.no_of_actions = getNoOfActions(data); - actorData.data.derived.damage_bonus = getDamageBonus(data); - actorData.data.derived.mental_balance = getMentalBalance(actorData); - actorData.data.wounds = getWoundLevels(data); + actorData.system.derived.movement = getMovement(data); + actorData.system.derived.initiative_bonus = getInitiativeBonus(data); + actorData.system.derived.load_capacity = getLoadCapacity(data); + actorData.system.derived.endurance = getEndurance(data); + actorData.system.derived.no_of_actions = getNoOfActions(data); + actorData.system.derived.damage_bonus = getDamageBonus(data); + actorData.system.derived.mental_balance = getMentalBalance(actorData); + actorData.system.wounds = getWoundLevels(data); } _prepareNpcData(actorData) { - const data = actorData.data; + const data = actorData.system; } _prepareMonsterData(actorData) { - const data = actorData.data; + const data = actorData.system; } } diff --git a/module/actor/character-sheet.js b/module/actor/character-sheet.js index 906489a68d177811c866d7f10996a44e6466748a..9f26e3d0d0467c79304f82cf4824b62cb6403028 100644 --- a/module/actor/character-sheet.js +++ b/module/actor/character-sheet.js @@ -39,18 +39,43 @@ export class Kult2eCharacterSheet extends ActorSheet { /** @override */ getData() { - const data = super.getData(); + // Retrieve the data structure from the base sheet. You can inspect or log + // the context variable to see the structure, but some key properties for + // sheets are the actor object, the data object, whether or not it's + // editable, the items array, and the effects array. + var tmp_context = super.getData(); + tmp_context.data = translateData(tmp_context.data); + const context = tmp_context; - data.dtypes = ['String', 'Number', 'Boolean']; - data.data = translateData(data.data); + // Use a safe clone of the actor data for further operations. + const actorData = this.actor.toObject(false); - // Prepare items. - this._prepareCharacterItems(data); + // Add the actor's data to context.data for easier access, as well as flags. + context.system = actorData.system; + context.flags = actorData.flags; - return data; + // Prepare character data and items. + if (actorData.type == 'character') { + this._prepareCharacterItems(context.actor); + } + + // Prepare NPC data and items. + if (actorData.type == 'npc') { + this._prepareCharacterItems(context.actor); + } + + // Add roll data for TinyMCE editors. + context.rollData = this.object.getRollData(); + + // Prepare active effects + //context.effects = prepareActiveEffectCategories(this.actor.effects); + console.log(context); + + return context; } + /** * Organize and classify Items for Character sheets. * @@ -58,8 +83,8 @@ export class Kult2eCharacterSheet extends ActorSheet { * * @return {undefined} */ - _prepareCharacterItems(sheetData) { - const actorData = sheetData.actor; + _prepareCharacterItems(context) { + const actorData = context.actor; // Initialize containers. const gear = []; @@ -71,8 +96,8 @@ export class Kult2eCharacterSheet extends ActorSheet { // Iterate through items, allocating to containers // let totalWeight = 0; - for (let i of sheetData.items) { - let item = i.data; + for (let i of context.items) { + let item = i.system; i.img = i.img || DEFAULT_TOKEN; // Append to gear. if (i.type === 'item') { @@ -82,44 +107,44 @@ export class Kult2eCharacterSheet extends ActorSheet { // append to armor if (i.type === 'armor') { armor.push(i); - if (i.data.hit_head) { - actorData.data.armor.head.ranged += parseInt(i.data.ranged.value); - actorData.data.armor.head.melee += parseInt(i.data.melee.value); - actorData.data.armor.head.fire += parseInt(i.data.fire.value); - actorData.data.armor.head.abc += parseInt(i.data.abc.value); + if (i.system.hit_head) { + context.system.armor.head.ranged += parseInt(i.system.ranged.value); + context.system.armor.head.melee += parseInt(i.system.melee.value); + context.system.armor.head.fire += parseInt(i.system.fire.value); + context.system.armor.head.abc += parseInt(i.system.abc.value); } - if (i.data.hit_torso) { - actorData.data.armor.torso.ranged += parseInt(i.data.ranged.value); - actorData.data.armor.torso.melee += parseInt(i.data.melee.value); - actorData.data.armor.torso.fire += parseInt(i.data.fire.value); - actorData.data.armor.torso.abc += parseInt(i.data.abc.value); + if (i.system.hit_torso) { + context.system.armor.torso.ranged += parseInt(i.system.ranged.value); + context.system.armor.torso.melee += parseInt(i.system.melee.value); + context.system.armor.torso.fire += parseInt(i.system.fire.value); + context.system.armor.torso.abc += parseInt(i.system.abc.value); } - if (i.data.hit_arms) { - actorData.data.armor.arms.ranged += parseInt(i.data.ranged.value); - actorData.data.armor.arms.melee += parseInt(i.data.melee.value); - actorData.data.armor.arms.fire += parseInt(i.data.fire.value); - actorData.data.armor.arms.abc += parseInt(i.data.abc.value); + if (i.system.hit_arms) { + context.system.armor.arms.ranged += parseInt(i.system.ranged.value); + context.system.armor.arms.melee += parseInt(i.system.melee.value); + context.system.armor.arms.fire += parseInt(i.system.fire.value); + context.system.armor.arms.abc += parseInt(i.system.abc.value); } - if (i.data.hit_legs) { - actorData.data.armor.legs.ranged += parseInt(i.data.ranged.value); - actorData.data.armor.legs.melee += parseInt(i.data.melee.value); - actorData.data.armor.legs.fire += parseInt(i.data.fire.value); - actorData.data.armor.legs.abc += parseInt(i.data.abc.value); + if (i.system.hit_legs) { + context.system.armor.legs.ranged += parseInt(i.system.ranged.value); + context.system.armor.legs.melee += parseInt(i.system.melee.value); + context.system.armor.legs.fire += parseInt(i.system.fire.value); + context.system.armor.legs.abc += parseInt(i.system.abc.value); } } // Append to weapons. if (i.type === 'weapon') { // we need to find the skill score for our weapon - for (let [k, v] of sheetData.items.entries()) { + for (let [k, v] of context.items.entries()) { if ( v.type.toLowerCase() == 'skill' && - v.name.toLowerCase() == i.data.skill.value.toLowerCase() + v.name.toLowerCase() == i.system.skill.value.toLowerCase() ) { - i.data.score.value = v.data.score.value; + i.system.score.value = v.system.score.value; } } weapons.push(i); @@ -139,12 +164,12 @@ export class Kult2eCharacterSheet extends ActorSheet { } // Assign and return - actorData.gear = gear; - actorData.armor = armor; - actorData.weapons = weapons; - actorData.skills = skills; - actorData.advantages = advantages; - actorData.disadvantages = disadvantages; + context.gear = gear; + context.armor = armor; + context.weapons = weapons; + context.skills = skills; + context.advantages = advantages; + context.disadvantages = disadvantages; } /* -------------------------------------------- */ @@ -168,17 +193,24 @@ export class Kult2eCharacterSheet extends ActorSheet { // Update Inventory Item html.find('.item-edit').click((ev) => { const li = $(ev.currentTarget).parents('.item'); - const item = this.actor.getOwnedItem(li.data('itemId')); + const item = this.actor.items.get(li.data('itemId')); item.sheet.render(true); }); // Delete Inventory Item - html.find('.item-delete').click((ev) => { - const li = $(ev.currentTarget).parents('.item'); - this.actor.deleteOwnedItem(li.data('itemId')); + //html.find('.item-delete').click((ev) => { + // const li = $(ev.currentTarget).parents('.item'); + // this.actor.deleteEmbeddedDocuments("advantage", [li.data('itemId')]); + // li.slideUp(200, () => this.render(false)); + //}); + html.find('.item-delete').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + const item = this.actor.items.get(li.data("itemId")); + item.delete(); li.slideUp(200, () => this.render(false)); }); + // Drag events for macros. if (this.actor.owner) { let handler = (ev) => this._onDragStart(ev); @@ -219,7 +251,7 @@ export class Kult2eCharacterSheet extends ActorSheet { * @param {Event} event The originating click event * @private */ - _onItemCreate(event) { + async _onItemCreate(event) { event.preventDefault(); const header = event.currentTarget; // Get the type of item to create. @@ -239,7 +271,8 @@ export class Kult2eCharacterSheet extends ActorSheet { delete itemData.data['type']; // Finally, create the item! - return this.actor.createOwnedItem(itemData); + //return this.actor.createEmbeddedDocuments(itemData); // v7 + return await Item.create(itemData, {parent: this.actor}); } /** @@ -247,7 +280,7 @@ export class Kult2eCharacterSheet extends ActorSheet { * @param {Event} event The originating click event * @private */ - _onRoll(event) { + async _onRoll(event) { event.preventDefault(); if (event.target.nodeName == 'INPUT') { return; @@ -271,10 +304,10 @@ export class Kult2eCharacterSheet extends ActorSheet { var [weapon, formula, message] = getWeaponDamage(dataset, this.actor); } - var roll = new Roll(formula, this.actor.data.data); - var result = roll.evaluate(); + var roll = new Roll(formula, this.actor.system); + var result = await roll.evaluate({async:true}); var total = result.total; - var modifier = result.terms[0].marginSuccess; + var modifier = result.terms[0].options.marginSuccess; var status = ''; if (weapon) { @@ -294,7 +327,7 @@ export class Kult2eCharacterSheet extends ActorSheet { _calculateWounds(event) { event.preventDefault(); const dataset = event.currentTarget.dataset; - const actorData = this.actor.data.data; + const actorData = this.actor.system; const wounds = actorData.wounds; const sheetDocument = document.getElementById(`actor-${this.actor.id}`); @@ -328,7 +361,7 @@ export class Kult2eCharacterSheet extends ActorSheet { event.preventDefault(); let element = event.currentTarget; let itemId = element.closest('.item').dataset.itemId; - let item = this.actor.getOwnedItem(itemId); + let item = this.actor.items.get(itemId); let field = element.dataset.field; return item.update({ @@ -347,14 +380,14 @@ export class Kult2eCharacterSheet extends ActorSheet { } _toggleEditMode(event, data) { - this.actor.update({ 'data.mode': !this.actor.data.data.mode }); + this.actor.update({ 'data.mode': !this.actor.system.mode }); } _toggleCheckbox(event) { event.preventDefault(); let element = event.currentTarget; let itemId = element.closest('.item').dataset.itemId; - let item = this.actor.getOwnedItem(itemId); + let item = this.actor.items.get(itemId); let field = element.dataset.field; if (eval(element.dataset.whatever)) { diff --git a/module/helpers.js b/module/helpers.js index 3813ccfaaa71dc591990a26562d74ca6a03aaebf..35236fb3e148579e89d0883068b1004125d00b4f 100644 --- a/module/helpers.js +++ b/module/helpers.js @@ -128,8 +128,8 @@ function registerHandlebarHelpers() { Handlebars.registerHelper('attributes', (actor, skill) => { let template = ''; - for (let [key, attr] of Object.entries(actor.data.primary)) { - if (attr.label === skill.data.attribute.value) { + for (let [key, attr] of Object.entries(actor.system.primary)) { + if (attr.label === skill.system.attribute.value) { template = `${template}<option selected="selected">${attr.label}</option>`; } else { template = `${template}<option>${attr.label}</option>`; @@ -144,8 +144,8 @@ function registerHandlebarHelpers() { let template = ''; for (let [key, attr] of Object.entries(actor.skills)) { - if (attr.data.wpn.value) { - if (attr.name === weapon.data.skill.value) { + if (attr.system.wpn.value) { + if (attr.name === weapon.system.skill.value) { template = `${template}<option value="${attr.name}" selected="selected">${attr.name}</option>`; } else { template = `${template}<option value="${attr.name}">${attr.name}</option>`; @@ -153,8 +153,6 @@ function registerHandlebarHelpers() { } } - console.log(weapon.data.skill); - return template; }); @@ -168,7 +166,7 @@ function registerHandlebarHelpers() { localization[2] = game.i18n.localize(KULT2E.weapon_types['ranged']); for (var i = 0; i < 3; i++) { - if (weapon.data.type.value == i) { + if (weapon.system.type.value == i) { template += `<option selected value="${i}">${localization[i]}</option>`; } else { template += `<option value="${i}">${localization[i]}</option>`; @@ -316,20 +314,20 @@ function getMentalBalance(actorData) { var adv = 0; var dis = 0; - for (let [k, v] of actorData.items.entries()) { + for (let [k, v] of actorData.collections.items.toObject().entries()) { if (v.type.toLowerCase() === 'disadvantage') { - dis = dis + v.data.cost.value; + dis = dis + v.system.cost.value; } if (v.type.toLowerCase() === 'advantage') { - adv = adv + v.data.cost.value; + adv = adv + v.system.cost.value; } } if (adv - dis < 0) { - actorData.data.mb_negative = true; + actorData.system.mb_negative = true; } else { - actorData.data.mb_negative = false; + actorData.system.mb_negative = false; } return adv - dis; @@ -337,12 +335,12 @@ function getMentalBalance(actorData) { function translateData(data) { // translate strings that get looped in sheet - for (let [key, attr] of Object.entries(data.primary)) { + for (let [key, attr] of Object.entries(data.system.primary)) { attr.label = game.i18n.localize(KULT2E.ability_labels[key]); attr.description = game.i18n.localize(KULT2E.ability_descr[key]); } - for (let [key, level] of Object.entries(data.wounds)) { + for (let [key, level] of Object.entries(data.system.wounds)) { level.label = game.i18n.localize(KULT2E.wound_labels[key]); level.description = game.i18n.localize(KULT2E.wound_descr[key]); } @@ -361,10 +359,10 @@ function getWeaponDamage(dataset, actor) { if (weapon.data.type.value === '0') { // melee - full damage bonus - var formula = `${dataset.roll}+${actor.data.data.derived.damage_bonus}`; + var formula = `${dataset.roll}+${actor.system.derived.damage_bonus}`; } else if (weapon.data.type.value === '1') { // thrown - half damage bonus - let dmg = actor.data.data.derived.damage_bonus / 2; + let dmg = actor.systemderived.damage_bonus / 2; var formula = `${dataset.roll}+${dmg}`; } diff --git a/module/item/item.js b/module/item/item.js index 7c574d95fb6685b26fffcfcb4061747a51c1cbde..f36d94d9064f55aa1b39e9d811a1f4e8e357193d 100644 --- a/module/item/item.js +++ b/module/item/item.js @@ -9,21 +9,21 @@ export class Kult2eItem extends Item { * Augment the basic Item data model with additional dynamic data. */ prepareData() { - if (this.data.type === 'skill') CONST.DEFAULT_TOKEN = 'assets/icons/svg/skills/str.svg'; - if (this.data.type === 'weapon') + if (this.system.type === 'skill') CONST.DEFAULT_TOKEN = 'assets/icons/svg/skills/str.svg'; + if (this.system.type === 'weapon') CONST.DEFAULT_TOKEN = 'assets/icons/svg/weapons/pistol-gun.svg'; - if (this.data.type === 'armor') CONST.DEFAULT_TOKEN = 'assets/icons/svg/armor/armor.svg'; - if (this.data.type === 'advantage') + if (this.system.type === 'armor') CONST.DEFAULT_TOKEN = 'assets/icons/svg/armor/armor.svg'; + if (this.system.type === 'advantage') CONST.DEFAULT_TOKEN = 'assets/icons/svg/balance/advantage.svg'; - if (this.data.type === 'disadvantage') + if (this.system.type === 'disadvantage') CONST.DEFAULT_TOKEN = 'assets/icons/svg/balance/disadvantage.svg'; - if (this.data.type === 'item') CONST.DEFAULT_TOKEN = 'assets/icons/svg/items/misc.svg'; + if (this.system.type === 'item') CONST.DEFAULT_TOKEN = 'assets/icons/svg/items/misc.svg'; super.prepareData(); // Get the Item's data - const itemData = this.data; - const actorData = this.actor ? this.actor.data : {}; - const data = itemData.data; + const itemData = this.system; + const actorData = this.actor ? this.actor.system : {}; + const system = itemData.system; } /** @@ -34,9 +34,9 @@ export class Kult2eItem extends Item { async roll() { // Basic template rendering data const token = this.actor.token; - const item = this.data; - const actorData = this.actor ? this.actor.data.data : {}; - const itemData = item.data; + const item = this.system; + const actorData = this.actor ? this.actor.system : {}; + const itemData = item.system; let roll = new Roll('d20+@abilities.str.mod', actorData); let label = `Rolling ${item.name}`; diff --git a/module/kult2e.js b/module/kult2e.js index 86ce2073ba74f2c2e46099aedf8687ad6892a595..87f70a0ca3bc818ffbc06126d8efd03202b4d8db 100644 --- a/module/kult2e.js +++ b/module/kult2e.js @@ -21,24 +21,26 @@ Hooks.once('init', async function () { rollItemMacro, }; + CONFIG.KULT2E = KULT2E; + /** * Set an initiative formula for the system * @type {String} */ CONFIG.Combat.initiative = KULT2E.config.initiative; - // Define custom Entity classes - CONFIG.Actor.entityClass = Kult2eActor; - CONFIG.Item.entityClass = Kult2eItem; + // Define custom Document classes + CONFIG.Actor.documentClass = Kult2eActor; + CONFIG.Item.documentClass = Kult2eItem; // Register sheet application classes + Actors.unregisterSheet("core", ActorSheet); Actors.registerSheet('kult2e', Kult2eCharacterSheet, { types: ['character'], makeDefault: true }); Actors.registerSheet('kult2e', Kult2eNPCSheet, { types: ['npc'], makeDefault: true }); Actors.registerSheet('kult2e', Kult2eMonsterSheet, { types: ['monster'], makeDefault: true }); - Actors.registerSheet('kult2e', Kult2eMonsterSheetCompact, { - types: ['monster'], - makeDefault: false, - }); + + Items.unregisterSheet("core", ItemSheet); + Items.registerSheet("kult2e", Kult2eItemSheet, { makeDefault: true }); Items.registerSheet('kult2e', Kult2eItemSheet, { types: ['item'], makeDefault: true }); Items.registerSheet('kult2e', Kult2eArmorSheet, { types: ['armor'], makeDefault: true }); Items.registerSheet('kult2e', Kult2eWeaponSheet, { types: ['weapon'], makeDefault: true }); @@ -51,7 +53,9 @@ Hooks.once('init', async function () { // handlebar helpers and partials registerHandlebarHelpers(); - preloadHandlebarsTemplates(); + + // Preload Handlebars templates. + return preloadHandlebarsTemplates(); }); Hooks.once('ready', async function () { diff --git a/system.json b/system.json index 08194958a53681480b63bf737d7d111a3eaabc32..5ff264643a6f7eed7b318ca217b209876d23afbb 100644 --- a/system.json +++ b/system.json @@ -1,14 +1,16 @@ { - "authors": [{ - "name": "LynxCore.org" - }], + "authors": [ + { + "name": "LynxCore.org" + } + ], "compatibility": { - "minimum": 7, + "minimum": 10, "verified": "10.291", "maximum": 10 }, "description": "KULT 2nd Edition", - "download": "https://git.lynxcore.org/foundry/kult2e/system/-/archive/2.0.1/system-2.0.1.zip", + "download": "https://git.lynxcore.org/foundry/kult2e/system/-/archive/1.3.9/system-1.3.9.zip", "esmodules": ["module/kult2e.js"], "gridDistance": 1, "gridUnits": "m", @@ -25,7 +27,7 @@ } ], "license": "LICENSE.md", - "manifest": "https://git.lynxcore.org/foundry/kult2e/system/-/raw/master/system.json", + "manifest": "https://git.lynxcore.org/foundry/kult2e/system/-/raw/1.3.9/system.json", "id": "kult2e", "packs": [ { @@ -99,5 +101,5 @@ "styles": ["css/kult2e.css"], "title": "KULT 2nd Edition", "url": "https://git.lynxcore.org/foundry/kult2e/system", - "version": "2.0.1" + "version": "1.3.9" } diff --git a/templates/actor/character-sheet.html b/templates/actor/character-sheet.html index f7893969822968dd8418d1f7aaa83dec0e3f31df..356c8d9833d893b947757b748a1ec96f3c770062 100644 --- a/templates/actor/character-sheet.html +++ b/templates/actor/character-sheet.html @@ -1,5 +1,5 @@ <form class="{{cssClass}} flexcol charsheet -{{#if actor.data.mb_negative}} +{{#if actor.system.mb_negative}} bg-dark {{else}} bg-light diff --git a/templates/actor/monster-sheet-compact.html b/templates/actor/monster-sheet-compact.html index e74ef8fb60812cba7a712b225a038633860cccbc..89759fa735839762f52057c0d1934566910eaafc 100644 --- a/templates/actor/monster-sheet-compact.html +++ b/templates/actor/monster-sheet-compact.html @@ -25,7 +25,7 @@ <div id="stats-tab" class="compact-grid tab wounds" data-group="compact" data-tab="stats"> <div class="flexrow flex-group-center"> - {{#each actor.data.primary as |attribute key|}} + {{#each actor.system.primary as |attribute key|}} <div class="attributes flexcol rollable" id="{{key}}" data-roll="d20ms{{attribute.value}}" data-label="{{attribute.label}}"> <label>{{attribute.label}}</label> <label><i class="fas fa-dice-d20"></i></label> diff --git a/templates/actor/monster-sheet.html b/templates/actor/monster-sheet.html index 6f508fdffbb9a7dae2e0565daddb19daeca64c5a..51e3416b87ddb66102e604b47a58aa8fadccfe2f 100644 --- a/templates/actor/monster-sheet.html +++ b/templates/actor/monster-sheet.html @@ -10,7 +10,7 @@ {{> "systems/kult2e/templates/actor/partials/shared/gear/nav.hbs"}} </div> <div class="dx-grid-item" id="derived"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/monster/derived-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/derived.hbs"}} diff --git a/templates/actor/partials/monster/derived-edit.hbs b/templates/actor/partials/monster/derived-edit.hbs index 076762bde505c525ad2ed4c5d68cb8a30b7d5a7f..ff06081fe71d9cb2dea12daabe5c370483a3271e 100644 --- a/templates/actor/partials/monster/derived-edit.hbs +++ b/templates/actor/partials/monster/derived-edit.hbs @@ -3,42 +3,42 @@ {{!-- load_capacity --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.load_capacity.label'}}</label> - <input type="number" name="data.derived.load_capacity" value="{{actor.data.derived.load_capacity}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.load_capacity.label'}}</label> + <input type="number" name="data.derived.load_capacity" value="{{actor.system..derived.load_capacity}}" data-dtype="Number"/> </div> {{!-- movement --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.movement.label'}}</label> - <input type="number" name="data.derived.movement" value="{{actor.data.derived.movement}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.movement.label'}}</label> + <input type="number" name="data.derived.movement" value="{{actor.system..derived.movement}}" data-dtype="Number"/> </div> {{!-- no_of_actions --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.no_of_actions.label'}}</label> - <input type="number" name="data.derived.no_of_actions" value="{{actor.data.derived.no_of_actions}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.no_of_actions.label'}}</label> + <input type="number" name="data.derived.no_of_actions" value="{{actor.system..derived.no_of_actions}}" data-dtype="Number"/> </div> {{!-- initiative_bonus --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.initiative_bonus.label'}}</label> - <input type="number" name="data.derived.initiative_bonus" value="{{actor.data.derived.initiative_bonus}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.initiative_bonus.label'}}</label> + <input type="number" name="data.derived.initiative_bonus" value="{{actor.system..derived.initiative_bonus}}" data-dtype="Number"/> </div> {{!-- damage_bonus --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.damage_bonus.label'}}</label><br> - <input type="number" name="data.derived.damage_bonus" value="{{actor.data.derived.damage_bonus}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.damage_bonus.label'}}</label><br> + <input type="number" name="data.derived.damage_bonus" value="{{actor.system..derived.damage_bonus}}" data-dtype="Number"/> </div> {{!-- endurance --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.endurance.label'}}</label> - <input type="number" name="data.derived.endurance" value="{{actor.data.derived.endurance}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.endurance.label'}}</label> + <input type="number" name="data.derived.endurance" value="{{actor.system..derived.endurance}}" data-dtype="Number"/> </div> {{!-- ego_mod --}} <div class="flexcol flex-group-center item"> - <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.ego_mod.label'}}</label> - <input type="number" name="data.derived.ego_mod" value="{{actor.data.derived.ego_mod}}" data-dtype="Number"/> + <label class="resource-label">{{localize 'KULT2E.actor.data..derived_attributes.ego_mod.label'}}</label> + <input type="number" name="data.derived.ego_mod" value="{{actor.system..derived.ego_mod}}" data-dtype="Number"/> </div> diff --git a/templates/actor/partials/shared/derived.hbs b/templates/actor/partials/shared/derived.hbs index 8608e460000b43f9fb423d2bbad279e7f8059f9a..5fc95570290895964f6cc29a239790ea9e6ab1ee 100644 --- a/templates/actor/partials/shared/derived.hbs +++ b/templates/actor/partials/shared/derived.hbs @@ -5,42 +5,42 @@ {{!-- load_capacity --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.load_capacity.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.load_capacity}}" value="{{actor.data.derived.load_capacity}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.load_capacity}}" value="{{actor.system.derived.load_capacity}}" readonly /> </div> {{!-- movement --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.movement.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.movement}}" value="{{actor.data.derived.movement}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.movement}}" value="{{actor.system.derived.movement}}" readonly /> </div> {{!-- no_of_actions --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.no_of_actions.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.no_of_actions}}" value="{{actor.data.derived.no_of_actions}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.no_of_actions}}" value="{{actor.system.derived.no_of_actions}}" readonly /> </div> {{!-- initiative_bonus --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.initiative_bonus.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.initiative_bonus}}" value="{{actor.data.derived.initiative_bonus}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.initiative_bonus}}" value="{{actor.system.derived.initiative_bonus}}" readonly /> </div> {{!-- damage_bonus --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.damage_bonus.label'}}</label><br> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.damage_bonus}}" value="{{actor.data.derived.damage_bonus}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.damage_bonus}}" value="{{actor.system.derived.damage_bonus}}" readonly /> </div> {{!-- endurance --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.endurance.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.endurance}}" value="{{actor.data.derived.endurance}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.endurance}}" value="{{actor.system.derived.endurance}}" readonly /> </div> {{!-- ego_mod --}} <div class="flexrow flex-group-left"> <label class="resource-label">{{localize 'KULT2E.actor.data.derived_attributes.ego_mod.label'}}</label> - <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.data.derived.ego_mod}}" value="{{actor.data.derived.ego_mod}}" readonly /> + <input class="inline-show" type="number" data-dtype="Number" data-field="{{actor.system.derived.ego_mod}}" value="{{actor.system.derived.ego_mod}}" readonly /> </div> </div> diff --git a/templates/actor/partials/shared/gear/advantages-edit.hbs b/templates/actor/partials/shared/gear/advantages-edit.hbs index 41c3896a613e4c269ee805c346d39757bb3e17a3..517e49966cf469170d5ba82ecb9cedf427cbebd8 100644 --- a/templates/actor/partials/shared/gear/advantages-edit.hbs +++ b/templates/actor/partials/shared/gear/advantages-edit.hbs @@ -15,7 +15,7 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{item.name}}" /> <div class="flexrow"> - <input type="text" class="item-attribute inline-edit" data-field="data.cost.value" value="{{item.data.cost.value}}" /> + <input type="text" class="item-attribute inline-edit" data-field="system.cost.value" value="{{item.system.cost.value}}" /> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/advantages.hbs b/templates/actor/partials/shared/gear/advantages.hbs index b9c3294ca6f41173acef20ce4932ccd937c048ae..bc7ae9208f476d9f5268af9bf5254466988d7068 100644 --- a/templates/actor/partials/shared/gear/advantages.hbs +++ b/templates/actor/partials/shared/gear/advantages.hbs @@ -10,11 +10,11 @@ {{#each actor.advantages as |item id|}} <li class="item item-row flexrow flex-group-center" data-item-id="{{item._id}}"> <div class="item-image"><img class="list-image" src="{{item.img}}" title="{{item.name}}"/></div> - <label class="k2e_tooltiptext">{{{item.data.description.value}}}</label> + <label class="k2e_tooltiptext">{{{item.system.description.value}}}</label> <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{item.data.cost.value}}</label> + <label class="item-attribute inline-show">{{item.system.cost.value}}</label> </div> </div> <div class="item-controls"></div> diff --git a/templates/actor/partials/shared/gear/armor-edit.hbs b/templates/actor/partials/shared/gear/armor-edit.hbs index 1f59bf89be40c15bd9c23349eda2ac1b20fdb12d..db229215a08cdd68fa15c76b1c06703b513547b4 100644 --- a/templates/actor/partials/shared/gear/armor-edit.hbs +++ b/templates/actor/partials/shared/gear/armor-edit.hbs @@ -20,27 +20,27 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{armor.name}}" /> <div class="flexrow"> - <input type="number" class="item-attribute inline-edit" data-field="data.ranged.value" value="{{data.ranged.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.melee.value" value="{{data.melee.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.fire.value" value="{{data.fire.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.abc.value" value="{{data.abc.value}}" /> - <div class="item-attribute inline-edit toggle-checkbox" data-field="data.hit_head.value" data-whatever="{{data.hit_head.value}}"> - {{#fa-checkbox armor.data.hit_head.value }} + <input type="number" class="item-attribute inline-edit" data-field="system.ranged.value" value="{{system.ranged.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.melee.value" value="{{system.melee.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.fire.value" value="{{system.fire.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.abc.value" value="{{system.abc.value}}" /> + <div class="item-attribute inline-edit toggle-checkbox" data-field="system.hit_head.value" data-whatever="{{system.hit_head.value}}"> + {{#fa-checkbox armor.system.hit_head.value }} {{this}} {{/fa-checkbox}} </div> - <div class="item-attribute inline-edit toggle-checkbox" data-field="data.hit_torso.value" data-whatever="{{data.hit_torso.value}}"> - {{#fa-checkbox armor.data.hit_torso.value }} + <div class="item-attribute inline-edit toggle-checkbox" data-field="system.hit_torso.value" data-whatever="{{system.hit_torso.value}}"> + {{#fa-checkbox armor.system.hit_torso.value }} {{this}} {{/fa-checkbox}} </div> - <div class="item-attribute inline-edit toggle-checkbox" data-field="data.hit_legs.value" data-whatever="{{data.hit_legs.value}}"> - {{#fa-checkbox armor.data.hit_legs.value }} + <div class="item-attribute inline-edit toggle-checkbox" data-field="system.hit_legs.value" data-whatever="{{system.hit_legs.value}}"> + {{#fa-checkbox armor.system.hit_legs.value }} {{this}} {{/fa-checkbox}} </div> - <div class="item-attribute inline-edit toggle-checkbox" data-field="data.hit_arms.value" data-whatever="{{data.hit_arms.value}}"> - {{#fa-checkbox armor.data.hit_arms.value }} + <div class="item-attribute inline-edit toggle-checkbox" data-field="system.hit_arms.value" data-whatever="{{system.hit_arms.value}}"> + {{#fa-checkbox armor.system.hit_arms.value }} {{this}} {{/fa-checkbox}} </div> diff --git a/templates/actor/partials/shared/gear/armor.hbs b/templates/actor/partials/shared/gear/armor.hbs index aed5df0954bfb73a52923cf0a9df13818a8bd0f3..331abb4f60a44dc24a4805aeb867856454fe6f2f 100644 --- a/templates/actor/partials/shared/gear/armor.hbs +++ b/templates/actor/partials/shared/gear/armor.hbs @@ -19,27 +19,27 @@ <div class="flexcol"> <label class="item-name inline-show">{{armor.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{data.ranged.value}}</label> - <label class="item-attribute inline-show">{{data.melee.value}}</label> - <label class="item-attribute inline-show">{{data.fire.value}}</label> - <label class="item-attribute inline-show">{{data.abc.value}}</label> + <label class="item-attribute inline-show">{{system.ranged.value}}</label> + <label class="item-attribute inline-show">{{system.melee.value}}</label> + <label class="item-attribute inline-show">{{system.fire.value}}</label> + <label class="item-attribute inline-show">{{system.abc.value}}</label> <div class="item-attribute inline-show fa-checkbox"> - {{#fa-checkbox armor.data.hit_head.value }} + {{#fa-checkbox armor.system.hit_head.value }} {{this}} {{/fa-checkbox}} </div> <div class="item-attribute inline-show fa-checkbox"> - {{#fa-checkbox armor.data.hit_torso.value }} + {{#fa-checkbox armor.system.hit_torso.value }} {{this}} {{/fa-checkbox}} </div> <div class="item-attribute inline-show fa-checkbox"> - {{#fa-checkbox armor.data.hit_legs.value }} + {{#fa-checkbox armor.system.hit_legs.value }} {{this}} {{/fa-checkbox}} </div> <div class="item-attribute inline-show fa-checkbox"> - {{#fa-checkbox armor.data.hit_arms.value }} + {{#fa-checkbox armor.system.hit_arms.value }} {{this}} {{/fa-checkbox}} </div> diff --git a/templates/actor/partials/shared/gear/disadvantages-edit.hbs b/templates/actor/partials/shared/gear/disadvantages-edit.hbs index 77c54d3db4580d2f5c86eb230471b1ac81611792..6298e6ae3676b5cd56f21dfb6ee2b98514846825 100644 --- a/templates/actor/partials/shared/gear/disadvantages-edit.hbs +++ b/templates/actor/partials/shared/gear/disadvantages-edit.hbs @@ -15,7 +15,7 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{item.name}}" /> <div class="flexrow"> - <input type="text" class="item-attribute inline-edit" data-field="data.cost.value" value="{{item.data.cost.value}}" /> + <input type="text" class="item-attribute inline-edit" data-field="system.cost.value" value="{{item.system.cost.value}}" /> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/disadvantages.hbs b/templates/actor/partials/shared/gear/disadvantages.hbs index d9055b98fc3639b73ae47ead12aed7f13bdb6a7c..f857248dd8d7ee67fa156c5d467c78505c5b2646 100644 --- a/templates/actor/partials/shared/gear/disadvantages.hbs +++ b/templates/actor/partials/shared/gear/disadvantages.hbs @@ -10,11 +10,11 @@ {{#each actor.disadvantages as |item id|}} <li class="item item-row flexrow flex-group-center" data-item-id="{{item._id}}"> <div class="item-image"><img class="list-image" src="{{item.img}}" title="{{item.name}}"/></div> - <label class="k2e_tooltiptext">{{{item.data.description.value}}}</label> + <label class="k2e_tooltiptext">{{{item.system.description.value}}}</label> <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{item.data.cost.value}}</label> + <label class="item-attribute inline-show">{{item.system.cost.value}}</label> </div> </div> <div class="item-controls"></div> diff --git a/templates/actor/partials/shared/gear/items-edit.hbs b/templates/actor/partials/shared/gear/items-edit.hbs index 1560eca234cda9c63f05bbcffa7c52a7224b3fc3..003e16ddfa258e8f96446d3beeaef58d23852673 100644 --- a/templates/actor/partials/shared/gear/items-edit.hbs +++ b/templates/actor/partials/shared/gear/items-edit.hbs @@ -19,14 +19,14 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{item.name}}" /> <div class="flexrow"> - <input type="number" class="item-attribute inline-edit" data-field="data.price.value" value="{{data.price.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.weight.value" value="{{data.weight.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.availability.value" value="{{data.availability.value}}" /> - <select class="item-attribute inline-edit" data-field="data.legality.value"> + <input type="number" class="item-attribute inline-edit" data-field="system.price.value" value="{{system.price.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.weight.value" value="{{system.weight.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.availability.value" value="{{system.availability.value}}" /> + <select class="item-attribute inline-edit" data-field="system.legality.value"> <option>Legal</option> <option>Illegal</option> </select> - <input type="text" class="item-attribute inline-edit" data-field="data.amount.value" value="{{data.amount.value}}" /> + <input type="text" class="item-attribute inline-edit" data-field="system.amount.value" value="{{system.amount.value}}" /> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/items.hbs b/templates/actor/partials/shared/gear/items.hbs index efe0bd1683f3228e99e2d569be5f91634f890762..6829579ddcecbe67eec83d09c087774bc50cb23e 100644 --- a/templates/actor/partials/shared/gear/items.hbs +++ b/templates/actor/partials/shared/gear/items.hbs @@ -17,11 +17,11 @@ <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{data.price.value}}</label> - <label class="item-attribute inline-show">{{data.weight.value}}</label> - <label class="item-attribute inline-show">{{data.availability.value}}</label> - <label class="item-attribute inline-show">{{data.legality.value}}</label> - <label class="item-attribute inline-show">{{data.amount.value}}</label> + <label class="item-attribute inline-show">{{system.price.value}}</label> + <label class="item-attribute inline-show">{{system.weight.value}}</label> + <label class="item-attribute inline-show">{{system.availability.value}}</label> + <label class="item-attribute inline-show">{{system.legality.value}}</label> + <label class="item-attribute inline-show">{{system.amount.value}}</label> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/nav.hbs b/templates/actor/partials/shared/gear/nav.hbs index dc62f46301baac41ec118c89e06b2b90418ee9a6..ea15219359d79bcd10562df5f5d255dd312e0af2 100644 --- a/templates/actor/partials/shared/gear/nav.hbs +++ b/templates/actor/partials/shared/gear/nav.hbs @@ -11,42 +11,42 @@ <section class="gear-body"> <div class="tab skills" data-group="gear" data-tab="skills"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/skills-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/skills.hbs"}} {{/if}} </div> <div class="tab weapons" data-group="gear" data-tab="weapons"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/weapons-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/weapons.hbs"}} {{/if}} </div> <div class="tab armor" data-group="gear" data-tab="armor"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/armor-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/armor.hbs"}} {{/if}} </div> <div class="tab items" data-group="gear" data-tab="items"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/items-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/items.hbs"}} {{/if}} </div> <div class="tab advantages" data-group="gear" data-tab="advantages"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/advantages-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/advantages.hbs"}} {{/if}} </div> <div class="tab disadvantages" data-group="gear" data-tab="disadvantages"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/gear/disadvantages-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/gear/disadvantages.hbs"}} diff --git a/templates/actor/partials/shared/gear/skills-edit.hbs b/templates/actor/partials/shared/gear/skills-edit.hbs index e495f8f1939bf102590799e99fe9838852601a52..430289dde76202538fa9bc63d0ba764743a179f3 100644 --- a/templates/actor/partials/shared/gear/skills-edit.hbs +++ b/templates/actor/partials/shared/gear/skills-edit.hbs @@ -15,14 +15,14 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{skill.name}}" /> <div class="flexrow"> - <input type="number" class="item-attribute inline-edit" data-field="data.score.value" value="{{data.score.value}}" /> - <select class="item-attribute inline-edit" data-field="data.attribute.value"> + <input type="number" class="item-attribute inline-edit" data-field="system.score.value" value="{{system.score.value}}" /> + <select class="item-attribute inline-edit" data-field="system.attribute.value"> {{#attributes ../actor skill}} {{this}} {{/attributes}} </select> - <div class="item-attribute inline-edit toggle-checkbox" data-field="data.wpn.value" data-whatever="{{data.wpn.value}}"> - {{#fa-checkbox skill.data.wpn.value }} + <div class="item-attribute inline-edit toggle-checkbox" data-field="system.wpn.value" data-whatever="{{system.wpn.value}}"> + {{#fa-checkbox skill.system.wpn.value }} {{this}} {{/fa-checkbox}} </div> diff --git a/templates/actor/partials/shared/gear/skills.hbs b/templates/actor/partials/shared/gear/skills.hbs index 45a02988372bb4df65c924257b20a4e1b72f9b25..e81faedbedfa041487607b104c1c7cca8c2d7256 100644 --- a/templates/actor/partials/shared/gear/skills.hbs +++ b/templates/actor/partials/shared/gear/skills.hbs @@ -16,16 +16,16 @@ <div class="flexcol"> <label class="item-name inline-show">{{skill.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{data.score.value}}</label> - <label class="item-attribute inline-show">{{data.attribute.value}}</label> + <label class="item-attribute inline-show">{{system.score.value}}</label> + <label class="item-attribute inline-show">{{system.attribute.value}}</label> <div class="item-attribute inline-show fa-checkbox"> - {{#fa-checkbox skill.data.wpn.value }} + {{#fa-checkbox skill.system.wpn.value }} {{this}} {{/fa-checkbox}} </div> </div> </div> - <div class="item-controls item-roll rollable" data-roll="d20ms{{data.score.value}}" data-label="{{skill.name}}"> + <div class="item-controls item-roll rollable" data-roll="d20ms{{system.score.value}}" data-label="{{skill.name}}"> <i class="fas fa-dice-d20"></i> </div> </li> diff --git a/templates/actor/partials/shared/gear/weapons-edit-page-1.hbs b/templates/actor/partials/shared/gear/weapons-edit-page-1.hbs index afadf2eb24c03854ce6cc35e78e6c0b24bb96afa..db6b215ae93a649be8289aff8cad3bfbf175b4f6 100644 --- a/templates/actor/partials/shared/gear/weapons-edit-page-1.hbs +++ b/templates/actor/partials/shared/gear/weapons-edit-page-1.hbs @@ -20,17 +20,17 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{item.name}}" /> <div class="flexrow"> - <input type="number" class="item-attribute inline-edit" data-field="data.sc.value" value="{{data.sc.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.lw.value" value="{{data.lw.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.sw.value" value="{{data.sw.value}}" /> - <input type="text" class="item-attribute inline-edit" data-field="data.dw.value" value="{{data.sw.value}}+" readonly /> - <input type="number" class="item-attribute inline-edit" data-field="data.range.value" value="{{data.range.value}}" /> - <select class="item-attribute inline-edit" data-field="data.type.value"> + <input type="number" class="item-attribute inline-edit" data-field="system.sc.value" value="{{system.sc.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.lw.value" value="{{system.lw.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.sw.value" value="{{system.sw.value}}" /> + <input type="text" class="item-attribute inline-edit" data-field="system.dw.value" value="{{system.sw.value}}+" readonly /> + <input type="number" class="item-attribute inline-edit" data-field="system.range.value" value="{{system.range.value}}" /> + <select class="item-attribute inline-edit" data-field="system.type.value"> {{#weapontypes item}} {{this}} {{/weapontypes}} </select> - <select class="item-attribute inline-edit" data-field="data.skill.value"> + <select class="item-attribute inline-edit" data-field="system.skill.value"> {{#weaponskills ../actor item}} {{this}} {{/weaponskills}} diff --git a/templates/actor/partials/shared/gear/weapons-edit-page-2.hbs b/templates/actor/partials/shared/gear/weapons-edit-page-2.hbs index 8018b5b4200e2619211b1e74677e3e2b3a1608cd..08f8f4e234bbd4a9af1bd14e985dca60a474ede5 100644 --- a/templates/actor/partials/shared/gear/weapons-edit-page-2.hbs +++ b/templates/actor/partials/shared/gear/weapons-edit-page-2.hbs @@ -20,16 +20,16 @@ <div class="flexcol"> <input type="text" class="item-name inline-edit" data-field="name" value="{{item.name}}" /> <div class="flexrow"> - <input type="number" class="item-attribute inline-edit" data-field="data.avaliability.value" value="{{data.availability.value}}" /> - <select class="item-attribute inline-edit" data-field="data.legality.value"> + <input type="number" class="item-attribute inline-edit" data-field="system.avaliability.value" value="{{system.availability.value}}" /> + <select class="item-attribute inline-edit" data-field="system.legality.value"> <option>{{localize 'KULT2E.actor.interface.items.legal'}}</option> <option>{{localize 'KULT2E.actor.interface.items.illegal'}}</option> </select> - <input type="number" class="item-attribute inline-edit" data-field="data.reload.value" value="{{data.reload.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.rate_of_fire.value" value="{{data.rate_of_fire.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.mag.value" value="{{data.mag.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.impact_radius.value" value="{{data.impact_radius.value}}" /> - <input type="number" class="item-attribute inline-edit" data-field="data.cal.value" value="{{data.cal.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.reload.value" value="{{system.reload.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.rate_of_fire.value" value="{{system.rate_of_fire.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.mag.value" value="{{system.mag.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.impact_radius.value" value="{{system.impact_radius.value}}" /> + <input type="number" class="item-attribute inline-edit" data-field="system.cal.value" value="{{system.cal.value}}" /> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/weapons-page-1.hbs b/templates/actor/partials/shared/gear/weapons-page-1.hbs index 3f39eadea2e0587d9d5be015cdebe270f064957d..96f510f95431fc5f6f72b4c08a9bb725230a953b 100644 --- a/templates/actor/partials/shared/gear/weapons-page-1.hbs +++ b/templates/actor/partials/shared/gear/weapons-page-1.hbs @@ -25,13 +25,13 @@ <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{data.sc.value}}</label> - <label class="item-attribute inline-show">{{data.lw.value}}</label> - <label class="item-attribute inline-show">{{data.sw.value}}</label> - <label class="item-attribute inline-show">{{data.sw.value}}+</label> - <label class="item-attribute inline-show">{{data.range.value}}</label> - <label class="item-attribute inline-show">{{#weapontype_name data.type.value}}{{this}}{{/weapontype_name}}</label> - <label class="item-attribute inline-show">{{data.skill.value}}</label> + <label class="item-attribute inline-show">{{system.sc.value}}</label> + <label class="item-attribute inline-show">{{system.lw.value}}</label> + <label class="item-attribute inline-show">{{system.sw.value}}</label> + <label class="item-attribute inline-show">{{system.sw.value}}+</label> + <label class="item-attribute inline-show">{{system.range.value}}</label> + <label class="item-attribute inline-show">{{#weapontype_name system.type.value}}{{this}}{{/weapontype_name}}</label> + <label class="item-attribute inline-show">{{system.skill.value}}</label> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/gear/weapons-page-2.hbs b/templates/actor/partials/shared/gear/weapons-page-2.hbs index fbcdf4c13b7a5d02709687c159a1fd52c8be133e..01e1c80adbd9df8f5759d827c8ab9c52bc98586f 100644 --- a/templates/actor/partials/shared/gear/weapons-page-2.hbs +++ b/templates/actor/partials/shared/gear/weapons-page-2.hbs @@ -20,13 +20,13 @@ <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{data.availability.value}}</label> - <label class="item-attribute inline-show">{{data.legality.value}}</label> - <label class="item-attribute inline-show">{{data.reload.value}}</label> - <label class="item-attribute inline-show">{{data.rate_of_fire.value}}</label> - <label class="item-attribute inline-show">{{data.mag.value}}</label> - <label class="item-attribute inline-show">{{data.impact_radius.value}}</label> - <label class="item-attribute inline-show">{{data.cal.value}}</label> + <label class="item-attribute inline-show">{{system.availability.value}}</label> + <label class="item-attribute inline-show">{{system.legality.value}}</label> + <label class="item-attribute inline-show">{{system.reload.value}}</label> + <label class="item-attribute inline-show">{{system.rate_of_fire.value}}</label> + <label class="item-attribute inline-show">{{system.mag.value}}</label> + <label class="item-attribute inline-show">{{system.impact_radius.value}}</label> + <label class="item-attribute inline-show">{{system.cal.value}}</label> </div> </div> <div class="item-controls"> diff --git a/templates/actor/partials/shared/info/bio-edit.hbs b/templates/actor/partials/shared/info/bio-edit.hbs index 2acb964d6fce3c65bfd8dc9859a411b6c6c36ef3..9ce5918a21dacafa3169d077c38e29e44ad5486c 100644 --- a/templates/actor/partials/shared/info/bio-edit.hbs +++ b/templates/actor/partials/shared/info/bio-edit.hbs @@ -6,74 +6,74 @@ {{!-- profession --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.profession.label'}}</label> - <input class="inline-edit" type="text" name="data.background.profession.value" value="{{actor.data.background.profession.value}}" data-dtype="String"/> + <input class="inline-edit" type="text" name="system.background.profession.value" value="{{actor.system.background.profession.value}}" data-dtype="String"/> </div> {{!-- date_of_birth --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.date_of_birth.label'}}</label> - <input class="inline-edit" type="text" name="data.background.date_of_birth.value" value="{{actor.data.background.date_of_birth.value}}" data-dtype="String"/> + <input class="inline-edit" type="text" name="system.background.date_of_birth.value" value="{{actor.system.background.date_of_birth.value}}" data-dtype="String"/> </div> {{!-- place_of_birth --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.place_of_birth.label'}}</label> - <input class="inline-edit" type="text" name="data.background.place_of_birth.value" value="{{actor.data.background.place_of_birth.value}}" data-dtype="String"/> + <input class="inline-edit" type="text" name="system.background.place_of_birth.value" value="{{actor.system.background.place_of_birth.value}}" data-dtype="String"/> </div> {{!-- home --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.home.label'}}</label> - <input class="inline-edit" type="text" name="data.background.home.value" value="{{actor.data.background.home.value}}" data-dtype="String" /> + <input class="inline-edit" type="text" name="system.background.home.value" value="{{actor.system.background.home.value}}" data-dtype="String" /> </div> {{!-- employer --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.employer.label'}}</label> - <input class="inline-edit" type="text" name="data.background.employer.value" value="{{actor.data.background.employer.value}}" data-dtype="String" /> + <input class="inline-edit" type="text" name="system.background.employer.value" value="{{actor.system.background.employer.value}}" data-dtype="String" /> </div> {{!-- address --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.address.label'}}</label> - <input class="inline-edit" type="text" name="data.background.address.value" value="{{actor.data.background.address.value}}" data-dtype="String" /> + <input class="inline-edit" type="text" name="system.background.address.value" value="{{actor.system.background.address.value}}" data-dtype="String" /> </div> {{!-- standard_of_living --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.standard_of_living.label'}}</label> - <input class="inline-edit" type="text" name="data.background.standard_of_living.value" value="{{actor.data.background.standard_of_living.value}}" data-dtype="String"/> + <input class="inline-edit" type="text" name="system.background.standard_of_living.value" value="{{actor.system.background.standard_of_living.value}}" data-dtype="String"/> </div> {{!-- haircolor --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.haircolor.label'}}</label> - <input class="inline-edit" type="text" name="data.background.haircolor.value" value="{{actor.data.background.haircolor.value}}" data-dtype="String" /> + <input class="inline-edit" type="text" name="system.background.haircolor.value" value="{{actor.system.background.haircolor.value}}" data-dtype="String" /> </div> {{!-- eyecolor --}} <div class="flexrow flex-group-left k2e_noborder"> <label>{{localize 'KULT2E.actor.data.eyecolor.label'}}</label> - <input class="inline-edit" type="text" name="data.background.eyecolor.value" value="{{actor.data.background.eyecolor.value}}" data-dtype="String" /> + <input class="inline-edit" type="text" name="system.background.eyecolor.value" value="{{actor.system.background.eyecolor.value}}" data-dtype="String" /> </div> <div class="flexrow flex-group-left"> {{!-- height --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.height.label'}}</label> - <input class="inline-edit" type="text" name="data.background.height.value" value="{{actor.data.background.height.value}}" data-dtype="Number" /> + <input class="inline-edit" type="text" name="system.background.height.value" value="{{actor.system.background.height.value}}" data-dtype="Number" /> </div> {{!-- weight --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.weight.label'}}</label> - <input class="inline-edit" type="text" name="data.background.weight.value" value="{{actor.data.background.weight.value}}" data-dtype="Number" /> + <input class="inline-edit" type="text" name="system.background.weight.value" value="{{actor.system.background.weight.value}}" data-dtype="Number" /> </div> {{!-- age --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.age.label'}}</label> - <input class="inline-edit" type="text" name="data.background.age.value" value="{{actor.data.background.age.value}}" data-dtype="Number" /> + <input class="inline-edit" type="text" name="system.background.age.value" value="{{actor.system.background.age.value}}" data-dtype="Number" /> </div> </div> </div> diff --git a/templates/actor/partials/shared/info/bio.hbs b/templates/actor/partials/shared/info/bio.hbs index fc7feabbf6211acef4801e43067e40a1191e4fa7..51ec73ccd9394e818af5cac802c3aeb0a6181df4 100644 --- a/templates/actor/partials/shared/info/bio.hbs +++ b/templates/actor/partials/shared/info/bio.hbs @@ -6,74 +6,74 @@ {{!-- profession --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.profession.label'}}</label> - <input class="inline-show" type="text" name="data.background.profession.value" value="{{actor.data.background.profession.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.profession.value" value="{{actor.system.background.profession.value}}" data-dtype="String" readonly /> </div> {{!-- date_of_birth --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.date_of_birth.label'}}</label> - <input class="inline-show" type="text" name="data.background.date_of_birth.value" value="{{actor.data.background.date_of_birth.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.date_of_birth.value" value="{{actor.system.background.date_of_birth.value}}" data-dtype="String" readonly /> </div> {{!-- place_of_birth --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.place_of_birth.label'}}</label> - <input class="inline-show" type="text" name="data.background.place_of_birth.value" value="{{actor.data.background.place_of_birth.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.place_of_birth.value" value="{{actor.system.background.place_of_birth.value}}" data-dtype="String" readonly /> </div> {{!-- home --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.home.label'}}</label> - <input class="inline-show" type="text" name="data.background.home.value" value="{{actor.data.background.home.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.home.value" value="{{actor.system.background.home.value}}" data-dtype="String" readonly /> </div> {{!-- employer --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.employer.label'}}</label> - <input class="inline-show" type="text" name="data.background.employer.value" value="{{actor.data.background.employer.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.employer.value" value="{{actor.system.background.employer.value}}" data-dtype="String" readonly /> </div> {{!-- address --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.address.label'}}</label> - <input class="inline-show" type="text" name="data.background.address.value" value="{{actor.data.background.address.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.address.value" value="{{actor.system.background.address.value}}" data-dtype="String" readonly /> </div> {{!-- standard_of_living --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.standard_of_living.label'}}</label> - <input class="inline-show" type="text" name="data.background.standard_of_living.value" value="{{actor.data.background.standard_of_living.value}} " data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.standard_of_living.value" value="{{actor.system.background.standard_of_living.value}} " data-dtype="String" readonly /> </div> {{!-- haircolor --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.haircolor.label'}}</label> - <input class="inline-show" type="text" name="data.background.haircolor.value" value="{{actor.data.background.haircolor.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.haircolor.value" value="{{actor.system.background.haircolor.value}}" data-dtype="String" readonly /> </div> {{!-- eyecolor --}} <div class="flexrow flex-group-left k2e_noborder"> <label>{{localize 'KULT2E.actor.data.eyecolor.label'}}</label> - <input class="inline-show" type="text" name="data.background.eyecolor.value" value="{{actor.data.background.eyecolor.value}}" data-dtype="String" readonly /> + <input class="inline-show" type="text" name="system.background.eyecolor.value" value="{{actor.system.background.eyecolor.value}}" data-dtype="String" readonly /> </div> <div class="flexrow flex-group-left"> {{!-- height --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.height.label'}}</label> - <input class="inline-show" type="text" name="data.background.height.value" value="{{actor.data.background.height.value}}" data-dtype="Number" readonly /> + <input class="inline-show" type="text" name="system.background.height.value" value="{{actor.system.background.height.value}}" data-dtype="Number" readonly /> </div> {{!-- weight --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.weight.label'}}</label> - <input class="inline-show" type="text" name="data.background.weight.value" value="{{actor.data.background.weight.value}}" data-dtype="Number" readonly /> + <input class="inline-show" type="text" name="system.background.weight.value" value="{{actor.system.background.weight.value}}" data-dtype="Number" readonly /> </div> {{!-- age --}} <div class="flexrow flex-group-left"> <label>{{localize 'KULT2E.actor.data.age.label'}}</label> - <input class="inline-show" type="text" name="data.background.age.value" value="{{actor.data.background.age.value}}" data-dtype="Number" readonly /> + <input class="inline-show" type="text" name="system.background.age.value" value="{{actor.system.background.age.value}}" data-dtype="Number" readonly /> </div> </div> </div> diff --git a/templates/actor/partials/shared/info/concept.hbs b/templates/actor/partials/shared/info/concept.hbs index 83b26d28dff094df321855ca5a4eb5dd7a5fcb61..2f76d1308847cb3e731075672193c3816bde39bf 100644 --- a/templates/actor/partials/shared/info/concept.hbs +++ b/templates/actor/partials/shared/info/concept.hbs @@ -1,4 +1,4 @@ {{!-- concept --}} <div class="dx-grid" id="concept"> - {{editor content=data.background.concept target="data.background.concept" button=true owner=owner editable=editable}} + {{editor system.background.concept target="system.background.concept" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/dark-secrets.hbs b/templates/actor/partials/shared/info/dark-secrets.hbs index 6d385e19fbedf688f6e5cb36e8b302176c53d933..601bfc1297ab9527d8346233dd4c93340ff2d34c 100644 --- a/templates/actor/partials/shared/info/dark-secrets.hbs +++ b/templates/actor/partials/shared/info/dark-secrets.hbs @@ -1,4 +1,4 @@ {{!-- dark-secrets --}} <div class="dx-grid" id="dark-secrets"> - {{editor content=data.balance.dark_secrets target="data.balance.dark_secrets" button=true owner=owner editable=editable}} + {{editor system.balance.dark_secrets target="system.balance.dark_secrets" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/family.hbs b/templates/actor/partials/shared/info/family.hbs index a987cc614922236cb878a31b0bc7e7124743a548..2bbed2f55d60c960d59a066ac734cdd3604518e7 100644 --- a/templates/actor/partials/shared/info/family.hbs +++ b/templates/actor/partials/shared/info/family.hbs @@ -1,4 +1,4 @@ {{!-- family --}} <div class="dx-grid" id="family"> - {{editor content=data.background.family target="data.background.family" button=true owner=owner editable=editable}} + {{editor system.background.family target="system.background.family" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/friends.hbs b/templates/actor/partials/shared/info/friends.hbs index eaafc9c7bedadc92c004498296de8e4495ce6a32..26377d04aafcfb86932aebfcd7b828af39c859ca 100644 --- a/templates/actor/partials/shared/info/friends.hbs +++ b/templates/actor/partials/shared/info/friends.hbs @@ -1,4 +1,4 @@ {{!-- friends --}} <div class="dx-grid" id="friends"> - {{editor content=data.background.friends target="data.background.friends" button=true owner=owner editable=editable}} + {{editor system.background.friends target="system.background.friends" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/income.hbs b/templates/actor/partials/shared/info/income.hbs index d2722335c68f33dc3500a0bc8f4cc17e5d5eff02..c4af9d4216e31a6bbbfdeec1646644e64a64efc5 100644 --- a/templates/actor/partials/shared/info/income.hbs +++ b/templates/actor/partials/shared/info/income.hbs @@ -1,4 +1,4 @@ {{!-- income --}} <div class="dx-grid" id="income"> - {{editor content=data.background.income target="data.background.income" button=true owner=owner editable=editable}} + {{editor system.background.income target="system.background.income" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/nav.hbs b/templates/actor/partials/shared/info/nav.hbs index c71b581b1455794f23ac7085fc1b7cb7724e5db0..71fbeed54ab8391b16d6605fb1477404fb326bf2 100644 --- a/templates/actor/partials/shared/info/nav.hbs +++ b/templates/actor/partials/shared/info/nav.hbs @@ -13,7 +13,7 @@ <section class="info-body"> <div class="tab bio" data-group="info" data-tab="bio"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/info/bio-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/info/bio.hbs"}} diff --git a/templates/actor/partials/shared/info/personality.hbs b/templates/actor/partials/shared/info/personality.hbs index 305014f6c9de6331e78f91a0e2beb7f79b3c1643..8142a9d7a474e1010f2bbb2bc084759ead1052fc 100644 --- a/templates/actor/partials/shared/info/personality.hbs +++ b/templates/actor/partials/shared/info/personality.hbs @@ -1,4 +1,4 @@ {{!-- personality --}} <div class="dx-grid" id="personality"> - {{editor content=data.background.personality target="data.background.personality" button=true owner=owner editable=editable}} + {{editor system.background.personality target="system.background.personality" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/info/physical-changes.hbs b/templates/actor/partials/shared/info/physical-changes.hbs index 9790186e736be8e036cc4f3f07e2047b7fa5aa57..e872223c2b8c3255ca53ea30244193691bed64c4 100644 --- a/templates/actor/partials/shared/info/physical-changes.hbs +++ b/templates/actor/partials/shared/info/physical-changes.hbs @@ -1,3 +1,3 @@ <div class="dx-grid" id="physical-changes"> - {{editor content=data.balance.physical_changes target="data.balance.physical_changes" button=true owner=owner editable=editable}} + {{editor system.balance.physical_changes target="system.balance.physical_changes" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/actor/partials/shared/name.hbs b/templates/actor/partials/shared/name.hbs index 43304561ebb7451d4e718510be2be74868e931af..b680dd19aaddbfcfda4ad7c089d120ba0f46c97a 100644 --- a/templates/actor/partials/shared/name.hbs +++ b/templates/actor/partials/shared/name.hbs @@ -1,7 +1,7 @@ {{!-- character name field --}} -{{#if actor.data.mode}} - <input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'KULT2E.actor.data.name_placeholder.label'}}" readonly/> +{{#if actor.system.mode}} + <input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'KULT2E.actor.name_placeholder.label'}}" readonly/> {{else}} - <input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'KULT2E.actor.data.name_placeholder.label'}}"/> + <input name="name" type="text" value="{{actor.name}}" placeholder="{{localize 'KULT2E.actor.name_placeholder.label'}}"/> {{/if}} diff --git a/templates/actor/partials/shared/sidebar/character/attributes-edit.hbs b/templates/actor/partials/shared/sidebar/character/attributes-edit.hbs index 2d1358b7a2da2d2dd1667204b61fefd15dd62a34..5daaadfe3d7fabc9ae394bfc1dd25abdc4ce32d6 100644 --- a/templates/actor/partials/shared/sidebar/character/attributes-edit.hbs +++ b/templates/actor/partials/shared/sidebar/character/attributes-edit.hbs @@ -2,50 +2,50 @@ {{!-- this template gets loaded in play mode --}} {{!-- labels in here get translated in module/kult2e.js --}} -<div class="attributes flexcol rollable" id="str" data-roll="d20ms{{actor.data.primary.str.value}}" data-label="{{actor.data.primary.str.label}}"> - <label>{{actor.data.primary.str.label}}</label> +<div class="attributes flexcol rollable" id="str" data-roll="d20ms{{actor.system.primary.str.value}}" data-label="{{actor.system.primary.str.label}}"> + <label>{{actor.system.primary.str.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.str.value" value="{{actor.data.primary.str.value}}" data-dtype="Number" data-field="data.primary.str.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.str.value" value="{{actor.system.primary.str.value}}" data-dtype="Number" data-field="system.primary.str.value" /> </div> -<div class="attributes flexcol rollable" id="agi" data-roll="d20ms{{actor.data.primary.agi.value}}" data-label="{{actor.data.primary.agi.label}}"> - <label>{{actor.data.primary.agi.label}}</label> +<div class="attributes flexcol rollable" id="agi" data-roll="d20ms{{actor.system.primary.agi.value}}" data-label="{{actor.system.primary.agi.label}}"> + <label>{{actor.system.primary.agi.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.agi.value" value="{{actor.data.primary.agi.value}}" data-dtype="Number" data-field="data.primary.agi.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.agi.value" value="{{actor.system.primary.agi.value}}" data-dtype="Number" data-field="system.primary.agi.value" /> </div> -<div class="attributes flexcol rollable" id="con" data-roll="d20ms{{actor.data.primary.con.value}}" data-label="{{actor.data.primary.con.label}}"> - <label>{{actor.data.primary.con.label}}</label> +<div class="attributes flexcol rollable" id="con" data-roll="d20ms{{actor.system.primary.con.value}}" data-label="{{actor.system.primary.con.label}}"> + <label>{{actor.system.primary.con.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.con.value" value="{{actor.data.primary.con.value}}" data-dtype="Number" data-field="data.primary.con.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.con.value" value="{{actor.system.primary.con.value}}" data-dtype="Number" data-field="system.primary.con.value" /> </div> -<div class="attributes flexcol rollable" id="per" data-roll="d20ms{{actor.data.primary.per.value}}" data-label="{{actor.data.primary.per.label}}"> - <label>{{actor.data.primary.per.label}}</label> +<div class="attributes flexcol rollable" id="per" data-roll="d20ms{{actor.system.primary.per.value}}" data-label="{{actor.system.primary.per.label}}"> + <label>{{actor.system.primary.per.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.per.value" value="{{actor.data.primary.per.value}}" data-dtype="Number" data-field="data.primary.per.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.per.value" value="{{actor.system.primary.per.value}}" data-dtype="Number" data-field="system.primary.per.value" /> </div> -<div class="attributes flexcol rollable" id="cha" data-roll="d20ms{{actor.data.primary.cha.value}}" data-label="{{actor.data.primary.cha.label}}"> - <label>{{actor.data.primary.cha.label}}</label> +<div class="attributes flexcol rollable" id="cha" data-roll="d20ms{{actor.system.primary.cha.value}}" data-label="{{actor.system.primary.cha.label}}"> + <label>{{actor.system.primary.cha.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.cha.value" value="{{actor.data.primary.cha.value}}" data-dtype="Number" data-field="data.primary.cha.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.cha.value" value="{{actor.system.primary.cha.value}}" data-dtype="Number" data-field="system.primary.cha.value" /> </div> -<div class="attributes flexcol rollable" id="ego" data-roll="d20ms{{actor.data.primary.ego.value}}" data-label="{{actor.data.primary.ego.label}}"> - <label>{{actor.data.primary.ego.label}}</label> +<div class="attributes flexcol rollable" id="ego" data-roll="d20ms{{actor.system.primary.ego.value}}" data-label="{{actor.system.primary.ego.label}}"> + <label>{{actor.system.primary.ego.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.ego.value" value="{{actor.data.primary.ego.value}}" data-dtype="Number" data-field="data.primary.ego.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.ego.value" value="{{actor.system.primary.ego.value}}" data-dtype="Number" data-field="system.primary.ego.value" /> </div> -<div class="attributes flexcol rollable" id="edu" data-roll="d20ms{{actor.data.primary.edu.value}}" data-label="{{actor.data.primary.edu.label}}"> - <label>{{actor.data.primary.edu.label}}</label> +<div class="attributes flexcol rollable" id="edu" data-roll="d20ms{{actor.system.primary.edu.value}}" data-label="{{actor.system.primary.edu.label}}"> + <label>{{actor.system.primary.edu.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.edu.value" value="{{actor.data.primary.edu.value}}" data-dtype="Number" data-field="data.primary.edu.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.edu.value" value="{{actor.system.primary.edu.value}}" data-dtype="Number" data-field="system.primary.edu.value" /> </div> -<div class="attributes flexcol rollable" id="com" data-roll="d20ms{{actor.data.primary.com.value}}" data-label="{{actor.data.primary.com.label}}"> - <label>{{actor.data.primary.com.label}}</label> +<div class="attributes flexcol rollable" id="com" data-roll="d20ms{{actor.system.primary.com.value}}" data-label="{{actor.system.primary.com.label}}"> + <label>{{actor.system.primary.com.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="attribute-inline-edit" type="number" name="actor.data.primary.com.value" value="{{actor.data.primary.com.value}}" data-dtype="Number" data-field="data.primary.com.value" /> + <input class="attribute-inline-edit" type="number" name="actor.system.primary.com.value" value="{{actor.system.primary.com.value}}" data-dtype="Number" data-field="system.primary.com.value" /> </div> diff --git a/templates/actor/partials/shared/sidebar/character/attributes.hbs b/templates/actor/partials/shared/sidebar/character/attributes.hbs index 54eccf4c99a4206558593bdfdb795a447dccd681..14e91f52f54a25f01d5074277d766e4778b9c30c 100644 --- a/templates/actor/partials/shared/sidebar/character/attributes.hbs +++ b/templates/actor/partials/shared/sidebar/character/attributes.hbs @@ -2,10 +2,10 @@ {{!-- this template gets loaded in play mode --}} {{!-- labels in here get translated in module/kult2e.js --}} -{{#each actor.data.primary as |attribute key|}} +{{#each actor.system.primary as |attribute key|}} <div class="attributes flexcol rollable" id="{{key}}" data-roll="d20ms{{attribute.value}}" data-label="{{attribute.label}}"> <label>{{attribute.label}}</label> <label><i class="fas fa-dice-d20"></i></label> - <input class="inline-show" type="number" name="data.primary.{{key}}.value" value="{{attribute.value}}" data-dtype="Number" readonly /> + <input class="inline-show" type="number" name="system.primary.{{key}}.value" value="{{attribute.value}}" data-dtype="Number" readonly /> </div> {{/each}} diff --git a/templates/actor/partials/shared/sidebar/character/secondary.hbs b/templates/actor/partials/shared/sidebar/character/secondary.hbs index cc9c2ba8e80f13c8682f11b462681ea16b98853a..0ba26c0a5008f3aed4003cec40a32c3cfb17d9e8 100644 --- a/templates/actor/partials/shared/sidebar/character/secondary.hbs +++ b/templates/actor/partials/shared/sidebar/character/secondary.hbs @@ -2,33 +2,33 @@ {{!-- this template gets loaded in play mode --}} {{!-- initiative --}} -<div class="attributes flexcol rollable" id="ini" data-roll="d10+(@derived.initiative_bonus)" data-label="{{actor.data.derived.initiative_bonus.label}}"> +<div class="attributes flexcol rollable" id="ini" data-roll="d10+(@derived.initiative_bonus)" data-label="{{actor.system.derived.initiative_bonus.label}}"> <label>{{localize 'KULT2E.actor.interface.initiative.label'}}</label> <label><i class="fas fa-dice-d20"></i></label> - <label>{{actor.data.derived.initiative_bonus}}</label> + <label>{{actor.system.derived.initiative_bonus}}</label> </div> {{!-- mental balance --}} <div class="attributes flexcol" id="mb"> <label>{{localize 'KULT2E.actor.data.derived_attributes.mental_balance.label'}}</label> - <label>{{actor.data.derived.mental_balance}}</label> + <label>{{actor.system.derived.mental_balance}}</label> </div> {{!-- hero points --}} <div class="attributes flexcol" id="hp"> <label>{{localize 'KULT2E.actor.data.secondary_attributes.hero_points.label'}}</label> - <input type="text" name="data.hero_points.value" value="{{actor.data.hero_points.value}}" data-dtype="Number"/> + <input type="text" name="system.hero_points.value" value="{{actor.system.hero_points.value}}" data-dtype="Number"/> </div> {{!-- experience points --}} <div class="attributes flexcol" id="xp"> <label>{{localize 'KULT2E.actor.data.secondary_attributes.xp.label'}}</label> - <input type="text" name="data.xp.value" value="{{actor.data.xp.value}}" data-dtype="Number"/> + <input type="text" name="system.xp.value" value="{{actor.system.xp.value}}" data-dtype="Number"/> </div> {{!-- enable editing mode --}} <div class="attributes flexcol enable-edit-mode" id="edit-button"> - {{#if actor.data.mode}} + {{#if actor.system.mode}} <label>{{localize 'KULT2E.actor.interface.play.label'}}</label> <i class="fas fa-dice"></i> {{else}} diff --git a/templates/actor/partials/shared/sidebar/combat/armor.hbs b/templates/actor/partials/shared/sidebar/combat/armor.hbs index f153d821d73c3ff4922dce1b772f8aa99e78687f..e493a8d1ea90f52004cc6a36caf921be62f35b93 100644 --- a/templates/actor/partials/shared/sidebar/combat/armor.hbs +++ b/templates/actor/partials/shared/sidebar/combat/armor.hbs @@ -10,29 +10,29 @@ </div> <div class="flexrow flex-group-center item"> <label>{{localize 'KULT2E.actor.data.armor.hit_head.label'}}</label> - <label>{{actor.data.armor.head.ranged}}</label> - <label>{{actor.data.armor.head.melee}}</label> - <label>{{actor.data.armor.head.fire}}</label> - <label>{{actor.data.armor.head.abc}}</label> + <label>{{actor.system.armor.head.ranged}}</label> + <label>{{actor.system.armor.head.melee}}</label> + <label>{{actor.system.armor.head.fire}}</label> + <label>{{actor.system.armor.head.abc}}</label> </div> <div class="flexrow flex-group-center item"> <label>{{localize 'KULT2E.actor.data.armor.hit_torso.label'}}</label> - <label>{{actor.data.armor.torso.ranged}}</label> - <label>{{actor.data.armor.torso.melee}}</label> - <label>{{actor.data.armor.torso.fire}}</label> - <label>{{actor.data.armor.torso.abc}}</label> + <label>{{actor.system.armor.torso.ranged}}</label> + <label>{{actor.system.armor.torso.melee}}</label> + <label>{{actor.system.armor.torso.fire}}</label> + <label>{{actor.system.armor.torso.abc}}</label> </div> <div class="flexrow flex-group-center item"> <label>{{localize 'KULT2E.actor.data.armor.hit_arms.label'}}</label> - <label>{{actor.data.armor.arms.ranged}}</label> - <label>{{actor.data.armor.arms.melee}}</label> - <label>{{actor.data.armor.arms.fire}}</label> - <label>{{actor.data.armor.arms.abc}}</label> + <label>{{actor.system.armor.arms.ranged}}</label> + <label>{{actor.system.armor.arms.melee}}</label> + <label>{{actor.system.armor.arms.fire}}</label> + <label>{{actor.system.armor.arms.abc}}</label> </div> <div class="flexrow flex-group-center item"> <label>{{localize 'KULT2E.actor.data.armor.hit_legs.label'}}</label> - <label>{{actor.data.armor.legs.ranged}}</label> - <label>{{actor.data.armor.legs.melee}}</label> - <label>{{actor.data.armor.legs.fire}}</label> - <label>{{actor.data.armor.legs.abc}}</label> + <label>{{actor.system.armor.legs.ranged}}</label> + <label>{{actor.system.armor.legs.melee}}</label> + <label>{{actor.system.armor.legs.fire}}</label> + <label>{{actor.system.armor.legs.abc}}</label> </div> diff --git a/templates/actor/partials/shared/sidebar/combat/weapons.hbs b/templates/actor/partials/shared/sidebar/combat/weapons.hbs index 59148b1da157cc37695c182ee2c61b54bad20ac3..8adf15fec33867fdff8fce2fee0fc19bf3f482a4 100644 --- a/templates/actor/partials/shared/sidebar/combat/weapons.hbs +++ b/templates/actor/partials/shared/sidebar/combat/weapons.hbs @@ -14,11 +14,11 @@ <div class="flexcol"> <label class="item-name inline-show">{{item.name}}</label> <div class="flexrow"> - <label class="item-attribute inline-show">{{item.data.sc.value}}</label> - <label class="item-attribute inline-show">{{item.data.lw.value}}</label> - <label class="item-attribute inline-show">{{item.data.sw.value}}</label> - <label class="item-attribute inline-show">{{item.data.sw.value}}+</label> - <div class="sidebar-roll rollable" data-roll="d20ms{{item.data.score.value}}" data-label="{{item.name}}" data-against="attack"> + <label class="item-attribute inline-show">{{item.system.sc.value}}</label> + <label class="item-attribute inline-show">{{item.system.lw.value}}</label> + <label class="item-attribute inline-show">{{item.system.sw.value}}</label> + <label class="item-attribute inline-show">{{item.system.sw.value}}+</label> + <div class="sidebar-roll rollable" data-roll="d20ms{{item.system.score.value}}" data-label="{{item.name}}" data-against="attack"> <i class="fas fa-dice-d20"></i> </div> <div class="sidebar-roll rollable" data-roll="d20" data-label="{{item.name}}" data-against="damage"> diff --git a/templates/actor/partials/shared/sidebar/combat/wounds.hbs b/templates/actor/partials/shared/sidebar/combat/wounds.hbs index d16595fd613259d95b1d61f14d7186c6f7b9b0d8..fe69f61eef5cbb483dd69eeba903b6dae9418f66 100644 --- a/templates/actor/partials/shared/sidebar/combat/wounds.hbs +++ b/templates/actor/partials/shared/sidebar/combat/wounds.hbs @@ -2,33 +2,33 @@ {{!-- labels get translated in kult2e.js --}} <div class="flexrow flex-group-left item"> - <label>{{actor.data.wounds.sc.label}}</label> + <label>{{actor.system.wounds.sc.label}}</label> <div class="woundcounter" data-level="sc" id="woundcontainer-sc"> - {{#wounds actor.data.wounds.sc "sc"}} + {{#wounds actor.system.wounds.sc "sc"}} {{this}} {{/wounds}} </div> </div> <div class="flexrow flex-group-left item"> - <label>{{actor.data.wounds.lw.label}}</label> + <label>{{actor.system.wounds.lw.label}}</label> <div class="woundcounter" data-level="lw" id="woundcontainer-lw"> - {{#wounds actor.data.wounds.lw "lw"}} + {{#wounds actor.system.wounds.lw "lw"}} {{this}} {{/wounds}} </div> </div> <div class="flexrow flex-group-left item"> - <label>{{actor.data.wounds.sw.label}}</label> + <label>{{actor.system.wounds.sw.label}}</label> <div class="woundcounter" data-level="sw" id="woundcontainer-sw"> - {{#wounds actor.data.wounds.sw "sw"}} + {{#wounds actor.system.wounds.sw "sw"}} {{this}} {{/wounds}} </div> </div> <div class="flexrow flex-group-left item"> - <label>{{actor.data.wounds.dw.label}}</label> + <label>{{actor.system.wounds.dw.label}}</label> <div class="woundcounter" data-level="dw" id="woundcontainer-dw"> - {{#wounds actor.data.wounds.dw "dw"}} + {{#wounds actor.system.wounds.dw "dw"}} {{this}} {{/wounds}} </div> diff --git a/templates/actor/partials/shared/sidebar/nav.hbs b/templates/actor/partials/shared/sidebar/nav.hbs index b2b08760b7d0fdcf07ee05335e0e3143b47004e7..b17b662c48293091f6a46f9b47a1931ac2288bdb 100644 --- a/templates/actor/partials/shared/sidebar/nav.hbs +++ b/templates/actor/partials/shared/sidebar/nav.hbs @@ -5,7 +5,7 @@ {{> "systems/kult2e/templates/actor/partials/shared/sidebar/character/image.hbs"}} {{!-- rollable stats - str, agi etc. --}} - {{#if actor.data.mode}} + {{#if actor.system.mode}} {{> "systems/kult2e/templates/actor/partials/shared/sidebar/character/attributes-edit.hbs"}} {{else}} {{> "systems/kult2e/templates/actor/partials/shared/sidebar/character/attributes.hbs"}} diff --git a/templates/item/partials/advantage.hbs b/templates/item/partials/advantage.hbs index b86d32493c4b665cd30c63f9981e1d0b45d9077c..a8e8c148b7ae8eaa4cef92e55cae07cb57f73353 100644 --- a/templates/item/partials/advantage.hbs +++ b/templates/item/partials/advantage.hbs @@ -1,4 +1,4 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.advantages.cost.label'}}</label> - <input type="text" name="data.cost.value" value="{{data.cost.value}}" data-dtype="Number"/> + <input type="text" name="system.cost.value" value="{{system.cost.value}}" data-dtype="Number"/> </div> diff --git a/templates/item/partials/armorstats.hbs b/templates/item/partials/armorstats.hbs index 57b3d444f7d9588b45df9271d06cf689087c2984..b9d36a77f544d7bd64883ecd70fd3c1a9739ff35 100644 --- a/templates/item/partials/armorstats.hbs +++ b/templates/item/partials/armorstats.hbs @@ -1,67 +1,67 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.ranged.label'}}</label> - <input type="number" data-field="data.ranged.value" value="{{data.ranged.value}}" /> + <input type="number" data-field="system.ranged.value" value="{{system.ranged.value}}" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.melee.label'}}</label> - <input type="number" data-field="data.melee.value" value="{{data.melee.value}}" /> + <input type="number" data-field="system.melee.value" value="{{system.melee.value}}" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.fire.label'}}</label> - <input type="number" data-field="data.fire.value" value="{{data.fire.value}}" /> + <input type="number" data-field="system.fire.value" value="{{system.fire.value}}" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.abc.label'}}</label> - <input type="number" data-field="data.abc.value" value="{{data.abc.value}}" /> + <input type="number" data-field="system.abc.value" value="{{system.abc.value}}" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.hit_head.label'}}</label> - <div class="checkbox toggle-checkbox" data-field="data.hit_head.value" data-whatever="{{data.hit_head.value}}"> - {{#fa-checkbox data.hit_head.value }} + <div class="checkbox toggle-checkbox" data-field="system.hit_head.value" data-whatever="{{system.hit_head.value}}"> + {{#fa-checkbox system.hit_head.value }} {{this}} {{/fa-checkbox}} </div> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.hit_torso.label'}}</label> - <div class="checkbox toggle-checkbox" data-field="data.hit_torso.value" data-whatever="{{data.hit_torso.value}}"> - {{#fa-checkbox data.hit_torso.value }} + <div class="checkbox toggle-checkbox" data-field="system.hit_torso.value" data-whatever="{{system.hit_torso.value}}"> + {{#fa-checkbox system.hit_torso.value }} {{this}} {{/fa-checkbox}} </div> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.hit_arms.label'}}</label> - <div class="checkbox toggle-checkbox" data-field="data.hit_arms.value" data-whatever="{{data.hit_arms.value}}"> - {{#fa-checkbox data.hit_arms.value }} + <div class="checkbox toggle-checkbox" data-field="system.hit_arms.value" data-whatever="{{system.hit_arms.value}}"> + {{#fa-checkbox system.hit_arms.value }} {{this}} {{/fa-checkbox}} </div> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.armor.hit_legs.label'}}</label> - <div class="checkbox toggle-checkbox" data-field="data.hit_legs.value" data-whatever="{{data.hit_legs.value}}"> - {{#fa-checkbox data.hit_legs.value }} + <div class="checkbox toggle-checkbox" data-field="system.hit_legs.value" data-whatever="{{system.hit_legs.value}}"> + {{#fa-checkbox system.hit_legs.value }} {{this}} {{/fa-checkbox}} </div> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.price.label'}}</label> - <input type="text" name="data.price.value" value="{{data.price.value}}" data-dtype="Number"/> + <input type="text" name="system.price.value" value="{{system.price.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.weight.label'}}</label> - <input type="text" name="data.weight.value" value="{{data.weight.value}}" data-dtype="Number"/> + <input type="text" name="system.weight.value" value="{{system.weight.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.availability.label'}}</label> - <input type="text" name="data.availability.value" value="{{data.availability.value}}" data-dtype="Number"/> + <input type="text" name="system.availability.value" value="{{system.availability.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.legality.label'}}</label> - <select class="item-attribute inline-edit" data-field="data.legality.value"> + <select class="item-attribute inline-edit" data-field="system.legality.value"> <option>{{localize 'KULT2E.actor.interface.items.legal'}}</option> <option>{{localize 'KULT2E.actor.interface.items.illegal'}}</option> </select> diff --git a/templates/item/partials/description.hbs b/templates/item/partials/description.hbs index 5abb3d30d9f5837b1044a6d6542e351dde5738bf..61a14e7ebf65fa2381b6b757c75e5b3204af0b0a 100644 --- a/templates/item/partials/description.hbs +++ b/templates/item/partials/description.hbs @@ -1,3 +1,3 @@ <div class="k2e-editor"> - {{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}} + {{editor system.description.value target="system.description.value" button="true" owner="owner" editable="editable" engine="prosemirror"}} </div> diff --git a/templates/item/partials/disadvantage.hbs b/templates/item/partials/disadvantage.hbs index f56a8b6141ae025e2c7ceb0fea107b049dc93d88..2a4a0eca595ab3d172b689a3bddf9e90f15cc91b 100644 --- a/templates/item/partials/disadvantage.hbs +++ b/templates/item/partials/disadvantage.hbs @@ -1,4 +1,4 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.disadvantages.cost.label'}}</label> - <input type="text" name="data.cost.value" value="{{data.cost.value}}" data-dtype="Number"/> + <input type="text" name="system.cost.value" value="{{system.cost.value}}" data-dtype="Number"/> </div> diff --git a/templates/item/partials/itemstats.hbs b/templates/item/partials/itemstats.hbs index 66b689a4b46eb14a28264bbb43ec20d535f424bd..74746ff24ca23ebbd792facbdb7398ae74fe0df9 100644 --- a/templates/item/partials/itemstats.hbs +++ b/templates/item/partials/itemstats.hbs @@ -1,22 +1,22 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.price.label'}}</label> - <input type="text" name="data.price.value" value="{{data.price.value}}" data-dtype="Number"/> + <input type="text" name="system.price.value" value="{{system.price.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.weight.label'}}</label> - <input type="text" name="data.weight.value" value="{{data.weight.value}}" data-dtype="Number"/> + <input type="text" name="system.weight.value" value="{{system.weight.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.gear.amount.label'}}</label> - <input type="text" name="data.amount.value" value="{{data.amount.value}}" data-dtype="Number"/> + <input type="text" name="system.amount.value" value="{{system.amount.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.availability.label'}}</label> - <input type="text" name="data.availability.value" value="{{data.availability.value}}" data-dtype="Number"/> + <input type="text" name="system.availability.value" value="{{system.availability.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.legality.label'}}</label> - <select class="item-attribute inline-edit" data-field="data.legality.value"> + <select class="item-attribute inline-edit" data-field="system.legality.value"> <option>{{localize 'KULT2E.actor.interface.items.legal'}}</option> <option>{{localize 'KULT2E.actor.interface.items.illegal'}}</option> </select> diff --git a/templates/item/partials/skillstats.hbs b/templates/item/partials/skillstats.hbs index c1e418a029a989ac0b0d66720f3ae499a272d5e5..5f75ca3a50b1e7f55ac961adf0fb5cbd10c77043 100644 --- a/templates/item/partials/skillstats.hbs +++ b/templates/item/partials/skillstats.hbs @@ -1,15 +1,15 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.skills.attribute.label'}}</label> - <input type="text" name="data.attribute.value" value="{{data.attribute.value}}" data-dtype="String"/> + <input type="text" name="system.attribute.value" value="{{system.attribute.value}}" data-dtype="String"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.skills.score.label'}}</label> - <input type="text" name="data.score.value" value="{{data.score.value}}" data-dtype="Number"/> + <input type="text" name="system.score.value" value="{{system.score.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.skills.weaponskill.label'}}</label> - <div class="checkbox toggle-checkbox" data-field="data.wpn.value" data-whatever="{{data.wpn.value}}"> - {{#fa-checkbox data.wpn.value}} + <div class="checkbox toggle-checkbox" data-field="system.wpn.value" data-whatever="{{system.wpn.value}}"> + {{#fa-checkbox system.wpn.value}} {{this}} {{/fa-checkbox}} </div> diff --git a/templates/item/partials/weaponstats.hbs b/templates/item/partials/weaponstats.hbs index 2b14963f90c53ea9cea065b37701766f7c8c502e..172eb2e041ac4eae57966aae9b659113d1ebc47d 100644 --- a/templates/item/partials/weaponstats.hbs +++ b/templates/item/partials/weaponstats.hbs @@ -1,57 +1,57 @@ <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.wounds.sc.short'}}</label> - <input type="number" name="data.sc.value" value="{{data.sc.value}}" data-dtype="Number"/> + <input type="number" name="system.sc.value" value="{{system.sc.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.wounds.lw.short'}}</label> - <input type="number" name="data.lw.value" value="{{data.lw.value}}" data-dtype="Number"/> + <input type="number" name="system.lw.value" value="{{system.lw.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.wounds.sw.short'}}</label> - <input type="number" name="data.sw.value" value="{{data.sw.value}}" data-dtype="Number"/> + <input type="number" name="system.sw.value" value="{{system.sw.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.wounds.dw.short'}}</label> - <input type="text" name="data.dw.value" value="{{data.sw.value}}+" + <input type="text" name="system.dw.value" value="{{system.sw.value}}+" data-dtype="Text" disabled /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.rate_of_fire.label'}}</label> - <input type="text" name="data.rate_of_fire.value" value="{{item.data.rate_of_fire.value}}" + <input type="text" name="system.rate_of_fire.value" value="{{item.system.rate_of_fire.value}}" data-dtype="text" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.impact_radius.label'}}</label> - <input type="number" name="data.impact_radius.value" value="{{data.impact_radius.value}}" + <input type="number" name="system.impact_radius.value" value="{{system.impact_radius.value}}" data-dtype="Number" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.range.label'}}</label> - <input type="number" name="data.range.value" value="{{data.range.value}}" + <input type="number" name="system.range.value" value="{{system.range.value}}" data-dtype="Number" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.mag.label'}}</label> - <input type="number" name="data.mag.value" value="{{data.mag.value}}" + <input type="number" name="system.mag.value" value="{{system.mag.value}}" data-dtype="Number" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.cal.label'}}</label> - <input type="number" name="data.cal.value" value="{{data.cal.value}}" + <input type="number" name="system.cal.value" value="{{system.cal.value}}" data-dtype="Number" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.reload.label'}}</label> - <input type="text" name="data.reload.value" value="{{data.reload.value}}" + <input type="text" name="system.reload.value" value="{{system.reload.value}}" data-dtype="String" /> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.skill.label'}}</label> - <input type="text" name="data.skill.value" value="{{data.skill.value}}" data-dtype="String"/> + <input type="text" name="system.skill.value" value="{{system.skill.value}}" data-dtype="String"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.data.weapons.type.label'}}</label> - <select name="data.type.value"> + <select name="system.type.value"> {{#weapontypes item}} {{this}} {{/weapontypes}} @@ -59,19 +59,19 @@ </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.price.label'}}</label> - <input type="text" name="data.price.value" value="{{data.price.value}}" data-dtype="Number"/> + <input type="text" name="system.price.value" value="{{system.price.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.item.interface.weight.label'}}</label> - <input type="text" name="data.weight.value" value="{{data.weight.value}}" data-dtype="Number"/> + <input type="text" name="system.weight.value" value="{{system.weight.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.availability.label'}}</label> - <input type="text" name="data.availability.value" value="{{data.availability.value}}" data-dtype="Number"/> + <input type="text" name="system.availability.value" value="{{system.availability.value}}" data-dtype="Number"/> </div> <div class="grid-elm item flexrow"> <label>{{localize 'KULT2E.actor.interface.items.legality.label'}}</label> - <select class="item-attribute inline-edit" data-field="data.legality.value"> + <select class="item-attribute inline-edit" data-field="system.legality.value"> <option>{{localize 'KULT2E.actor.interface.items.legal'}}</option> <option>{{localize 'KULT2E.actor.interface.items.illegal'}}</option> </select>