Working on Compatibility for FVTT v10
This commit is contained in:
@@ -17,6 +17,7 @@ module.exports = {
|
|||||||
"import/extensions": "off",
|
"import/extensions": "off",
|
||||||
"class-methods-use-this": "off",
|
"class-methods-use-this": "off",
|
||||||
// Personal Preference
|
// Personal Preference
|
||||||
|
// "operator-linebreak": ["error", "before"], // prettier bug
|
||||||
"linebreak-style": "off",
|
"linebreak-style": "off",
|
||||||
"no-mixed-operators": "off",
|
"no-mixed-operators": "off",
|
||||||
"no-param-reassign": "off",
|
"no-param-reassign": "off",
|
||||||
@@ -419,7 +420,7 @@ module.exports = {
|
|||||||
filterObject: "readonly",
|
filterObject: "readonly",
|
||||||
flattenObject: "readonly",
|
flattenObject: "readonly",
|
||||||
expandObject: "readonly",
|
expandObject: "readonly",
|
||||||
isObjectEmpty: "readonly",
|
isEmpty: "readonly",
|
||||||
mergeObject: "readonly",
|
mergeObject: "readonly",
|
||||||
diffObject: "readonly",
|
diffObject: "readonly",
|
||||||
hasProperty: "readonly",
|
hasProperty: "readonly",
|
||||||
@@ -438,6 +439,7 @@ module.exports = {
|
|||||||
saveDataToFile: "readonly",
|
saveDataToFile: "readonly",
|
||||||
readTextFromFile: "readonly",
|
readTextFromFile: "readonly",
|
||||||
fromUuid: "readonly",
|
fromUuid: "readonly",
|
||||||
|
fromUuidSync: "readonly",
|
||||||
_handleMouseWheelInputChange: "readonly",
|
_handleMouseWheelInputChange: "readonly",
|
||||||
getTemplate: "readonly",
|
getTemplate: "readonly",
|
||||||
loadTemplates: "readonly",
|
loadTemplates: "readonly",
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Technique syntaxe "quick" explanation :
|
|||||||
- Or specific syntaxe "@`S`:`prop1`" or "@`T`:`prop1`|`max`" or "@`T`:`prop1`|`max`(`prop2`)" :
|
- Or specific syntaxe "@`S`:`prop1`" or "@`T`:`prop1`|`max`" or "@`T`:`prop1`|`max`(`prop2`)" :
|
||||||
- `@` fixed, trigger the parser
|
- `@` fixed, trigger the parser
|
||||||
- `T` or `S` : `T`arget or `S`elf, define the actor to get the value.
|
- `T` or `S` : `T`arget or `S`elf, define the actor to get the value.
|
||||||
- `prop1` / `prop2` : Can be any property in `actor` or `actor.data.data`. Limitations: currently no `size`, `distance` (range) or computation (a+b).
|
- `prop1` / `prop2` : Can be any property in `actor` or `actor.system`. Limitations: currently no `size`, `distance` (range) or computation (a+b).
|
||||||
- `|` separator, optional if no min/max.
|
- `|` separator, optional if no min/max.
|
||||||
- `min` or `max` : Between the selected targets, search for the min/max of `prop2`. If no `prop2` provided, take `prop1` as `prop2` (irrelevant for `@S`).
|
- `min` or `max` : Between the selected targets, search for the min/max of `prop2`. If no `prop2` provided, take `prop1` as `prop2` (irrelevant for `@S`).
|
||||||
- `(prop2)` : define the property for the actor selection in multiple target, can be omitted if same as `prop1`.
|
- `(prop2)` : define the property for the actor selection in multiple target, can be omitted if same as `prop1`.
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ export class ActorL5r5e extends Actor {
|
|||||||
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`;
|
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some tweak on actors token
|
// Some tweak on actors prototypeToken
|
||||||
data.token = data.token || {};
|
data.prototypeToken = data.prototypeToken || {};
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case "character":
|
case "character":
|
||||||
foundry.utils.mergeObject(
|
foundry.utils.mergeObject(
|
||||||
data.token,
|
data.prototypeToken,
|
||||||
{
|
{
|
||||||
// vision: true,
|
// vision: true,
|
||||||
// dimSight: 30,
|
// dimSight: 30,
|
||||||
@@ -41,7 +41,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
|
|
||||||
case "npc":
|
case "npc":
|
||||||
foundry.utils.mergeObject(
|
foundry.utils.mergeObject(
|
||||||
data.token,
|
data.prototypeToken,
|
||||||
{
|
{
|
||||||
actorLink: true,
|
actorLink: true,
|
||||||
disposition: 0, // neutral
|
disposition: 0, // neutral
|
||||||
@@ -58,7 +58,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
|
|
||||||
case "army":
|
case "army":
|
||||||
foundry.utils.mergeObject(
|
foundry.utils.mergeObject(
|
||||||
data.token,
|
data.prototypeToken,
|
||||||
{
|
{
|
||||||
actorLink: true,
|
actorLink: true,
|
||||||
disposition: 0, // neutral
|
disposition: 0, // neutral
|
||||||
@@ -94,22 +94,25 @@ export class ActorL5r5e extends Actor {
|
|||||||
context.pack = this.pack;
|
context.pack = this.pack;
|
||||||
|
|
||||||
// NPC switch between types : Linked actor for Adversary, unlinked for Minion
|
// NPC switch between types : Linked actor for Adversary, unlinked for Minion
|
||||||
if (!!data["data.type"] && this.data.type === "npc" && data["data.type"] !== this.data.data.type) {
|
if (!!data["system.type"] && this.type === "npc" && data["system.type"] !== this.system.type) {
|
||||||
data["token.actorLink"] = data["data.type"] === "adversary";
|
data["prototypeToken.actorLink"] = data["system.type"] === "adversary";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only on linked Actor
|
// Only on linked Actor
|
||||||
if (!!data["token.actorLink"] || (data["token.actorLink"] === undefined && this.data.token.actorLink)) {
|
if (
|
||||||
|
!!data["prototypeToken.actorLink"] ||
|
||||||
|
(data["prototypeToken.actorLink"] === undefined && this.prototypeToken?.actorLink)
|
||||||
|
) {
|
||||||
// Update the token name/image if the sheet name/image changed, but only if
|
// Update the token name/image if the sheet name/image changed, but only if
|
||||||
// they was previously the same, and token img was not set in same time
|
// they was previously the same, and token img was not set in same time
|
||||||
["name", "img"].forEach((fieldName) => {
|
Object.entries({ name: "name", img: "texture.src" }).forEach(([dataProp, TknProp]) => {
|
||||||
if (
|
if (
|
||||||
data[fieldName] &&
|
data[dataProp] &&
|
||||||
!data["token." + fieldName] &&
|
!data["prototypeToken." + TknProp] &&
|
||||||
this.data[fieldName] === this.data.token[fieldName] &&
|
this[dataProp] === foundry.utils.getProperty(this.prototypeToken, TknProp) &&
|
||||||
this.data[fieldName] !== data[fieldName]
|
this[dataProp] !== data[dataProp]
|
||||||
) {
|
) {
|
||||||
data["token." + fieldName] = data[fieldName];
|
data["prototypeToken." + TknProp] = data[dataProp];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -128,36 +131,37 @@ export class ActorL5r5e extends Actor {
|
|||||||
super.prepareData();
|
super.prepareData();
|
||||||
|
|
||||||
if (this.isCharacter) {
|
if (this.isCharacter) {
|
||||||
const data = this.data.data;
|
const system = this.system;
|
||||||
|
|
||||||
// No automation for npc as they cheat in stats
|
// No automation for npc as they cheat in stats
|
||||||
if (this.data.type === "character") {
|
if (this.type === "character") {
|
||||||
ActorL5r5e.computeDerivedAttributes(data);
|
ActorL5r5e.computeDerivedAttributes(system);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attributes bars
|
// Attributes bars
|
||||||
data.fatigue.max = data.endurance;
|
system.fatigue.max = system.endurance;
|
||||||
data.strife.max = data.composure;
|
system.strife.max = system.composure;
|
||||||
data.void_points.max = data.rings.void;
|
system.void_points.max = system.rings.void;
|
||||||
|
|
||||||
// if compromise, vigilance = 1
|
// if compromise, vigilance = 1
|
||||||
data.is_compromised = data.strife.value > data.strife.max;
|
system.is_compromised = system.strife.value > system.strife.max;
|
||||||
|
|
||||||
// Make sure void points are never greater than max
|
// Make sure void points are never greater than max
|
||||||
if (data.void_points.value > data.void_points.max) {
|
if (system.void_points.value > system.void_points.max) {
|
||||||
data.void_points.value = data.void_points.max;
|
system.void_points.value = system.void_points.max;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set derived attributes (endurance, composure, focus, vigilance) from rings values
|
* Set derived attributes (endurance, composure, focus, vigilance) from rings values
|
||||||
|
* @param {Object} system
|
||||||
*/
|
*/
|
||||||
static computeDerivedAttributes(data) {
|
static computeDerivedAttributes(system) {
|
||||||
data.endurance = (Number(data.rings.earth) + Number(data.rings.fire)) * 2;
|
system.endurance = (Number(system.rings.earth) + Number(system.rings.fire)) * 2;
|
||||||
data.composure = (Number(data.rings.earth) + Number(data.rings.water)) * 2;
|
system.composure = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
|
||||||
data.focus = Number(data.rings.air) + Number(data.rings.fire);
|
system.focus = Number(system.rings.air) + Number(system.rings.fire);
|
||||||
data.vigilance = Math.ceil((Number(data.rings.air) + Number(data.rings.water)) / 2);
|
system.vigilance = Math.ceil((Number(system.rings.air) + Number(system.rings.water)) / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -187,8 +191,8 @@ export class ActorL5r5e extends Actor {
|
|||||||
*/
|
*/
|
||||||
async _updateActorFromAdvancement(item, isAdd) {
|
async _updateActorFromAdvancement(item, isAdd) {
|
||||||
if (item && item.type === "advancement") {
|
if (item && item.type === "advancement") {
|
||||||
const actor = foundry.utils.duplicate(this.data.data);
|
const actor = foundry.utils.duplicate(this.system);
|
||||||
const itemData = item.data.data;
|
const itemData = item.system;
|
||||||
if (itemData.advancement_type === "ring") {
|
if (itemData.advancement_type === "ring") {
|
||||||
// Ring
|
// Ring
|
||||||
if (isAdd) {
|
if (isAdd) {
|
||||||
@@ -216,7 +220,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
|
|
||||||
// Update Actor
|
// Update Actor
|
||||||
await this.update({
|
await this.update({
|
||||||
data: foundry.utils.diffObject(this.data.data, actor),
|
system: foundry.utils.diffObject(this.system, actor),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,8 +230,8 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {Promise<string|null>}
|
* @return {Promise<string|null>}
|
||||||
*/
|
*/
|
||||||
async renderTextTemplate() {
|
async renderTextTemplate() {
|
||||||
const data = (await this.sheet?.getData()) || this;
|
const sheetData = (await this.sheet?.getData()) || this;
|
||||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, data);
|
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, sheetData);
|
||||||
if (!tpl) {
|
if (!tpl) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -239,7 +243,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get isCharacter() {
|
get isCharacter() {
|
||||||
return ["character", "npc"].includes(this.data.type);
|
return ["character", "npc"].includes(this.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -247,7 +251,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get haveWeaponEquipped() {
|
get haveWeaponEquipped() {
|
||||||
return this.items.some((e) => e.type === "weapon" && !!e.data.data.equipped);
|
return this.items.some((e) => e.type === "weapon" && !!e.system.equipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -255,7 +259,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get haveWeaponReadied() {
|
get haveWeaponReadied() {
|
||||||
return this.items.some((e) => e.type === "weapon" && !!e.data.data.equipped && !!e.data.data.readied);
|
return this.items.some((e) => e.type === "weapon" && !!e.system.equipped && !!e.system.readied);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -263,7 +267,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get haveArmorEquipped() {
|
get haveArmorEquipped() {
|
||||||
return this.items.some((e) => e.type === "armor" && !!e.data.data.equipped);
|
return this.items.some((e) => e.type === "armor" && !!e.system.equipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -282,9 +286,9 @@ export class ActorL5r5e extends Actor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Prepared is a boolean or if null we get the info in the actor
|
// Prepared is a boolean or if null we get the info in the actor
|
||||||
let isPrepared = this.data.type === "character" ? cfg.character : cfg[this.data.data.type];
|
let isPrepared = this.type === "character" ? cfg.character : cfg[this.system.type];
|
||||||
if (isPrepared === "null") {
|
if (isPrepared === "null") {
|
||||||
isPrepared = this.data.data.prepared ? "true" : "false";
|
isPrepared = this.system.prepared ? "true" : "false";
|
||||||
}
|
}
|
||||||
|
|
||||||
return isPrepared;
|
return isPrepared;
|
||||||
@@ -298,7 +302,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
if (!this.isCharacter) {
|
if (!this.isCharacter) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return Math.floor(this.data.data.social.status / 10);
|
return Math.floor(this.system.social.status / 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -309,7 +313,7 @@ export class ActorL5r5e extends Actor {
|
|||||||
if (!this.isCharacter) {
|
if (!this.isCharacter) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.data.type === "npc" ? this.data.data.conflict_rank.social : this.data.data.identity.school_rank;
|
return this.type === "npc" ? this.system.conflict_rank.social : this.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -320,6 +324,6 @@ export class ActorL5r5e extends Actor {
|
|||||||
if (!this.isCharacter) {
|
if (!this.isCharacter) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.data.type === "npc" ? this.data.data.conflict_rank.martial : this.data.data.identity.school_rank;
|
return this.type === "npc" ? this.system.conflict_rank.martial : this.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_initialize() {
|
_initialize() {
|
||||||
const data = this.object.data.data;
|
const data = this.object.system;
|
||||||
|
|
||||||
// update linked actor datas
|
// update linked actor datas
|
||||||
if (data.commander_actor_id) {
|
if (data.commander_actor_id) {
|
||||||
@@ -79,10 +79,13 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
activateEditor(name, options = {}, initialContent = "") {
|
activateEditor(name, options = {}, initialContent = "") {
|
||||||
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
||||||
if (["data.army_abilities", "data.supplies_logistics", "data.past_battles"].includes(name) && initialContent) {
|
if (
|
||||||
|
["system.army_abilities", "system.supplies_logistics", "system.past_battles"].includes(name) &&
|
||||||
|
initialContent
|
||||||
|
) {
|
||||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||||
}
|
}
|
||||||
super.activateEditor(name, options, initialContent);
|
return super.activateEditor(name, options, initialContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,7 +103,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
// Casualties/Panic +/-
|
// Casualties/Panic +/-
|
||||||
html.find(".addsub-control").on("click", this._modifyCasualtiesOrPanic.bind(this));
|
html.find(".addsub-control").on("click", this._modifyCasualtiesOrPanic.bind(this));
|
||||||
|
|
||||||
if (this.actor.data.data.soft_locked) {
|
if (this.actor.system.soft_locked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,12 +112,19 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
// Split Items by types
|
// Split Items by types
|
||||||
sheetData.data.splitItemsList = this._splitItems(sheetData);
|
sheetData.data.splitItemsList = this._splitItems(sheetData);
|
||||||
|
|
||||||
|
// Editors enrichment
|
||||||
|
for (const name of ["army_abilities", "supplies_logistics", "past_battles"]) {
|
||||||
|
sheetData.data.enrichedHtml[name] = await TextEditor.enrichHTML(sheetData.data.system[name], {
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,15 +153,15 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// *** Everything below here is only needed if the sheet is editable ***
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
if (!this.isEditable || this.actor.data.data.soft_locked) {
|
if (!this.isEditable || this.actor.system.soft_locked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.type)) {
|
||||||
// actor dual trigger...
|
// actor dual trigger...
|
||||||
if (item?.documentName !== "Actor") {
|
if (item?.documentName !== "Actor") {
|
||||||
console.warn("L5R5E | Characters items are not allowed", item?.data?.type, item);
|
console.warn("L5R5E | Characters items are not allowed", item?.type, item);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -162,7 +172,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let itemData = item.data.toObject(true);
|
let itemData = item.toObject(true);
|
||||||
|
|
||||||
// Finally, create the embed
|
// Finally, create the embed
|
||||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||||
@@ -175,7 +185,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _onDropActors(type, event) {
|
async _onDropActors(type, event) {
|
||||||
// *** Everything below here is only needed if the sheet is editable ***
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
if (!this.isEditable || this.actor.data.data.soft_locked) {
|
if (!this.isEditable || this.actor.system.soft_locked) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +221,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _updateLinkedActorData(type, actor, isInit = false) {
|
async _updateLinkedActorData(type, actor, isInit = false) {
|
||||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacter) {
|
if (!actor || actor.documentName !== "Actor" || !actor.isCharacter) {
|
||||||
console.warn("L5R5E | Wrong actor type", actor?.data?.type, actor);
|
console.warn("L5R5E | Wrong actor type", actor?.type, actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,26 +229,26 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
const actorData = {};
|
const actorData = {};
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "commander":
|
case "commander":
|
||||||
actorData["data.commander"] = actor.data.name;
|
actorData["system.commander"] = actor.name;
|
||||||
actorData["data.commander_actor_id"] = actor.data._id;
|
actorData["system.commander_actor_id"] = actor._id;
|
||||||
actorData["data.commander_standing.honor"] = actor.data.data.social.honor;
|
actorData["system.commander_standing.honor"] = actor.system.social.honor;
|
||||||
actorData["data.commander_standing.glory"] = actor.data.data.social.glory;
|
actorData["system.commander_standing.glory"] = actor.system.social.glory;
|
||||||
actorData["data.commander_standing.status"] = actor.data.data.social.status;
|
actorData["system.commander_standing.status"] = actor.system.social.status;
|
||||||
|
|
||||||
// Replace the image by commander's image
|
// Replace the image by commander's image
|
||||||
if (
|
if (
|
||||||
!isInit &&
|
!isInit &&
|
||||||
this.actor.data.img !== actor.data.img &&
|
this.actor.img !== actor.img &&
|
||||||
![`${actorPath}character.svg`, `${actorPath}npc.svg`].includes(actor.data.img)
|
![`${actorPath}character.svg`, `${actorPath}npc.svg`].includes(actor.img)
|
||||||
) {
|
) {
|
||||||
actorData["img"] = actor.data.img;
|
actorData["img"] = actor.img;
|
||||||
actorData["token.img"] = actor.data.token.img;
|
actorData["prototypeToken.texture.src"] = actor.prototypeToken.texture.src;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "warlord":
|
case "warlord":
|
||||||
actorData["data.warlord"] = actor.data.name;
|
actorData["system.warlord"] = actor.name;
|
||||||
actorData["data.warlord_actor_id"] = actor.data._id;
|
actorData["system.warlord_actor_id"] = actor._id;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -269,7 +279,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
console.warn("L5R5E | Unknown type", type);
|
console.warn("L5R5E | Unknown type", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return this.actor.update({ data: actorData });
|
return this.actor.update({ system: actorData });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -290,13 +300,10 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case "casualties":
|
case "casualties":
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
battle_readiness: {
|
battle_readiness: {
|
||||||
casualties_strength: {
|
casualties_strength: {
|
||||||
value: Math.max(
|
value: Math.max(0, this.actor.system.battle_readiness.casualties_strength.value + mod),
|
||||||
0,
|
|
||||||
this.actor.data.data.battle_readiness.casualties_strength.value + mod
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -305,10 +312,10 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
case "panic":
|
case "panic":
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
battle_readiness: {
|
battle_readiness: {
|
||||||
panic_discipline: {
|
panic_discipline: {
|
||||||
value: Math.max(0, this.actor.data.data.battle_readiness.panic_discipline.value + mod),
|
value: Math.max(0, this.actor.system.battle_readiness.panic_discipline.value + mod),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
sheetData.data.stances = CONFIG.l5r5e.stances;
|
sheetData.data.stances = CONFIG.l5r5e.stances;
|
||||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ displayInTypes: true });
|
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ displayInTypes: true });
|
||||||
@@ -58,31 +58,31 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
sheetData.items.forEach((item) => {
|
sheetData.items.forEach((item) => {
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case "technique":
|
case "technique":
|
||||||
if (!out[item.data.technique_type]) {
|
if (!out[item.system.technique_type]) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`L5R5E | Empty or unknown technique type[${item.data.technique_type}] forced to "kata" in item id[${item._id}], name[${item.name}]`
|
`L5R5E | Empty or unknown technique type[${item.system.technique_type}] forced to "kata" in item id[${item._id}], name[${item.name}]`
|
||||||
);
|
);
|
||||||
item.data.technique_type = "kata";
|
item.system.technique_type = "kata";
|
||||||
}
|
}
|
||||||
out[item.data.technique_type].push(item);
|
out[item.system.technique_type].push(item);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "title":
|
case "title":
|
||||||
// Embed technique in titles
|
// Embed technique in titles
|
||||||
Array.from(item.data.items).forEach(([id, embedItem]) => {
|
Array.from(item.system.items).forEach(([id, embedItem]) => {
|
||||||
if (embedItem.data.type === "technique") {
|
if (embedItem.type === "technique") {
|
||||||
if (!out[embedItem.data.data.technique_type]) {
|
if (!out[embedItem.system.technique_type]) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`L5R5E | Empty or unknown technique type[${embedItem.data.data.technique_type}] forced to "kata" in item id[${id}], name[${embedItem.data.name}], parent: id[${item._id}], name[${item.name}]`
|
`L5R5E | Empty or unknown technique type[${embedItem.system.technique_type}] forced to "kata" in item id[${id}], name[${embedItem.name}], parent: id[${item._id}], name[${item.name}]`
|
||||||
);
|
);
|
||||||
embedItem.data.data.technique_type = "kata";
|
embedItem.system.technique_type = "kata";
|
||||||
}
|
}
|
||||||
out[embedItem.data.data.technique_type].push(embedItem.data);
|
out[embedItem.system.technique_type].push(embedItem);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// If unlocked, add the "title_ability" as technique (or always displayed for npc)
|
// If unlocked, add the "title_ability" as technique (or always displayed for npc)
|
||||||
if (item.data.xp_used >= item.data.xp_cost || this.document.type === "npc") {
|
if (item.system.xp_used >= item.system.xp_cost || this.document.type === "npc") {
|
||||||
out["title_ability"].push(item);
|
out["title_ability"].push(item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -91,17 +91,17 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
// Remove unused techs
|
// Remove unused techs
|
||||||
Object.keys(out).forEach((tech) => {
|
Object.keys(out).forEach((tech) => {
|
||||||
if (out[tech].length < 1 && !sheetData.data.data.techniques[tech] && !schoolTechniques.includes(tech)) {
|
if (out[tech].length < 1 && !sheetData.data.system.techniques[tech] && !schoolTechniques.includes(tech)) {
|
||||||
delete out[tech];
|
delete out[tech];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Manage school add button
|
// Manage school add button
|
||||||
sheetData.data.data.techniques["school_ability"] = out["school_ability"].length === 0;
|
sheetData.data.system.techniques["school_ability"] = out["school_ability"].length === 0;
|
||||||
sheetData.data.data.techniques["mastery_ability"] = out["mastery_ability"].length === 0;
|
sheetData.data.system.techniques["mastery_ability"] = out["mastery_ability"].length === 0;
|
||||||
|
|
||||||
// Always display "school_ability", but display a empty "mastery_ability" field only if rank >= 5
|
// Always display "school_ability", but display a empty "mastery_ability" field only if rank >= 5
|
||||||
if (sheetData.data.data.identity?.school_rank < 5 && out["mastery_ability"].length === 0) {
|
if (sheetData.data.system.identity?.school_rank < 5 && out["mastery_ability"].length === 0) {
|
||||||
delete out["mastery_ability"];
|
delete out["mastery_ability"];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,56 +134,59 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// *** Everything below here is only needed if the sheet is editable ***
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
if (!this.isEditable || this.actor.data.data.soft_locked) {
|
if (!this.isEditable || this.actor.system.soft_locked) {
|
||||||
|
console.log("LR5E | Not editable");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check item type and subtype
|
// Check item type and subtype
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (!item || !["Item", "JournalEntry"].includes(item.documentName) || item.data.type === "property") {
|
if (!item || !["Item", "JournalEntry"].includes(item.documentName) || item.type === "property") {
|
||||||
|
console.log(`LR5E | Wrong subtype ${item?.type}`, item);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specific curriculum journal drop
|
// Specific curriculum journal drop
|
||||||
if (item.documentName === "JournalEntry") {
|
if (item.documentName === "JournalEntry") {
|
||||||
// npc does not have this
|
// npc does not have this
|
||||||
if (!this.actor.data.data.identity?.school_curriculum_journal) {
|
if (!this.actor.system.identity?.school_curriculum_journal) {
|
||||||
|
console.log("LR5E | NPC won't go to school :'(");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.actor.data.data.identity.school_curriculum_journal = {
|
this.actor.system.identity.school_curriculum_journal = {
|
||||||
id: item.data._id,
|
id: item._id,
|
||||||
name: item.data.name,
|
name: item.name,
|
||||||
pack: item.pack || null,
|
pack: item.pack || null,
|
||||||
};
|
};
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
identity: {
|
identity: {
|
||||||
school_curriculum_journal: this.actor.data.data.identity.school_curriculum_journal,
|
school_curriculum_journal: this.actor.system.identity.school_curriculum_journal,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dropped a item with same "id" as one owned
|
// Dropped an item with same "id" as one owned
|
||||||
if (this.actor.data.items) {
|
if (this.actor.items) {
|
||||||
// Exit if we already owned exactly this id (drag a personal item on our own sheet)
|
// Exit if we already owned exactly this id (drag a personal item on our own sheet)
|
||||||
if (
|
if (
|
||||||
this.actor.data.items.some((embedItem) => {
|
this.actor.items.some((embedItem) => {
|
||||||
// Search in children
|
// Search in children
|
||||||
if (embedItem.items instanceof Map && embedItem.items.has(item.data._id)) {
|
if (embedItem.items instanceof Map && embedItem.items.has(item.data._id)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return embedItem.data._id === item.data._id;
|
return embedItem._id === item._id;
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add quantity instead if they have (id is different so use type and name)
|
// Add quantity instead if they have (id is different so use type and name)
|
||||||
if (item.data.data.quantity) {
|
if (item.system.quantity) {
|
||||||
const tmpItem = this.actor.data.items.find(
|
const tmpItem = this.actor.items.find(
|
||||||
(embedItem) => embedItem.name === item.data.name && embedItem.type === item.data.type
|
(embedItem) => embedItem.name === item.name && embedItem.type === item.type
|
||||||
);
|
);
|
||||||
if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) {
|
if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) {
|
||||||
return;
|
return;
|
||||||
@@ -197,13 +200,13 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let itemData = item.data.toObject(true);
|
let itemData = item.toObject(true);
|
||||||
|
|
||||||
// Item subtype specific
|
// Item subtype specific
|
||||||
switch (itemData.type) {
|
switch (itemData.type) {
|
||||||
case "army_cohort":
|
case "army_cohort":
|
||||||
case "army_fortification":
|
case "army_fortification":
|
||||||
console.warn("L5R5E | Army items are not allowed", item?.data?.type, item);
|
console.warn("L5R5E | Army items are not allowed", item?.type, item);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case "advancement":
|
case "advancement":
|
||||||
@@ -216,24 +219,22 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
await item.generateNewIdsForAllEmbedItems();
|
await item.generateNewIdsForAllEmbedItems();
|
||||||
|
|
||||||
// Add embed advancements bonus
|
// Add embed advancements bonus
|
||||||
for (let [embedId, embedItem] of item.data.data.items) {
|
for (let [embedId, embedItem] of item.system.items) {
|
||||||
if (embedItem.data.type === "advancement") {
|
if (embedItem.data.type === "advancement") {
|
||||||
await this.actor.addBonus(embedItem);
|
await this.actor.addBonus(embedItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// refresh data
|
// refresh data
|
||||||
itemData = item.data.toObject(true);
|
itemData = item.toObject(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "technique":
|
case "technique":
|
||||||
// School_ability and mastery_ability, allow only 1 per type
|
// School_ability and mastery_ability, allow only 1 per type
|
||||||
if (CONFIG.l5r5e.techniques.get(itemData.data.technique_type)?.type === "school") {
|
if (CONFIG.l5r5e.techniques.get(itemData.system.technique_type)?.type === "school") {
|
||||||
if (
|
if (
|
||||||
Array.from(this.actor.items).some((e) => {
|
Array.from(this.actor.items).some((e) => {
|
||||||
return (
|
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
||||||
e.type === "technique" && e.data.data.technique_type === itemData.data.technique_type
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
||||||
@@ -241,27 +242,27 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// No cost for schools
|
// No cost for schools
|
||||||
itemData.data.xp_cost = 0;
|
itemData.system.xp_cost = 0;
|
||||||
itemData.data.xp_used = 0;
|
itemData.system.xp_used = 0;
|
||||||
itemData.data.in_curriculum = true;
|
itemData.system.in_curriculum = true;
|
||||||
} else {
|
} else {
|
||||||
// Check if technique is allowed for this character
|
// Check if technique is allowed for this character
|
||||||
if (!game.user.isGM && !this.actor.data.data.techniques[itemData.data.technique_type]) {
|
if (!game.user.isGM && !this.actor.system.techniques[itemData.system.technique_type]) {
|
||||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify cost
|
// Verify cost
|
||||||
itemData.data.xp_cost =
|
itemData.system.xp_cost =
|
||||||
itemData.data.xp_cost > 0 ? itemData.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
itemData.system.xp_cost > 0 ? itemData.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||||
itemData.data.xp_used = itemData.data.xp_cost;
|
itemData.system.xp_used = itemData.system.xp_cost;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify the bought at rank to the current actor rank
|
// Modify the bought at rank to the current actor rank
|
||||||
if (itemData.data.bought_at_rank !== undefined && this.actor.data.data.identity?.school_rank) {
|
if (itemData.system.bought_at_rank !== undefined && this.actor.system.identity?.school_rank) {
|
||||||
itemData.data.bought_at_rank = this.actor.data.data.identity.school_rank;
|
itemData.system.bought_at_rank = this.actor.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally create the embed
|
// Finally create the embed
|
||||||
@@ -332,10 +333,10 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
this.actor.data.data.prepared = !this.actor.data.data.prepared;
|
this.actor.system.prepared = !this.actor.system.prepared;
|
||||||
this.actor.update({
|
this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
prepared: this.actor.data.data.prepared,
|
prepared: this.actor.system.prepared,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.render(false);
|
this.render(false);
|
||||||
@@ -367,26 +368,26 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
const item = this.actor.items.get(created[0].id);
|
const item = this.actor.items.get(created[0].id);
|
||||||
|
|
||||||
// Assign current school rank to the new adv/tech
|
// Assign current school rank to the new adv/tech
|
||||||
if (this.actor.data.data.identity?.school_rank) {
|
if (this.actor.system.identity?.school_rank) {
|
||||||
item.data.data.bought_at_rank = this.actor.data.data.identity.school_rank;
|
item.system.bought_at_rank = this.actor.system.identity.school_rank;
|
||||||
if (["advancement", "technique"].includes(item.data.type)) {
|
if (["advancement", "technique"].includes(item.type)) {
|
||||||
item.data.data.rank = this.actor.data.data.identity.school_rank;
|
item.system.rank = this.actor.system.identity.school_rank;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (item.data.type) {
|
switch (item.type) {
|
||||||
case "item": // no break
|
case "item": // no break
|
||||||
case "armor": // no break
|
case "armor": // no break
|
||||||
case "weapon":
|
case "weapon":
|
||||||
item.data.data.equipped = isEquipped;
|
item.system.equipped = isEquipped;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "technique": {
|
case "technique": {
|
||||||
// If technique, select the current sub-type
|
// If technique, select the current sub-type
|
||||||
if (CONFIG.l5r5e.techniques.get(techniqueType)) {
|
if (CONFIG.l5r5e.techniques.get(techniqueType)) {
|
||||||
item.data.name = game.i18n.localize(`l5r5e.techniques.${techniqueType}`);
|
item.name = game.i18n.localize(`l5r5e.techniques.${techniqueType}`);
|
||||||
item.data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`;
|
item.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`;
|
||||||
item.data.data.technique_type = techniqueType;
|
item.system.technique_type = techniqueType;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -496,8 +497,8 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
const item = this.actor.items.get(itemId);
|
const item = this.actor.items.get(itemId);
|
||||||
if (item.type !== "item") {
|
if (item.type !== "item") {
|
||||||
item.update({
|
item.update({
|
||||||
data: {
|
system: {
|
||||||
in_curriculum: !item.data.data.in_curriculum,
|
in_curriculum: !item.system.in_curriculum,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -510,10 +511,10 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
_modifyQuantity(itemId, add) {
|
_modifyQuantity(itemId, add) {
|
||||||
const tmpItem = this.actor.items.get(itemId);
|
const tmpItem = this.actor.items.get(itemId);
|
||||||
if (tmpItem) {
|
if (tmpItem) {
|
||||||
tmpItem.data.data.quantity = Math.max(1, tmpItem.data.data.quantity + add);
|
tmpItem.system.quantity = Math.max(1, tmpItem.system.quantity + add);
|
||||||
tmpItem.update({
|
tmpItem.update({
|
||||||
data: {
|
system: {
|
||||||
quantity: tmpItem.data.data.quantity,
|
quantity: tmpItem.system.quantity,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
@@ -539,9 +540,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case "fatigue":
|
case "fatigue":
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
fatigue: {
|
fatigue: {
|
||||||
value: Math.max(0, this.actor.data.data.fatigue.value + mod),
|
value: Math.max(0, this.actor.system.fatigue.value + mod),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -549,9 +550,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
case "strife":
|
case "strife":
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
strife: {
|
strife: {
|
||||||
value: Math.max(0, this.actor.data.data.strife.value + mod),
|
value: Math.max(0, this.actor.system.strife.value + mod),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -579,20 +580,20 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
const itemId = $(event.currentTarget).data("item-id");
|
const itemId = $(event.currentTarget).data("item-id");
|
||||||
const tmpItem = this.actor.items.get(itemId);
|
const tmpItem = this.actor.items.get(itemId);
|
||||||
if (!tmpItem || tmpItem.data.data[type] === undefined) {
|
if (!tmpItem || tmpItem.system[type] === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpItem.data.data[type] = !tmpItem.data.data[type];
|
tmpItem.system[type] = !tmpItem.system[type];
|
||||||
const data = {
|
const data = {
|
||||||
equipped: tmpItem.data.data.equipped,
|
equipped: tmpItem.system.equipped,
|
||||||
};
|
};
|
||||||
// Only weapons
|
// Only weapons
|
||||||
if (tmpItem.data.data.readied !== undefined) {
|
if (tmpItem.system.readied !== undefined) {
|
||||||
data.readied = tmpItem.data.data.readied;
|
data.readied = tmpItem.system.readied;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpItem.update({ data });
|
tmpItem.update({ system: data });
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,16 +29,16 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
if (this.isEditable && !this.actor.limited) {
|
if (this.isEditable && !this.actor.limited) {
|
||||||
// Lock/Unlock
|
// Lock/Unlock
|
||||||
buttons.unshift({
|
buttons.unshift({
|
||||||
label: `l5r5e.global.${this.actor.data.data.soft_locked ? "" : "un"}locked`,
|
label: `l5r5e.global.${this.actor.system.soft_locked ? "" : "un"}locked`,
|
||||||
class: "l5r-softlock",
|
class: "l5r-softlock",
|
||||||
icon: this.actor.data.data.soft_locked ? "fas fa-lock" : "fas fa-unlock",
|
icon: this.actor.system.soft_locked ? "fas fa-lock" : "fas fa-unlock",
|
||||||
onclick: () =>
|
onclick: () =>
|
||||||
game.l5r5e.HelpersL5r5e.debounce(
|
game.l5r5e.HelpersL5r5e.debounce(
|
||||||
"lock-" + this.object.id,
|
"lock-" + this.object.id,
|
||||||
() => {
|
() => {
|
||||||
this.actor.update({
|
this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
soft_locked: !this.actor.data.data.soft_locked,
|
soft_locked: !this.actor.system.soft_locked,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -66,8 +66,8 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
// System Header Buttons
|
// System Header Buttons
|
||||||
sheetData.l5rHeaderButtons = this._getL5rHeaderButtons();
|
sheetData.l5rHeaderButtons = this._getL5rHeaderButtons();
|
||||||
@@ -79,8 +79,14 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
return a.name.localeCompare(b.name);
|
return a.name.localeCompare(b.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Editors enrichment
|
||||||
|
sheetData.data.enrichedHtml = {
|
||||||
|
description: await TextEditor.enrichHTML(sheetData.data.system.description, { async: true }),
|
||||||
|
notes: await TextEditor.enrichHTML(sheetData.data.system.notes, { async: true }),
|
||||||
|
};
|
||||||
|
|
||||||
// Shortcut for some tests
|
// Shortcut for some tests
|
||||||
sheetData.data.editable_not_soft_locked = sheetData.editable && !sheetData.data.data.soft_locked;
|
sheetData.data.editable_not_soft_locked = sheetData.editable && !sheetData.data.system.soft_locked;
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
}
|
}
|
||||||
@@ -105,10 +111,10 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
*/
|
*/
|
||||||
activateEditor(name, options = {}, initialContent = "") {
|
activateEditor(name, options = {}, initialContent = "") {
|
||||||
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
||||||
if (["data.notes", "data.description"].includes(name) && initialContent) {
|
if (["system.notes", "system.description"].includes(name) && initialContent) {
|
||||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||||
}
|
}
|
||||||
super.activateEditor(name, options, initialContent);
|
return super.activateEditor(name, options, initialContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export class CharacterGeneratorDialog extends FormApplication {
|
|||||||
* Try to get values from actor to initialize the generator
|
* Try to get values from actor to initialize the generator
|
||||||
*/
|
*/
|
||||||
initializeFromActor() {
|
initializeFromActor() {
|
||||||
const actorDatas = this.actor.data.data;
|
const actorDatas = this.actor.system;
|
||||||
|
|
||||||
// Identity
|
// Identity
|
||||||
this.object.clan = actorDatas.identity.clan || "random";
|
this.object.clan = actorDatas.identity.clan || "random";
|
||||||
@@ -97,7 +97,7 @@ export class CharacterGeneratorDialog extends FormApplication {
|
|||||||
label: game.i18n.localize("l5r5e.clans." + e),
|
label: game.i18n.localize("l5r5e.clans." + e),
|
||||||
}));
|
}));
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
isNpc: this.actor.type === "npc",
|
isNpc: this.actor.type === "npc",
|
||||||
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
|
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
|
||||||
genderList: [
|
genderList: [
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ export class CharacterGenerator {
|
|||||||
narrative: true,
|
narrative: true,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const actorDatas = actor.data.data;
|
const actorDatas = actor.system;
|
||||||
const isNpc = actor.type === "npc";
|
const isNpc = actor.type === "npc";
|
||||||
|
|
||||||
// Need to set some required values
|
// Need to set some required values
|
||||||
@@ -304,7 +304,7 @@ export class CharacterGenerator {
|
|||||||
actorDatas.identity.female = this.isFemale;
|
actorDatas.identity.female = this.isFemale;
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
let newName = actor.data.name;
|
let newName = actor.name;
|
||||||
if (generate.name) {
|
if (generate.name) {
|
||||||
newName =
|
newName =
|
||||||
this.data.family +
|
this.data.family +
|
||||||
@@ -325,9 +325,9 @@ export class CharacterGenerator {
|
|||||||
`${folder}/npc.svg`,
|
`${folder}/npc.svg`,
|
||||||
`${folder}/traditional-japanese-man.svg`,
|
`${folder}/traditional-japanese-man.svg`,
|
||||||
`${folder}/traditional-japanese-woman.svg`,
|
`${folder}/traditional-japanese-woman.svg`,
|
||||||
].includes(actor.data.img)
|
].includes(actor.img)
|
||||||
? `${folder}/traditional-japanese-${this.isFemale ? "woman" : "man"}.svg`
|
? `${folder}/traditional-japanese-${this.isFemale ? "woman" : "man"}.svg`
|
||||||
: actor.data.img;
|
: actor.img;
|
||||||
|
|
||||||
// Generate attributes & Social Standing
|
// Generate attributes & Social Standing
|
||||||
if (generate.attributes) {
|
if (generate.attributes) {
|
||||||
@@ -453,7 +453,7 @@ export class CharacterGenerator {
|
|||||||
*/
|
*/
|
||||||
async _generatePeculiarities(actor, newItemsData) {
|
async _generatePeculiarities(actor, newItemsData) {
|
||||||
// Clear actor peculiarities
|
// Clear actor peculiarities
|
||||||
const deleteIds = actor.data.items.filter((e) => e.type === "peculiarity").map((e) => e.id);
|
const deleteIds = actor.items.filter((e) => e.type === "peculiarity").map((e) => e.id);
|
||||||
if (deleteIds.length > 0) {
|
if (deleteIds.length > 0) {
|
||||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||||
}
|
}
|
||||||
@@ -476,7 +476,7 @@ export class CharacterGenerator {
|
|||||||
*/
|
*/
|
||||||
async _generateItems(actor, newItemsData) {
|
async _generateItems(actor, newItemsData) {
|
||||||
// Clear actor items
|
// Clear actor items
|
||||||
const deleteIds = actor.data.items.filter((e) => ["armor", "weapon", "item"].includes(e.type)).map((e) => e.id);
|
const deleteIds = actor.items.filter((e) => ["armor", "weapon", "item"].includes(e.type)).map((e) => e.id);
|
||||||
if (deleteIds.length > 0) {
|
if (deleteIds.length > 0) {
|
||||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||||
}
|
}
|
||||||
@@ -521,7 +521,7 @@ export class CharacterGenerator {
|
|||||||
*/
|
*/
|
||||||
async _generateTechniques(actor, newItemsData) {
|
async _generateTechniques(actor, newItemsData) {
|
||||||
// Clear actor items
|
// Clear actor items
|
||||||
const deleteIds = actor.data.items.filter((e) => e.type === "technique").map((e) => e.id);
|
const deleteIds = actor.items.filter((e) => e.type === "technique").map((e) => e.id);
|
||||||
if (deleteIds.length > 0) {
|
if (deleteIds.length > 0) {
|
||||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||||
}
|
}
|
||||||
@@ -598,7 +598,7 @@ export class CharacterGenerator {
|
|||||||
const cfg = techCfg[pack];
|
const cfg = techCfg[pack];
|
||||||
|
|
||||||
// Minimum skill required (npc only for now)
|
// Minimum skill required (npc only for now)
|
||||||
if (!!cfg.skill && actor.data.data.skills[cfg.skill.grp_name] < cfg.skill.value_min) {
|
if (!!cfg.skill && actor.system.skills[cfg.skill.grp_name] < cfg.skill.value_min) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,9 +613,10 @@ export class CharacterGenerator {
|
|||||||
let item;
|
let item;
|
||||||
do {
|
do {
|
||||||
item = await CharacterGenerator._getItemFromPack(`l5r5e.core-techniques-${pack}`);
|
item = await CharacterGenerator._getItemFromPack(`l5r5e.core-techniques-${pack}`);
|
||||||
} while (item && item.data.data.rank > avgrv);
|
} while (item && item.system.rank > avgrv);
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
|
console.log(item); //todo tmp check this!
|
||||||
newItemsData.push(foundry.utils.duplicate(item.data));
|
newItemsData.push(foundry.utils.duplicate(item.data));
|
||||||
}
|
}
|
||||||
} // fr qty
|
} // fr qty
|
||||||
|
|||||||
@@ -41,14 +41,14 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
/**
|
/**
|
||||||
* Commons datas
|
* Commons datas
|
||||||
*/
|
*/
|
||||||
getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
// Min rank = 1
|
// Min rank = 1
|
||||||
this.actor.data.data.identity.school_rank = Math.max(1, this.actor.data.data.identity.school_rank);
|
this.actor.system.identity.school_rank = Math.max(1, this.actor.system.identity.school_rank);
|
||||||
|
|
||||||
// Split Money
|
// Split Money
|
||||||
sheetData.data.data.money = this._zeniToMoney(this.actor.data.data.zeni);
|
sheetData.data.system.money = this._zeniToMoney(this.actor.system.zeni);
|
||||||
|
|
||||||
// Split school advancements by rank, and calculate xp spent and add it to total
|
// Split school advancements by rank, and calculate xp spent and add it to total
|
||||||
this._prepareSchoolAdvancement(sheetData);
|
this._prepareSchoolAdvancement(sheetData);
|
||||||
@@ -57,8 +57,8 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
this._prepareOthersAdvancement(sheetData);
|
this._prepareOthersAdvancement(sheetData);
|
||||||
|
|
||||||
// Total
|
// Total
|
||||||
sheetData.data.data.xp_saved = Math.floor(
|
sheetData.data.system.xp_saved = Math.floor(
|
||||||
parseInt(sheetData.data.data.xp_total) - parseInt(sheetData.data.data.xp_spent)
|
parseInt(sheetData.data.system.xp_total) - parseInt(sheetData.data.system.xp_spent)
|
||||||
);
|
);
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
@@ -87,7 +87,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
"data.identity.family",
|
"data.identity.family",
|
||||||
CONFIG.l5r5e.families.get(
|
CONFIG.l5r5e.families.get(
|
||||||
Object.entries(game.i18n.translations.l5r5e.clans).find(
|
Object.entries(game.i18n.translations.l5r5e.clans).find(
|
||||||
([k, v]) => v === this.actor.data.data.identity.clan
|
([k, v]) => v === this.actor.system.identity.clan
|
||||||
)?.[0]
|
)?.[0]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -118,7 +118,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
// TODO class "Active" Bug on load, dunno why :/
|
// TODO class "Active" Bug on load, dunno why :/
|
||||||
this._tabs
|
this._tabs
|
||||||
.find((e) => e._navSelector === ".advancements-tabs")
|
.find((e) => e._navSelector === ".advancements-tabs")
|
||||||
.activate("advancement_rank_" + (this.actor.data.data.identity.school_rank || 0));
|
.activate("advancement_rank_" + (this.actor.system.identity.school_rank || 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,14 +126,14 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
_prepareSchoolAdvancement(sheetData) {
|
_prepareSchoolAdvancement(sheetData) {
|
||||||
const adv = [];
|
const adv = [];
|
||||||
sheetData.data.data.xp_spent = 0;
|
sheetData.data.system.xp_spent = 0;
|
||||||
sheetData.items
|
sheetData.items
|
||||||
.filter((item) => ["peculiarity", "technique", "advancement"].includes(item.type))
|
.filter((item) => ["peculiarity", "technique", "advancement"].includes(item.type))
|
||||||
.forEach((item) => {
|
.forEach((item) => {
|
||||||
const { xp_used_total, xp_used } = game.l5r5e.HelpersL5r5e.getItemsXpCost(item);
|
const { xp_used_total, xp_used } = game.l5r5e.HelpersL5r5e.getItemsXpCost(item);
|
||||||
sheetData.data.data.xp_spent += xp_used_total;
|
sheetData.data.system.xp_spent += xp_used_total;
|
||||||
|
|
||||||
const rank = Math.max(0, item.data.bought_at_rank);
|
const rank = Math.max(0, item.system.bought_at_rank);
|
||||||
if (!adv[rank]) {
|
if (!adv[rank]) {
|
||||||
adv[rank] = {
|
adv[rank] = {
|
||||||
rank: rank,
|
rank: rank,
|
||||||
@@ -162,16 +162,16 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Sort by rank desc
|
// Sort by rank desc
|
||||||
sheetData.data.advancementsOthers.sort((a, b) => (b.data.rank || 0) - (a.data.rank || 0));
|
sheetData.data.advancementsOthers.sort((a, b) => (b.system.rank || 0) - (a.system.rank || 0));
|
||||||
|
|
||||||
// Total xp spent in curriculum & total
|
// Total xp spent in curriculum & total
|
||||||
sheetData.data.advancementsOthersTotalXp = sheetData.data.advancementsOthers.reduce(
|
sheetData.data.advancementsOthersTotalXp = sheetData.data.advancementsOthers.reduce(
|
||||||
(acc, item) => acc + parseInt(item.data.xp_used_total || item.data.xp_used || 0),
|
(acc, item) => acc + parseInt(item.system.xp_used_total || item.system.xp_used || 0),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
// Update the total spent
|
// Update the total spent
|
||||||
sheetData.data.data.xp_spent += sheetData.data.advancementsOthersTotalXp;
|
sheetData.data.system.xp_spent += sheetData.data.advancementsOthersTotalXp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -182,39 +182,39 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
// Clan tag trim if autocomplete in school name
|
// Clan tag trim if autocomplete in school name
|
||||||
if (
|
if (
|
||||||
formData["autoCompleteListName"] === "data.identity.school" &&
|
formData["autoCompleteListName"] === "system.identity.school" &&
|
||||||
formData["autoCompleteListSelectedIndex"] >= 0 &&
|
formData["autoCompleteListSelectedIndex"] >= 0 &&
|
||||||
!!formData["data.identity.clan"] &&
|
!!formData["system.identity.clan"] &&
|
||||||
formData["data.identity.school"].indexOf(` [${formData["data.identity.clan"]}]`) !== -1
|
formData["system.identity.school"].indexOf(` [${formData["system.identity.clan"]}]`) !== -1
|
||||||
) {
|
) {
|
||||||
formData["data.identity.school"] = formData["data.identity.school"].replace(
|
formData["system.identity.school"] = formData["system.identity.school"].replace(
|
||||||
` [${formData["data.identity.clan"]}]`,
|
` [${formData["system.identity.clan"]}]`,
|
||||||
""
|
""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store money in Zeni
|
// Store money in Zeni
|
||||||
if (formData["data.money.koku"] || formData["data.money.bu"] || formData["data.money.zeni"]) {
|
if (formData["system.money.koku"] || formData["system.money.bu"] || formData["system.money.zeni"]) {
|
||||||
formData["data.zeni"] = this._moneyToZeni(
|
formData["system.zeni"] = this._moneyToZeni(
|
||||||
formData["data.money.koku"] || 0,
|
formData["system.money.koku"] || 0,
|
||||||
formData["data.money.bu"] || 0,
|
formData["system.money.bu"] || 0,
|
||||||
formData["data.money.zeni"] || 0
|
formData["system.money.zeni"] || 0
|
||||||
);
|
);
|
||||||
// Remove fake money object
|
// Remove fake money object
|
||||||
delete formData["data.money.koku"];
|
delete formData["system.money.koku"];
|
||||||
delete formData["data.money.bu"];
|
delete formData["system.money.bu"];
|
||||||
delete formData["data.money.zeni"];
|
delete formData["system.money.zeni"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save computed values
|
// Save computed values
|
||||||
const currentData = this.object.data.data;
|
const currentData = this.object.system;
|
||||||
formData["data.focus"] = currentData.focus;
|
formData["system.focus"] = currentData.focus;
|
||||||
formData["data.vigilance"] = currentData.vigilance;
|
formData["system.vigilance"] = currentData.vigilance;
|
||||||
formData["data.endurance"] = currentData.endurance;
|
formData["system.endurance"] = currentData.endurance;
|
||||||
formData["data.composure"] = currentData.composure;
|
formData["system.composure"] = currentData.composure;
|
||||||
formData["data.fatigue.max"] = currentData.fatigue.max;
|
formData["system.fatigue.max"] = currentData.fatigue.max;
|
||||||
formData["data.strife.max"] = currentData.strife.max;
|
formData["system.strife.max"] = currentData.strife.max;
|
||||||
formData["data.void_points.max"] = currentData.void_points.max;
|
formData["system.void_points.max"] = currentData.void_points.max;
|
||||||
|
|
||||||
return super._updateObject(event, formData);
|
return super._updateObject(event, formData);
|
||||||
}
|
}
|
||||||
@@ -276,10 +276,10 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
mod = Math.floor(mod * CONFIG.l5r5e.money[type === "koku" ? 0 : 1]);
|
mod = Math.floor(mod * CONFIG.l5r5e.money[type === "koku" ? 0 : 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.actor.data.data.zeni = +this.actor.data.data.zeni + mod;
|
this.actor.system.zeni = +this.actor.system.zeni + mod;
|
||||||
this.actor.update({
|
this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
zeni: this.actor.data.data.zeni,
|
zeni: this.actor.system.zeni,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.render(false);
|
this.render(false);
|
||||||
@@ -294,11 +294,11 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
this.actor.data.data.identity.school_rank = this.actor.data.data.identity.school_rank + 1;
|
this.actor.system.identity.school_rank = this.actor.system.identity.school_rank + 1;
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
identity: {
|
identity: {
|
||||||
school_rank: this.actor.data.data.identity.school_rank,
|
school_rank: this.actor.system.identity.school_rank,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -314,7 +314,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
const actorJournal = this.actor.data.data.identity.school_curriculum_journal;
|
const actorJournal = this.actor.system.identity.school_curriculum_journal;
|
||||||
if (!actorJournal.id) {
|
if (!actorJournal.id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
_getL5rHeaderButtons() {
|
_getL5rHeaderButtons() {
|
||||||
const buttons = super._getL5rHeaderButtons();
|
const buttons = super._getL5rHeaderButtons();
|
||||||
if (!this.isEditable || this.actor.limited || this.actor.data.data.soft_locked) {
|
if (!this.isEditable || this.actor.limited || this.actor.system.soft_locked) {
|
||||||
return buttons;
|
return buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,11 +41,11 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
getData(options = {}) {
|
async getData(options = {}) {
|
||||||
const sheetData = super.getData();
|
const sheetData = await super.getData();
|
||||||
|
|
||||||
// NPC Subtypes
|
// NPC Subtypes
|
||||||
sheetData.data.data.types = NpcSheetL5r5e.types.map((e) => ({
|
sheetData.data.types = NpcSheetL5r5e.types.map((e) => ({
|
||||||
id: e,
|
id: e,
|
||||||
label: game.i18n.localize("l5r5e.character_types." + e),
|
label: game.i18n.localize("l5r5e.character_types." + e),
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
const skillsListStep7 = this._getSkillZero(skillsList, skillsPoints, "step7.skill");
|
const skillsListStep7 = this._getSkillZero(skillsList, skillsPoints, "step7.skill");
|
||||||
const skillsListStep17 = this._getSkillZero(skillsList, skillsPoints, "step17.skill");
|
const skillsListStep17 = this._getSkillZero(skillsList, skillsPoints, "step17.skill");
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),
|
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),
|
||||||
skillsList,
|
skillsList,
|
||||||
skillsListStep7,
|
skillsListStep7,
|
||||||
@@ -260,20 +260,20 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
// Get item
|
// Get item
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (item.documentName !== "Item" || !item) {
|
if (item.documentName !== "Item" || !item) {
|
||||||
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.data.type}`);
|
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specific step18_heritage, all item/tech allowed
|
// Specific step18_heritage, all item/tech allowed
|
||||||
if (stepKey === "step18.heritage_item") {
|
if (stepKey === "step18.heritage_item") {
|
||||||
type = item.data.type;
|
type = item.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(type !== "item" && item.data.type !== type) ||
|
(type !== "item" && item.type !== type) ||
|
||||||
(type === "item" && !["item", "weapon", "armor"].includes(item.data.type))
|
(type === "item" && !["item", "weapon", "armor"].includes(item.type))
|
||||||
) {
|
) {
|
||||||
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.data.type}`);
|
console.warn(`L5R5E | Forbidden item for this drop zone ${type} : ${item.type}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,13 +284,13 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
case "technique":
|
case "technique":
|
||||||
// School Ability
|
// School Ability
|
||||||
if (stepKey === "step3.school_ability") {
|
if (stepKey === "step3.school_ability") {
|
||||||
if (item.data.data.technique_type !== "school_ability") {
|
if (item.system.technique_type !== "school_ability") {
|
||||||
console.warn(
|
console.warn(
|
||||||
`L5R5E | This technique is not a school ability : ${item.data.data.technique_type}`
|
`L5R5E | This technique is not a school ability : ${item.system.technique_type}`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!this.object.data.step3.allowed_techniques?.[item.data.data.technique_type]) {
|
} else if (!this.object.data.step3.allowed_techniques?.[item.system.technique_type]) {
|
||||||
// Tech not allowed
|
// Tech not allowed
|
||||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||||
return;
|
return;
|
||||||
@@ -300,38 +300,38 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
case "peculiarity":
|
case "peculiarity":
|
||||||
switch (stepKey) {
|
switch (stepKey) {
|
||||||
case "step9.distinction":
|
case "step9.distinction":
|
||||||
if (item.data.data.peculiarity_type !== "distinction") {
|
if (item.system.peculiarity_type !== "distinction") {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step10.adversity":
|
case "step10.adversity":
|
||||||
if (item.data.data.peculiarity_type !== "adversity") {
|
if (item.system.peculiarity_type !== "adversity") {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step11.passion":
|
case "step11.passion":
|
||||||
if (item.data.data.peculiarity_type !== "passion") {
|
if (item.system.peculiarity_type !== "passion") {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step12.anxiety":
|
case "step12.anxiety":
|
||||||
if (item.data.data.peculiarity_type !== "anxiety") {
|
if (item.system.peculiarity_type !== "anxiety") {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step13.advantage":
|
case "step13.advantage":
|
||||||
if (!["distinction", "passion"].includes(item.data.data.peculiarity_type)) {
|
if (!["distinction", "passion"].includes(item.system.peculiarity_type)) {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "step13.disadvantage":
|
case "step13.disadvantage":
|
||||||
if (!["adversity", "anxiety"].includes(item.data.data.peculiarity_type)) {
|
if (!["adversity", "anxiety"].includes(item.system.peculiarity_type)) {
|
||||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -391,9 +391,9 @@ export class TwentyQuestionsDialog extends FormApplication {
|
|||||||
this.summary = this.object.validateForm();
|
this.summary = this.object.validateForm();
|
||||||
|
|
||||||
// Store this form datas in actor
|
// Store this form datas in actor
|
||||||
this.actor.data.data.twenty_questions = this.object.data;
|
this.actor.system.twenty_questions = this.object.data;
|
||||||
await this.actor.update({
|
await this.actor.update({
|
||||||
data: {
|
system: {
|
||||||
template: formData["template"],
|
template: formData["template"],
|
||||||
twenty_questions: this.object.data,
|
twenty_questions: this.object.data,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -191,10 +191,10 @@ export class TwentyQuestions {
|
|||||||
* Initialize data from a actor
|
* Initialize data from a actor
|
||||||
*/
|
*/
|
||||||
fromActor(actor) {
|
fromActor(actor) {
|
||||||
const actorDatas = actor.data.data;
|
const actorDatas = actor.system;
|
||||||
|
|
||||||
// already 20q struct ?
|
// already 20q struct ?
|
||||||
if (!foundry.utils.isObjectEmpty(actorDatas.twenty_questions)) {
|
if (!foundry.utils.isEmpty(actorDatas.twenty_questions)) {
|
||||||
this.data = {
|
this.data = {
|
||||||
...this.data,
|
...this.data,
|
||||||
...actorDatas.twenty_questions,
|
...actorDatas.twenty_questions,
|
||||||
@@ -220,14 +220,14 @@ export class TwentyQuestions {
|
|||||||
this.data.step6.social_ninjo = actorDatas.social.ninjo;
|
this.data.step6.social_ninjo = actorDatas.social.ninjo;
|
||||||
this.data.step8.tenet_paramount = actorDatas.social.bushido_tenets.paramount;
|
this.data.step8.tenet_paramount = actorDatas.social.bushido_tenets.paramount;
|
||||||
this.data.step8.tenet_less_significant = actorDatas.social.bushido_tenets.less_significant;
|
this.data.step8.tenet_less_significant = actorDatas.social.bushido_tenets.less_significant;
|
||||||
this.data.step19.firstname = actor.data.name.replace(/^(?:\w+\s+)?(.+)$/gi, "$1") || "";
|
this.data.step19.firstname = actor.name.replace(/^(?:\w+\s+)?(.+)$/gi, "$1") || "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fill a actor data from this object
|
* Fill a actor data from this object
|
||||||
*/
|
*/
|
||||||
async toActor(actor, itemsCache) {
|
async toActor(actor, itemsCache) {
|
||||||
const actorDatas = actor.data.data;
|
const actorDatas = actor.system;
|
||||||
const formData = this.data;
|
const formData = this.data;
|
||||||
|
|
||||||
this.data.generated = true;
|
this.data.generated = true;
|
||||||
@@ -304,7 +304,7 @@ export class TwentyQuestions {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Clear and add items to actor
|
// Clear and add items to actor
|
||||||
const deleteIds = actor.data.items.map((e) => e.id);
|
const deleteIds = actor.items.map((e) => e.id);
|
||||||
if (deleteIds.length > 0) {
|
if (deleteIds.length > 0) {
|
||||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ export class TwentyQuestions {
|
|||||||
// Update actor
|
// Update actor
|
||||||
await actor.update({
|
await actor.update({
|
||||||
name: ((formData.template !== "pow" ? formData.step2.family + " " : "") + formData.step19.firstname).trim(),
|
name: ((formData.template !== "pow" ? formData.step2.family + " " : "") + formData.step19.firstname).trim(),
|
||||||
data: actorDatas,
|
system: actorDatas,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,10 @@ export class CombatL5r5e extends Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shortcut to data
|
// Shortcut to data
|
||||||
const data = combatant.actor.data.data;
|
const data = combatant.actor.system;
|
||||||
|
|
||||||
// Prepared is a boolean or if null we get the info in the actor sheet
|
// Prepared is a boolean or if null we get the info in the actor sheet
|
||||||
const isPc = combatant.actor.data.type === "character";
|
const isPc = combatant.actor.type === "character";
|
||||||
const isPrepared = combatant.actor.isPrepared;
|
const isPrepared = combatant.actor.isPrepared;
|
||||||
|
|
||||||
// A character’s initiative value is based on their state of preparedness when the conflict began.
|
// A character’s initiative value is based on their state of preparedness when the conflict began.
|
||||||
@@ -145,17 +145,15 @@ export class CombatL5r5e extends Combat {
|
|||||||
// if tie : sort by honor, less honorable first
|
// if tie : sort by honor, less honorable first
|
||||||
if (a.initiative === b.initiative) {
|
if (a.initiative === b.initiative) {
|
||||||
// skip if no actor or if armies
|
// skip if no actor or if armies
|
||||||
if (!a.actor || !b.actor || a.actor.data.type === "army" || b.actor.data.type === "army") {
|
if (!a.actor || !b.actor || a.actor.type === "army" || b.actor.type === "army") {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if tie again : Character > Adversary > Minion
|
// if tie again : Character > Adversary > Minion
|
||||||
if (a.actor.data.data.social.honor === b.actor.data.data.social.honor) {
|
if (a.actor.system.social.honor === b.actor.system.social.honor) {
|
||||||
return (
|
return CombatL5r5e._getWeightByActorType(a.actor) - CombatL5r5e._getWeightByActorType(b.actor);
|
||||||
CombatL5r5e._getWeightByActorType(a.actor.data) - CombatL5r5e._getWeightByActorType(b.actor.data)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return a.actor.data.data.social.honor - b.actor.data.data.social.honor;
|
return a.actor.system.social.honor - b.actor.system.social.honor;
|
||||||
}
|
}
|
||||||
return b.initiative - a.initiative;
|
return b.initiative - a.initiative;
|
||||||
}
|
}
|
||||||
@@ -165,6 +163,6 @@ export class CombatL5r5e extends Combat {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
static _getWeightByActorType(data) {
|
static _getWeightByActorType(data) {
|
||||||
return data.type === "npc" ? (data.data.type === "minion" ? 3 : 2) : 1;
|
return data.type === "npc" ? (data.type === "minion" ? 3 : 2) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._actor = actor;
|
this._actor = actor;
|
||||||
this.ringId = this._actor.data.data.stance;
|
this.ringId = this._actor.system.stance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -190,8 +190,8 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
set targetInfos(targetToken) {
|
set targetInfos(targetToken) {
|
||||||
this.object.targetInfos = targetToken
|
this.object.targetInfos = targetToken
|
||||||
? {
|
? {
|
||||||
img: targetToken.data.img,
|
img: targetToken.img,
|
||||||
name: targetToken.data.name,
|
name: targetToken.name,
|
||||||
}
|
}
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
@@ -202,7 +202,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
*/
|
*/
|
||||||
set ringId(ringId) {
|
set ringId(ringId) {
|
||||||
this.object.ring.id = CONFIG.l5r5e.stances.includes(ringId) ? ringId : "void";
|
this.object.ring.id = CONFIG.l5r5e.stances.includes(ringId) ? ringId : "void";
|
||||||
this.object.ring.value = this._actor.data.data.rings?.[this.object.ring.id] || 1;
|
this.object.ring.value = this._actor.system.rings?.[this.object.ring.id] || 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -268,15 +268,15 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
if (!this._actor) {
|
if (!this._actor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (this._actor.data.type) {
|
switch (this._actor.type) {
|
||||||
case "character":
|
case "character":
|
||||||
this.object.skill.value = this._actor.data.data.skills[skillCatId]?.[this.object.skill.id] || 0;
|
this.object.skill.value = this._actor.system.skills[skillCatId]?.[this.object.skill.id] || 0;
|
||||||
this.object.skill.defaultValue = this.object.skill.value;
|
this.object.skill.defaultValue = this.object.skill.value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "npc":
|
case "npc":
|
||||||
// Skill value is in categories for npc
|
// Skill value is in categories for npc
|
||||||
this.object.skill.value = this._actor.data.data.skills[skillCatId] || 0;
|
this.object.skill.value = this._actor.system.skills[skillCatId] || 0;
|
||||||
this.object.skill.defaultValue = this.object.skill.value;
|
this.object.skill.defaultValue = this.object.skill.value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -317,7 +317,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* @type {String}
|
* @type {String}
|
||||||
*/
|
*/
|
||||||
get title() {
|
get title() {
|
||||||
return game.i18n.localize("l5r5e.dice.dicepicker.title") + (this._actor ? " - " + this._actor.data.name : "");
|
return game.i18n.localize("l5r5e.dice.dicepicker.title") + (this._actor ? " - " + this._actor.name : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -325,7 +325,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get useCategory() {
|
get useCategory() {
|
||||||
return !!this._actor && this._actor.data?.type === "npc";
|
return !!this._actor && this._actor.type === "npc";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -333,9 +333,9 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
* @param options
|
* @param options
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
getData(options = null) {
|
async getData(options = null) {
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(this._actor),
|
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(this._actor),
|
||||||
data: this.object,
|
data: this.object,
|
||||||
actor: this._actor,
|
actor: this._actor,
|
||||||
@@ -343,7 +343,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
canUseVoidPoint:
|
canUseVoidPoint:
|
||||||
this.object.difficulty.addVoidPoint ||
|
this.object.difficulty.addVoidPoint ||
|
||||||
!this._actor ||
|
!this._actor ||
|
||||||
(this._actor.isCharacter && this._actor.data.data.void_points.value > 0),
|
(this._actor.isCharacter && this._actor.system.void_points.value > 0),
|
||||||
disableSubmit: this.object.skill.value < 1 && this.object.ring.value < 1,
|
disableSubmit: this.object.skill.value < 1 && this.object.ring.value < 1,
|
||||||
difficultyHiddenIsLock: this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option,
|
difficultyHiddenIsLock: this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option,
|
||||||
};
|
};
|
||||||
@@ -485,7 +485,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
|
|
||||||
// Update Actor
|
// Update Actor
|
||||||
if (this._actor) {
|
if (this._actor) {
|
||||||
const actorData = foundry.utils.duplicate(this._actor.data.data);
|
const actorData = foundry.utils.duplicate(this._actor.system);
|
||||||
|
|
||||||
// Update the actor stance on initiative only
|
// Update the actor stance on initiative only
|
||||||
if (this.object.isInitiativeRoll) {
|
if (this.object.isInitiativeRoll) {
|
||||||
@@ -503,10 +503,10 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update actor if needed
|
// Update actor if needed
|
||||||
const updateDiff = foundry.utils.diffObject(this._actor.data.data, actorData);
|
const updateDiff = foundry.utils.diffObject(this._actor.system, actorData);
|
||||||
if (Object.keys(updateDiff).length > 0) {
|
if (Object.keys(updateDiff).length > 0) {
|
||||||
await this._actor.update({
|
await this._actor.update({
|
||||||
data: foundry.utils.diffObject(this._actor.data.data, actorData),
|
system: updateDiff,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -588,7 +588,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
this.object.useVoidPoint &&
|
this.object.useVoidPoint &&
|
||||||
!this.object.difficulty.addVoidPoint &&
|
!this.object.difficulty.addVoidPoint &&
|
||||||
!!this._actor &&
|
!!this._actor &&
|
||||||
this._actor.data.data.void_points.value < 1
|
this._actor.system.void_points.value < 1
|
||||||
) {
|
) {
|
||||||
this.object.useVoidPoint = false;
|
this.object.useVoidPoint = false;
|
||||||
this._quantityChange("ring", -1);
|
this._quantityChange("ring", -1);
|
||||||
@@ -619,7 +619,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
|
|
||||||
let command = `new game.l5r5e.DicePickerDialog(${JSON.stringify(params)}).render(true);`;
|
let command = `new game.l5r5e.DicePickerDialog(${JSON.stringify(params)}).render(true);`;
|
||||||
|
|
||||||
let macro = game.macros.contents.find((m) => m.data.name === name && m.data.command === command);
|
let macro = game.macros.contents.find((m) => m.name === name && m.command === command);
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
macro = await Macro.create({
|
macro = await Macro.create({
|
||||||
name: name,
|
name: name,
|
||||||
@@ -631,7 +631,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search if already in player hotbar
|
// Search if already in player hotbar
|
||||||
if (Object.values(game.user.data.hotbar).includes(macro.id)) {
|
if (Object.values(game.user.hotbar).includes(macro.id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,7 +663,7 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targetData = targetActor.data.data;
|
const targetData = targetActor.system;
|
||||||
const value = targetActor[property] || targetData[property] || null;
|
const value = targetActor[property] || targetData[property] || null;
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return acc;
|
return acc;
|
||||||
@@ -734,8 +734,8 @@ export class DicePickerDialog extends FormApplication {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check in actor.<prop> or actor.data.data.<prop>
|
// Check in actor.<prop> or actor.system.<prop>
|
||||||
difficulty = targetActor[infos[2]] || targetActor.data.data[infos[2]] || null;
|
difficulty = targetActor[infos[2]] || targetActor.system[infos[2]] || null;
|
||||||
if (difficulty < 1) {
|
if (difficulty < 1) {
|
||||||
console.log("L5R5E | Fail to parse difficulty from target");
|
console.log("L5R5E | Fail to parse difficulty from target");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -78,12 +78,20 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
return this._message;
|
return this._message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current (first) Roll in ChatMessage
|
||||||
|
* @returns {RollL5r5e}
|
||||||
|
*/
|
||||||
|
get messageRoll() {
|
||||||
|
return this._message?.rolls?.[0] || null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if this actor has right on this roll
|
* Return true if this actor has right on this roll
|
||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
get isOwner() {
|
get isOwner() {
|
||||||
return this._message?.isAuthor || this._message?._roll.l5r5e.actor?.isOwner || this._message?.isOwner || false;
|
return this._message?.isAuthor || this.messageRoll.l5r5e.actor?.isOwner || this._message?.isOwner || false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -137,7 +145,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the roll
|
// Get the roll
|
||||||
this.roll = game.l5r5e.RollL5r5e.fromData(this._message._roll);
|
this.roll = game.l5r5e.RollL5r5e.fromData(this.messageRoll);
|
||||||
|
|
||||||
// Already history
|
// Already history
|
||||||
if (Array.isArray(this.roll.l5r5e.history)) {
|
if (Array.isArray(this.roll.l5r5e.history)) {
|
||||||
@@ -223,7 +231,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
* @param options
|
* @param options
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
getData(options = null) {
|
async getData(options = null) {
|
||||||
const rollData = this.roll.l5r5e;
|
const rollData = this.roll.l5r5e;
|
||||||
|
|
||||||
// Disable submit / edition
|
// Disable submit / edition
|
||||||
@@ -239,7 +247,7 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
showChoices: options.editable && !rollData.rnkEnded,
|
showChoices: options.editable && !rollData.rnkEnded,
|
||||||
showStrifeBt: options.editable && rollData.summary.strife > 0 && rollData.actor?.isCharacter,
|
showStrifeBt: options.editable && rollData.summary.strife > 0 && rollData.actor?.isCharacter,
|
||||||
@@ -707,9 +715,9 @@ export class RollnKeepDialog extends FormApplication {
|
|||||||
const actorMod = strifeApplied - this.roll.l5r5e.strifeApplied;
|
const actorMod = strifeApplied - this.roll.l5r5e.strifeApplied;
|
||||||
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacter) {
|
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacter) {
|
||||||
await this.roll.l5r5e.actor.update({
|
await this.roll.l5r5e.actor.update({
|
||||||
data: {
|
system: {
|
||||||
strife: {
|
strife: {
|
||||||
value: Math.max(0, this.roll.l5r5e.actor.data.data.strife.value + actorMod),
|
value: Math.max(0, this.roll.l5r5e.actor.system.strife.value + actorMod),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ export class RollL5r5e extends Roll {
|
|||||||
set targetInfos(targetToken) {
|
set targetInfos(targetToken) {
|
||||||
this.l5r5e.targetInfos = targetToken
|
this.l5r5e.targetInfos = targetToken
|
||||||
? {
|
? {
|
||||||
img: targetToken.data.img,
|
img: targetToken.img,
|
||||||
name: targetToken.data.name,
|
name: targetToken.name,
|
||||||
}
|
}
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
@@ -378,7 +378,7 @@ export class RollL5r5e extends Roll {
|
|||||||
} else if (data.l5r5e.actor.uuid) {
|
} else if (data.l5r5e.actor.uuid) {
|
||||||
// Only uuid, get the object
|
// Only uuid, get the object
|
||||||
let actor;
|
let actor;
|
||||||
let tmpItem = game.l5r5e.HelpersL5r5e.fromUuidNoPack(data.l5r5e.actor.uuid);
|
const tmpItem = fromUuidSync(data.l5r5e.actor.uuid);
|
||||||
if (tmpItem instanceof Actor) {
|
if (tmpItem instanceof Actor) {
|
||||||
actor = tmpItem;
|
actor = tmpItem;
|
||||||
} else if (tmpItem instanceof TokenDocument) {
|
} else if (tmpItem instanceof TokenDocument) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
actors = game.actors.filter((e) => ids.includes(e.id));
|
actors = game.actors.filter((e) => ids.includes(e.id));
|
||||||
} else {
|
} else {
|
||||||
// If empty add pc with owner
|
// If empty add pc with owner
|
||||||
actors = game.actors.filter((actor) => actor.data.type === "character" && actor.hasPlayerOwner);
|
actors = game.actors.filter((actor) => actor.type === "character" && actor.hasPlayerOwner);
|
||||||
this._saveActorsIds();
|
this._saveActorsIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,9 +120,9 @@ export class GmMonitor extends FormApplication {
|
|||||||
* @return {Object}
|
* @return {Object}
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
getData(options = null) {
|
async getData(options = null) {
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
data: {
|
data: {
|
||||||
...this.object,
|
...this.object,
|
||||||
actors: this.object.actors.filter((e) =>
|
actors: this.object.actors.filter((e) =>
|
||||||
@@ -197,12 +197,13 @@ export class GmMonitor extends FormApplication {
|
|||||||
if (!json) {
|
if (!json) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = JSON.parse(json);
|
const data = JSON.parse(json);
|
||||||
if (!data || data.type !== "Actor" || !data.id || !!this.object.actors.find((e) => e.id === data.id)) {
|
if (!data || data.type !== "Actor" || !data.uuid || !!this.object.actors.find((a) => a.uuid === data.uuid)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const actor = game.actors.find((e) => e.id === data.id);
|
const actor = game.actors.find((a) => a.uuid === data.uuid);
|
||||||
if (!actor) {
|
if (!actor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -275,8 +276,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
const add = event.which === 2 ? -999 : event.which === 1 ? 1 : -1;
|
const add = event.which === 2 ? -999 : event.which === 1 ? 1 : -1;
|
||||||
|
|
||||||
// Stance
|
// Stance
|
||||||
let stanceIdx =
|
let stanceIdx = CONFIG.l5r5e.stances.findIndex((s) => s === actor.system.stance) + (event.which === 1 ? 1 : -1);
|
||||||
CONFIG.l5r5e.stances.findIndex((s) => s === actor.data.data.stance) + (event.which === 1 ? 1 : -1);
|
|
||||||
if (stanceIdx < 0) {
|
if (stanceIdx < 0) {
|
||||||
stanceIdx = CONFIG.l5r5e.stances.length - 1;
|
stanceIdx = CONFIG.l5r5e.stances.length - 1;
|
||||||
} else if (stanceIdx > CONFIG.l5r5e.stances.length - 1) {
|
} else if (stanceIdx > CONFIG.l5r5e.stances.length - 1) {
|
||||||
@@ -287,40 +287,40 @@ export class GmMonitor extends FormApplication {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
// *** Characters ***
|
// *** Characters ***
|
||||||
case "fatigue":
|
case "fatigue":
|
||||||
updateData["data.fatigue.value"] = Math.max(0, actor.data.data.fatigue.value + add);
|
updateData["system.fatigue.value"] = Math.max(0, actor.system.fatigue.value + add);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "strife":
|
case "strife":
|
||||||
updateData["data.strife.value"] = Math.max(0, actor.data.data.strife.value + add);
|
updateData["system.strife.value"] = Math.max(0, actor.system.strife.value + add);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "void_points":
|
case "void_points":
|
||||||
updateData["data.void_points.value"] = Math.min(
|
updateData["system.void_points.value"] = Math.min(
|
||||||
actor.data.data.void_points.max,
|
actor.system.void_points.max,
|
||||||
Math.max(0, actor.data.data.void_points.value + add)
|
Math.max(0, actor.system.void_points.value + add)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "stance":
|
case "stance":
|
||||||
updateData["data.stance"] = CONFIG.l5r5e.stances[stanceIdx];
|
updateData["system.stance"] = CONFIG.l5r5e.stances[stanceIdx];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "prepared":
|
case "prepared":
|
||||||
updateData["data.prepared"] = !actor.data.data.prepared;
|
updateData["system.prepared"] = !actor.system.prepared;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// *** Armies ***
|
// *** Armies ***
|
||||||
case "casualties":
|
case "casualties":
|
||||||
updateData["data.battle_readiness.casualties_strength.value"] = Math.max(
|
updateData["system.battle_readiness.casualties_strength.value"] = Math.max(
|
||||||
0,
|
0,
|
||||||
actor.data.data.battle_readiness.casualties_strength.value + add
|
actor.system.battle_readiness.casualties_strength.value + add
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "panic":
|
case "panic":
|
||||||
updateData["data.battle_readiness.panic_discipline.value"] = Math.max(
|
updateData["system.battle_readiness.panic_discipline.value"] = Math.max(
|
||||||
0,
|
0,
|
||||||
actor.data.data.battle_readiness.panic_discipline.value + add
|
actor.system.battle_readiness.panic_discipline.value + add
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ export class GmMonitor extends FormApplication {
|
|||||||
console.warn("L5R5E | Unsupported type", type);
|
console.warn("L5R5E | Unsupported type", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
await actor.update(updateData);
|
await actor.update(updateData);
|
||||||
this.render(false);
|
this.render(false);
|
||||||
}
|
}
|
||||||
@@ -336,52 +336,52 @@ export class GmMonitor extends FormApplication {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get tooltips information for this character
|
* Get tooltips information for this character
|
||||||
* @param {BaseSheetL5r5e} actor
|
* @param {ActorL5r5e} actor
|
||||||
* @return {string}
|
* @return {string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _getTooltipGlobal(actor) {
|
async _getTooltipGlobal(actor) {
|
||||||
const data = actor.data.data;
|
const actorData = (await actor.sheet?.getData()?.data) || actor;
|
||||||
|
|
||||||
// Peculiarities
|
// Peculiarities
|
||||||
const pec = actor.items.filter((e) => e.type === "peculiarity");
|
const pec = actor.items.filter((e) => e.type === "peculiarity");
|
||||||
const adv = pec
|
const adv = pec
|
||||||
.filter((e) => ["distinction", "passion"].includes(e.data.data.peculiarity_type))
|
.filter((e) => ["distinction", "passion"].includes(e.system.peculiarity_type))
|
||||||
.map((e) => e.name)
|
.map((e) => e.name)
|
||||||
.join(", ");
|
.join(", ");
|
||||||
const dis = pec
|
const dis = pec
|
||||||
.filter((e) => ["adversity", "anxiety"].includes(e.data.data.peculiarity_type))
|
.filter((e) => ["adversity", "anxiety"].includes(e.system.peculiarity_type))
|
||||||
.map((e) => e.name)
|
.map((e) => e.name)
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
|
||||||
// *** Template ***
|
// *** Template ***
|
||||||
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global.html`, {
|
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global.html`, {
|
||||||
actorData: data,
|
actorData: actorData,
|
||||||
advantages: adv,
|
advantages: adv,
|
||||||
disadvantages: dis,
|
disadvantages: dis,
|
||||||
suffix: data.template === "pow" ? "_pow" : "",
|
suffix: actorData.system.template === "pow" ? "_pow" : "",
|
||||||
actor_type: actor.data.type,
|
actor_type: actor.type,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get tooltips informations for this army
|
* Get tooltips information for this army
|
||||||
* @param {BaseSheetL5r5e} actor
|
* @param {ActorL5r5e} actor
|
||||||
* @return {string}
|
* @return {string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _getTooltipArmiesGlobal(actor) {
|
async _getTooltipArmiesGlobal(actor) {
|
||||||
const actorData = (await actor.sheet?.getData()) || actor.data;
|
const actorData = (await actor.sheet?.getData()?.data) || actor;
|
||||||
|
|
||||||
// *** Template ***
|
// *** Template ***
|
||||||
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global-armies.html`, {
|
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global-armies.html`, {
|
||||||
actorData: actorData.data,
|
actorData: actorData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get weapons informations for this actor
|
* Get weapons information for this actor
|
||||||
* @param {BaseSheetL5r5e} actor
|
* @param {ActorL5r5e} actor
|
||||||
* @return {string}
|
* @return {string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@@ -397,12 +397,12 @@ export class GmMonitor extends FormApplication {
|
|||||||
|
|
||||||
// Readied Weapons
|
// Readied Weapons
|
||||||
const readied = actor.items
|
const readied = actor.items
|
||||||
.filter((e) => e.type === "weapon" && e.data.data.equipped && !!e.data.data.readied)
|
.filter((e) => e.type === "weapon" && e.system.equipped && !!e.system.readied)
|
||||||
.map((e) => display(e));
|
.map((e) => display(e));
|
||||||
|
|
||||||
// Equipped Weapons
|
// Equipped Weapons
|
||||||
const sheathed = actor.items
|
const sheathed = actor.items
|
||||||
.filter((e) => e.type === "weapon" && e.data.data.equipped && !e.data.data.readied)
|
.filter((e) => e.type === "weapon" && e.system.equipped && !e.system.readied)
|
||||||
.map((e) => display(e));
|
.map((e) => display(e));
|
||||||
|
|
||||||
// *** Template ***
|
// *** Template ***
|
||||||
@@ -413,20 +413,20 @@ export class GmMonitor extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get armors informations for this actor
|
* Get armors information for this actor
|
||||||
* @param {BaseSheetL5r5e} actor
|
* @param {ActorL5r5e} actor
|
||||||
* @return {string}
|
* @return {string}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _getTooltipArmors(actor) {
|
async _getTooltipArmors(actor) {
|
||||||
// Equipped Armors
|
// Equipped Armors
|
||||||
const armors = actor.items
|
const armors = actor.items
|
||||||
.filter((e) => e.type === "armor" && e.data.data.equipped)
|
.filter((e) => e.type === "armor" && e.system.equipped)
|
||||||
.map(
|
.map(
|
||||||
(e) =>
|
(e) =>
|
||||||
e.name +
|
e.name +
|
||||||
` (<i class="fas fa-tint">${e.data.data.armor.physical}</i>` +
|
` (<i class="fas fa-tint">${e.system.armor.physical}</i>` +
|
||||||
` / <i class="fas fa-bolt">${e.data.data.armor.supernatural}</i>)`
|
` / <i class="fas fa-bolt">${e.system.armor.supernatural}</i>)`
|
||||||
);
|
);
|
||||||
|
|
||||||
// *** Template ***
|
// *** Template ***
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ export class GmToolbox extends FormApplication {
|
|||||||
// TODO better implementation needed : see KeyboardManager._onEscape(event, up, modifiers)
|
// TODO better implementation needed : see KeyboardManager._onEscape(event, up, modifiers)
|
||||||
// This windows is always open, so esc key is stuck at step 2 : Object.keys(ui.windows).length > 0
|
// This windows is always open, so esc key is stuck at step 2 : Object.keys(ui.windows).length > 0
|
||||||
// Case 3 (GM) - release controlled objects
|
// Case 3 (GM) - release controlled objects
|
||||||
if (canvas?.ready && game.user.isGM && Object.keys(canvas.activeLayer._controlled).length) {
|
if (canvas?.ready && game.user.isGM && Object.keys(canvas.activeLayer.controlled).length) {
|
||||||
canvas.activeLayer.releaseAll();
|
canvas.activeLayer.releaseAll();
|
||||||
} else {
|
} else {
|
||||||
// Case 4 - toggle the main menu
|
// Case 4 - toggle the main menu
|
||||||
@@ -102,9 +102,9 @@ export class GmToolbox extends FormApplication {
|
|||||||
* @return {Object}
|
* @return {Object}
|
||||||
* @override
|
* @override
|
||||||
*/
|
*/
|
||||||
getData(options = null) {
|
async getData(options = null) {
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
data: this.object,
|
data: this.object,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -201,46 +201,46 @@ export class GmToolbox extends FormApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Manage left/right button
|
// Manage left/right button
|
||||||
if (!isAll && (actor.data.type !== "character" || !actor.hasPlayerOwner)) {
|
if (!isAll && (actor.type !== "character" || !actor.hasPlayerOwner)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "sleep":
|
case "sleep":
|
||||||
// Remove 'water x2' fatigue points
|
// Remove 'water x2' fatigue points
|
||||||
actor.data.data.fatigue.value = Math.max(
|
actor.system.fatigue.value = Math.max(
|
||||||
0,
|
0,
|
||||||
actor.data.data.fatigue.value - Math.ceil(actor.data.data.rings.water * 2)
|
actor.system.fatigue.value - Math.ceil(actor.system.rings.water * 2)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "scene_end":
|
case "scene_end":
|
||||||
// If more than half the value => roundup half conflit & fatigue
|
// If more than half the value => roundup half conflit & fatigue
|
||||||
actor.data.data.fatigue.value = Math.min(
|
actor.system.fatigue.value = Math.min(
|
||||||
actor.data.data.fatigue.value,
|
actor.system.fatigue.value,
|
||||||
Math.ceil(actor.data.data.fatigue.max / 2)
|
Math.ceil(actor.system.fatigue.max / 2)
|
||||||
);
|
);
|
||||||
actor.data.data.strife.value = Math.min(
|
actor.system.strife.value = Math.min(
|
||||||
actor.data.data.strife.value,
|
actor.system.strife.value,
|
||||||
Math.ceil(actor.data.data.strife.max / 2)
|
Math.ceil(actor.system.strife.max / 2)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "reset_void":
|
case "reset_void":
|
||||||
actor.data.data.void_points.value = Math.ceil(actor.data.data.void_points.max / 2);
|
actor.system.void_points.value = Math.ceil(actor.system.void_points.max / 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
await actor.update({
|
await actor.update({
|
||||||
data: {
|
system: {
|
||||||
fatigue: {
|
fatigue: {
|
||||||
value: actor.data.data.fatigue.value,
|
value: actor.system.fatigue.value,
|
||||||
},
|
},
|
||||||
strife: {
|
strife: {
|
||||||
value: actor.data.data.strife.value,
|
value: actor.system.strife.value,
|
||||||
},
|
},
|
||||||
void_points: {
|
void_points: {
|
||||||
value: actor.data.data.void_points.value,
|
value: actor.system.void_points.value,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ export const RegisterHandlebars = function () {
|
|||||||
|
|
||||||
// enrichHTML
|
// enrichHTML
|
||||||
Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
|
Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
|
||||||
|
options.async = false;
|
||||||
return TextEditor.enrichHTML(text, options);
|
return TextEditor.enrichHTML(text, options);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ export class HelpDialog extends FormApplication {
|
|||||||
* @param options
|
* @param options
|
||||||
* @return {Object}
|
* @return {Object}
|
||||||
*/
|
*/
|
||||||
getData(options = null) {
|
async getData(options = null) {
|
||||||
return {
|
return {
|
||||||
...super.getData(options),
|
...(await super.getData(options)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export class HelpersL5r5e {
|
|||||||
return CONFIG.l5r5e.stances.map((e) => ({
|
return CONFIG.l5r5e.stances.map((e) => ({
|
||||||
id: e,
|
id: e,
|
||||||
label: game.i18n.localize(`l5r5e.rings.${e}`),
|
label: game.i18n.localize(`l5r5e.rings.${e}`),
|
||||||
value: actor?.data?.data?.rings?.[e] || 1,
|
value: actor?.system?.rings?.[e] || 1,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,36 +109,6 @@ export class HelpersL5r5e {
|
|||||||
return CONFIG.l5r5e.roles.map((e) => game.i18n.localize(`l5r5e.roles.${e}`));
|
return CONFIG.l5r5e.roles.map((e) => game.i18n.localize(`l5r5e.roles.${e}`));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieve a Document by its Universally Unique Identifier (uuid).
|
|
||||||
* Exactly the same as fromUuid but without Compendium as it need async.
|
|
||||||
* @param {string} uuid The uuid of the Document to retrieve
|
|
||||||
* @return {Document|null}
|
|
||||||
*/
|
|
||||||
static fromUuidNoPack(uuid) {
|
|
||||||
let parts = uuid.split(".");
|
|
||||||
let doc;
|
|
||||||
|
|
||||||
if (parts[0] === "Compendium") {
|
|
||||||
// Compendium Documents need asynchronous
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
// World Documents
|
|
||||||
const [docName, docId] = parts.slice(0, 2);
|
|
||||||
parts = parts.slice(2);
|
|
||||||
const collection = CONFIG[docName].collection.instance;
|
|
||||||
doc = collection.get(docId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Embedded Documents
|
|
||||||
while (doc && parts.length > 1) {
|
|
||||||
const [embeddedName, embeddedId] = parts.slice(0, 2);
|
|
||||||
doc = doc.getEmbeddedDocument(embeddedName, embeddedId);
|
|
||||||
parts = parts.slice(2);
|
|
||||||
}
|
|
||||||
return doc || null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the target object on a drag n drop event, or null if not found
|
* Return the target object on a drag n drop event, or null if not found
|
||||||
* @param {DragEvent} event
|
* @param {DragEvent} event
|
||||||
@@ -156,24 +126,31 @@ export class HelpersL5r5e {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the object from Game or Pack by his ID, or null if not found
|
* Return the object from Game or Pack by his ID, or null if not found
|
||||||
* @param {string} id
|
* @param {string} uuid "Item.5qI6SU85VSFqji8W"
|
||||||
* @param {string} type Type (Item, JournalEntry...)
|
* @param {string} id "5qI6SU85VSFqji8W"
|
||||||
|
* @param {string} type Type ("Item", "JournalEntry"...)
|
||||||
* @param {any[]|null} data Plain data
|
* @param {any[]|null} data Plain data
|
||||||
* @param {string|null} pack Pack name
|
* @param {string|null} pack Pack name
|
||||||
* @param {string|null} parentId Used to avoid an infinite loop in properties if set
|
* @param {string|null} parentId Used to avoid an infinite loop in properties if set
|
||||||
* @return {Promise<null>}
|
* @return {Promise<null>}
|
||||||
*/
|
*/
|
||||||
static async getObjectGameOrPack({ id, type, data = null, pack = null, parentId = null }) {
|
static async getObjectGameOrPack({ uuid, id, type, data = null, pack = null, parentId = null }) {
|
||||||
let document = null;
|
let document = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Direct Object
|
// Direct Object
|
||||||
if (data?._id) {
|
if (data?._id) {
|
||||||
document = HelpersL5r5e.createDocumentFromCompendium({ type, data });
|
document = HelpersL5r5e.createDocumentFromCompendium({ type, data });
|
||||||
} else if (!id || !type) {
|
} else if (!uuid && (!id || !type)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UUID
|
||||||
|
if (!document && !!uuid) {
|
||||||
|
document = await fromUuid(uuid);
|
||||||
|
}
|
||||||
|
// TODO need to migrate to UUID
|
||||||
|
|
||||||
// Named pack
|
// Named pack
|
||||||
if (!document) {
|
if (!document) {
|
||||||
// If no pack passed, but it's a core item, we know the pack to get it
|
// If no pack passed, but it's a core item, we know the pack to get it
|
||||||
@@ -207,8 +184,8 @@ export class HelpersL5r5e {
|
|||||||
// Final
|
// Final
|
||||||
if (document) {
|
if (document) {
|
||||||
// Flag the source GUID
|
// Flag the source GUID
|
||||||
if (document.uuid && !document.getFlag("core", "sourceId")) {
|
if (document.uuid && !document.pack && !document.getFlag("core", "sourceId")) {
|
||||||
document.data.update({ "flags.core.sourceId": document.uuid });
|
document.updateSource({ "flags.core.sourceId": document.uuid });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Care to infinite loop in properties
|
// Care to infinite loop in properties
|
||||||
@@ -263,13 +240,13 @@ export class HelpersL5r5e {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
static async refreshItemProperties(document) {
|
static async refreshItemProperties(document) {
|
||||||
if (document.data?.data?.properties && typeof Babele !== "undefined") {
|
if (document.system?.properties && typeof Babele !== "undefined") {
|
||||||
document.data.data.properties = await Promise.all(
|
document.system.properties = await Promise.all(
|
||||||
document.data.data.properties.map(async (property) => {
|
document.system.properties.map(async (property) => {
|
||||||
const gameProp = await HelpersL5r5e.getObjectGameOrPack({
|
const gameProp = await HelpersL5r5e.getObjectGameOrPack({
|
||||||
id: property.id,
|
id: property.id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
parentId: document.data?._id || 1,
|
parentId: document._id || 1,
|
||||||
});
|
});
|
||||||
if (gameProp) {
|
if (gameProp) {
|
||||||
return { id: gameProp.id, name: gameProp.name };
|
return { id: gameProp.id, name: gameProp.name };
|
||||||
@@ -279,7 +256,7 @@ export class HelpersL5r5e {
|
|||||||
return property;
|
return property;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
document.data.update({ "data.properties": document.data.data.properties });
|
document.updateSource({ "system.properties": document.system.properties });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -447,13 +424,13 @@ export class HelpersL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
itemsList.forEach((item) => {
|
itemsList.forEach((item) => {
|
||||||
let xp = parseInt(item.data.xp_used_total || item.data.xp_used || 0);
|
let xp = parseInt(item.system.xp_used_total || item.system.xp_used || 0);
|
||||||
|
|
||||||
// Full price
|
// Full price
|
||||||
xp_used_total += xp;
|
xp_used_total += xp;
|
||||||
|
|
||||||
// if not in curriculum, xp spent /2 for this item
|
// if not in curriculum, xp spent /2 for this item
|
||||||
if (!item.data.in_curriculum && xp > 0) {
|
if (!item.system.in_curriculum && xp > 0) {
|
||||||
xp = Math.ceil(xp / 2);
|
xp = Math.ceil(xp / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -626,8 +603,8 @@ export class HelpersL5r5e {
|
|||||||
|
|
||||||
// Create the link
|
// Create the link
|
||||||
let link = null;
|
let link = null;
|
||||||
if (object.data.flags.core?.sourceId) {
|
if (object.flags.core?.sourceId) {
|
||||||
link = object.data.flags.core?.sourceId.replace(/(\w+)\.(.+)/, "@$1[$2]");
|
link = object.flags.core?.sourceId.replace(/(\w+)\.(.+)/, "@$1[$2]");
|
||||||
if (!HelpersL5r5e.isLinkValid(link)) {
|
if (!HelpersL5r5e.isLinkValid(link)) {
|
||||||
link = null;
|
link = null;
|
||||||
}
|
}
|
||||||
@@ -661,7 +638,7 @@ export class HelpersL5r5e {
|
|||||||
|
|
||||||
// Get a matched World document
|
// Get a matched World document
|
||||||
// "@Item[L5RCoreIte000042]{Amigasa}"
|
// "@Item[L5RCoreIte000042]{Amigasa}"
|
||||||
if (CONST.ENTITY_TYPES.includes(type)) {
|
if (CONST.DOCUMENT_TYPES.includes(type)) {
|
||||||
const collection = game.collections.get(type);
|
const collection = game.collections.get(type);
|
||||||
const document = /^[a-zA-Z0-9]{16}$/.test(target) ? collection.get(target) : collection.getName(target);
|
const document = /^[a-zA-Z0-9]{16}$/.test(target) ? collection.get(target) : collection.getName(target);
|
||||||
return !!document;
|
return !!document;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export default class HooksL5r5e {
|
|||||||
case "settings":
|
case "settings":
|
||||||
// Add Changelog link
|
// Add Changelog link
|
||||||
html.find("#game-details .system").append(
|
html.find("#game-details .system").append(
|
||||||
`<p><a href="${game.system.data.changelog}" target="_blank">Changelog</a></p>`
|
`<p><a href="${game.system.changelog}" target="_blank">Changelog</a></p>`
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -198,13 +198,13 @@ export default class HooksL5r5e {
|
|||||||
if (["weapon", "armor", "item", "peculiarity", "technique", "peculiarity"].includes(document.type)) {
|
if (["weapon", "armor", "item", "peculiarity", "technique", "peculiarity"].includes(document.type)) {
|
||||||
html.find(`[data-document-id="${document.id}"]`).append(
|
html.find(`[data-document-id="${document.id}"]`).append(
|
||||||
`<i` +
|
`<i` +
|
||||||
(document.data.data.ring ? ` class="i_${document.data.data.ring}"` : ``) +
|
(document.system.ring ? ` class="i_${document.system.ring}"` : ``) +
|
||||||
`>` +
|
`>` +
|
||||||
(document.data.data.rarity
|
(document.system.rarity
|
||||||
? `${game.i18n.localize("l5r5e.sheets.rarity")} ${document.data.data.rarity}`
|
? `${game.i18n.localize("l5r5e.sheets.rarity")} ${document.system.rarity}`
|
||||||
: "") +
|
: "") +
|
||||||
(document.data.data.rank
|
(document.system.rank
|
||||||
? game.i18n.localize("l5r5e.sheets.rank") + " " + document.data.data.rank
|
? game.i18n.localize("l5r5e.sheets.rank") + " " + document.system.rank
|
||||||
: "") +
|
: "") +
|
||||||
`</i>`
|
`</i>`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export class ItemL5r5e extends Item {
|
|||||||
* @returns {Collection<BaseItem>}
|
* @returns {Collection<BaseItem>}
|
||||||
*/
|
*/
|
||||||
get items() {
|
get items() {
|
||||||
return this.data.data.items || new Map();
|
return this.system.items || new Map();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +12,7 @@ export class ItemL5r5e extends Item {
|
|||||||
* @return {Actor|null}
|
* @return {Actor|null}
|
||||||
*/
|
*/
|
||||||
get actor() {
|
get actor() {
|
||||||
return super.actor || game.actors.get(this.data.data.parent_id?.actor_id) || null;
|
return super.actor || game.actors.get(this.system.parent_id?.actor_id) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,13 +29,13 @@ export class ItemL5r5e extends Item {
|
|||||||
/**
|
/**
|
||||||
* Update this Document using incremental data, saving it to the database.
|
* Update this Document using incremental data, saving it to the database.
|
||||||
* @see {@link Document.updateDocuments}
|
* @see {@link Document.updateDocuments}
|
||||||
* @param {object} [data={}] Differential update data which modifies the existing values of this document data
|
* @param {object} [data={}] Differential update data which modifies the existing values of this document data
|
||||||
* @param {DocumentModificationContext} [context={}] Additional context which customizes the update workflow
|
* @param {DocumentModificationContext} [context={}] Additional context which customizes the update workflow
|
||||||
* @returns {Promise<Document>} The updated Document instance
|
* @returns {Promise<Document>} The updated Document instance
|
||||||
*/
|
*/
|
||||||
async update(data = {}, context = {}) {
|
async update(data = {}, context = {}) {
|
||||||
// Regular
|
// Regular
|
||||||
if (!this.data.data.parent_id) {
|
if (!this.system.parent_id) {
|
||||||
return super.update(data, context);
|
return super.update(data, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,19 +47,21 @@ export class ItemL5r5e extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Merge (DocumentData cannot be set)
|
// Merge (DocumentData cannot be set)
|
||||||
const result = foundry.utils.mergeObject(this.data, foundry.utils.expandObject(data));
|
const result = foundry.utils.mergeObject(this, foundry.utils.expandObject(data));
|
||||||
|
console.log(result); // TODO TMP
|
||||||
|
|
||||||
if (result.name) {
|
if (result.name) {
|
||||||
this.data.name = result.name;
|
this.name = result.name;
|
||||||
}
|
}
|
||||||
if (result.img) {
|
if (result.img) {
|
||||||
this.data.img = result.img;
|
this.img = result.img;
|
||||||
}
|
}
|
||||||
if (result.data) {
|
if (result.data) {
|
||||||
this.data.data = result.data;
|
this.data = result.data; // todo tmp check this!
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
await parentItem.updateEmbedItem(this.data.toObject(false));
|
await parentItem.updateEmbedItem(this.toObject(false));
|
||||||
|
|
||||||
// Return new value for sheet
|
// Return new value for sheet
|
||||||
return new Promise((resolve) => resolve(this));
|
return new Promise((resolve) => resolve(this));
|
||||||
@@ -70,9 +72,9 @@ export class ItemL5r5e extends Item {
|
|||||||
super.prepareData();
|
super.prepareData();
|
||||||
|
|
||||||
// Prepare Embed items
|
// Prepare Embed items
|
||||||
if (!(this.data.data.items instanceof Map)) {
|
if (!(this.system.items instanceof Map)) {
|
||||||
const itemsData = Array.isArray(this.data.data.items) ? this.data.data.items : [];
|
const itemsData = Array.isArray(this.system.items) ? this.system.items : [];
|
||||||
this.data.data.items = new Map();
|
this.system.items = new Map();
|
||||||
|
|
||||||
itemsData.forEach((item) => {
|
itemsData.forEach((item) => {
|
||||||
this.addEmbedItem(item, { save: false, newId: false, addBonusToActor: false });
|
this.addEmbedItem(item, { save: false, newId: false, addBonusToActor: false });
|
||||||
@@ -80,16 +82,16 @@ export class ItemL5r5e extends Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sanitize some values
|
// Sanitize some values
|
||||||
switch (this.data.type) {
|
switch (this.type) {
|
||||||
case "armor":
|
case "armor":
|
||||||
this.data.data.armor.physical = this.data.data.armor.physical || 0;
|
this.system.armor.physical = this.system.armor.physical || 0;
|
||||||
this.data.data.armor.supernatural = this.data.data.armor.supernatural || 0;
|
this.system.armor.supernatural = this.system.armor.supernatural || 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "weapon":
|
case "weapon":
|
||||||
this.data.data.range = this.data.data.range || 0;
|
this.system.range = this.system.range || 0;
|
||||||
this.data.data.damage = this.data.data.damage || 0;
|
this.system.damage = this.system.damage || 0;
|
||||||
this.data.data.deadliness = this.data.data.deadliness || 0;
|
this.system.deadliness = this.system.deadliness || 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,8 +105,8 @@ export class ItemL5r5e extends Item {
|
|||||||
const parent = {
|
const parent = {
|
||||||
item_id: this.id,
|
item_id: this.id,
|
||||||
};
|
};
|
||||||
if (this.actor?.data?._id) {
|
if (this.actor?._id) {
|
||||||
parent.actor_id = this.actor.data._id;
|
parent.actor_id = this.actor._id;
|
||||||
}
|
}
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
@@ -114,7 +116,7 @@ export class ItemL5r5e extends Item {
|
|||||||
* @return {ItemL5r5e|null}
|
* @return {ItemL5r5e|null}
|
||||||
*/
|
*/
|
||||||
getItemFromParentId() {
|
getItemFromParentId() {
|
||||||
const parentIds = this.data.data.parent_id;
|
const parentIds = this.system.parent_id;
|
||||||
let parentItem;
|
let parentItem;
|
||||||
|
|
||||||
if (parentIds?.actor_id) {
|
if (parentIds?.actor_id) {
|
||||||
@@ -134,12 +136,12 @@ export class ItemL5r5e extends Item {
|
|||||||
* @return {Promise<string|null>}
|
* @return {Promise<string|null>}
|
||||||
*/
|
*/
|
||||||
async renderTextTemplate() {
|
async renderTextTemplate() {
|
||||||
const data = (await this.sheet?.getData()) || this;
|
const sheetData = (await this.sheet?.getData()) || this;
|
||||||
if (data instanceof ItemL5r5e) {
|
if (sheetData instanceof ItemL5r5e) {
|
||||||
await game.l5r5e.HelpersL5r5e.refreshItemProperties(this);
|
await game.l5r5e.HelpersL5r5e.refreshItemProperties(this);
|
||||||
}
|
}
|
||||||
const type = this.type.replace("_", "-"); // ex: item_pattern
|
const type = this.type.replace("_", "-"); // ex: item_pattern
|
||||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}items/${type}/${type}-text.html`, data);
|
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}items/${type}/${type}-text.html`, sheetData);
|
||||||
if (!tpl) {
|
if (!tpl) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -148,7 +150,7 @@ export class ItemL5r5e extends Item {
|
|||||||
|
|
||||||
// ***** Embedded items management *****
|
// ***** Embedded items management *****
|
||||||
/**
|
/**
|
||||||
* Shortcut for this.data.data.items.get
|
* Shortcut for this.items.get
|
||||||
* @param id
|
* @param id
|
||||||
* @return {ItemL5r5e|null}
|
* @return {ItemL5r5e|null}
|
||||||
*/
|
*/
|
||||||
@@ -176,17 +178,17 @@ export class ItemL5r5e extends Item {
|
|||||||
|
|
||||||
// New id
|
// New id
|
||||||
if (newId) {
|
if (newId) {
|
||||||
item.data._id = foundry.utils.randomID();
|
item._id = foundry.utils.randomID();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy the parent permission to the sub item
|
// Copy the parent permission to the sub item
|
||||||
item.data.permission = this.data.permission;
|
item.ownership = this.ownership;
|
||||||
|
|
||||||
// Tag parent (flags won't work as we have no id in db)
|
// Tag parent (flags won't work as we have no id in db)
|
||||||
item.data.data.parent_id = this.getParentsIds();
|
item.system.parent_id = this.getParentsIds();
|
||||||
|
|
||||||
// Object
|
// Object
|
||||||
this.data.data.items.set(item.data._id, item);
|
this.system.items.set(item._id, item);
|
||||||
|
|
||||||
// Add bonus to actor
|
// Add bonus to actor
|
||||||
if (addBonusToActor) {
|
if (addBonusToActor) {
|
||||||
@@ -199,7 +201,7 @@ export class ItemL5r5e extends Item {
|
|||||||
if (save) {
|
if (save) {
|
||||||
await this.saveEmbedItems();
|
await this.saveEmbedItems();
|
||||||
}
|
}
|
||||||
return item.data._id;
|
return item._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,21 +222,21 @@ export class ItemL5r5e extends Item {
|
|||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async deleteEmbedItem(id, { save = true, removeBonusFromActor = true } = {}) {
|
async deleteEmbedItem(id, { save = true, removeBonusFromActor = true } = {}) {
|
||||||
if (!this.data.data.items.has(id)) {
|
if (!this.system.items.has(id)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove bonus from actor
|
// Remove bonus from actor
|
||||||
if (removeBonusFromActor) {
|
if (removeBonusFromActor) {
|
||||||
const actor = this.actor;
|
const actor = this.actor;
|
||||||
const item = this.data.data.items.get(id);
|
const item = this.system.items.get(id);
|
||||||
if (item instanceof Item && actor instanceof Actor) {
|
if (item instanceof Item && actor instanceof Actor) {
|
||||||
actor.removeBonus(item);
|
actor.removeBonus(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the embed item
|
// Remove the embed item
|
||||||
this.data.data.items.delete(id);
|
this.system.items.delete(id);
|
||||||
|
|
||||||
if (save) {
|
if (save) {
|
||||||
await this.saveEmbedItems();
|
await this.saveEmbedItems();
|
||||||
@@ -247,8 +249,8 @@ export class ItemL5r5e extends Item {
|
|||||||
*/
|
*/
|
||||||
async generateNewIdsForAllEmbedItems() {
|
async generateNewIdsForAllEmbedItems() {
|
||||||
// Clear olds ids
|
// Clear olds ids
|
||||||
const oldItems = Array.from(this.data.data.items);
|
const oldItems = Array.from(this.system.items);
|
||||||
this.data.data.items = new Map();
|
this.system.items = new Map();
|
||||||
|
|
||||||
// Re-add with new ids
|
// Re-add with new ids
|
||||||
oldItems.forEach(([id, item]) => {
|
oldItems.forEach(([id, item]) => {
|
||||||
@@ -264,7 +266,7 @@ export class ItemL5r5e extends Item {
|
|||||||
*/
|
*/
|
||||||
async saveEmbedItems() {
|
async saveEmbedItems() {
|
||||||
await this.update({
|
await this.update({
|
||||||
"data.items": Array.from(this.data.data.items).map(([id, item]) => item.data.toObject(false)),
|
"system.items": Array.from(this.system.items).map(([id, item]) => item.toObject(false)),
|
||||||
});
|
});
|
||||||
this.sheet.render(false);
|
this.sheet.render(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const currentType = this.object.data.data.advancement_type;
|
// const currentType = this.object.system.advancement_type;
|
||||||
const currentRing = this.object.data.data.ring;
|
const currentRing = this.object.system.ring;
|
||||||
const currentSkill = this.object.data.data.skill;
|
const currentSkill = this.object.system.skill;
|
||||||
|
|
||||||
html.find("#advancement_type").on("change", (event) => {
|
html.find("#advancement_type").on("change", (event) => {
|
||||||
$(event.target).prop("disabled", true);
|
$(event.target).prop("disabled", true);
|
||||||
@@ -78,9 +78,9 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _updateChoice(oldChoice, newChoice) {
|
async _updateChoice(oldChoice, newChoice) {
|
||||||
let xp_used = this.object.data.data.xp_used;
|
let xp_used = this.object.system.xp_used;
|
||||||
let name = this.object.data.name;
|
let name = this.object.name;
|
||||||
let img = this.object.data.img;
|
let img = this.object.img;
|
||||||
|
|
||||||
// Modify image to reflect choice
|
// Modify image to reflect choice
|
||||||
if (newChoice.ring) {
|
if (newChoice.ring) {
|
||||||
@@ -96,7 +96,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
// Object embed in actor ?
|
// Object embed in actor ?
|
||||||
const actor = this.document.actor;
|
const actor = this.document.actor;
|
||||||
if (actor) {
|
if (actor) {
|
||||||
const actorData = foundry.utils.duplicate(actor.data.data);
|
const actorData = foundry.utils.duplicate(actor.system);
|
||||||
let skillCatId = null;
|
let skillCatId = null;
|
||||||
|
|
||||||
// Old choices
|
// Old choices
|
||||||
@@ -132,7 +132,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
// Update Actor
|
// Update Actor
|
||||||
await actor.update({
|
await actor.update({
|
||||||
data: foundry.utils.diffObject(actor.data.data, actorData),
|
system: foundry.utils.diffObject(actor.system, actorData),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
await this.object.update({
|
await this.object.update({
|
||||||
name: name,
|
name: name,
|
||||||
img: img,
|
img: img,
|
||||||
data: {
|
system: {
|
||||||
xp_used: xp_used,
|
xp_used: xp_used,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_initialize() {
|
_initialize() {
|
||||||
const data = this.object.data.data;
|
const data = this.object.system;
|
||||||
|
|
||||||
// update linked actor datas
|
// update linked actor datas
|
||||||
if (data.leader_actor_id) {
|
if (data.leader_actor_id) {
|
||||||
@@ -40,6 +40,20 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Object|Promise}
|
||||||
|
*/
|
||||||
|
async getData(options = {}) {
|
||||||
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
|
// Editors enrichment
|
||||||
|
sheetData.data.enrichedHtml.abilities = await TextEditor.enrichHTML(sheetData.data.system.abilities, {
|
||||||
|
async: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
return sheetData;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activate a named TinyMCE text editor
|
* Activate a named TinyMCE text editor
|
||||||
* @param {string} name The named data field which the editor modifies.
|
* @param {string} name The named data field which the editor modifies.
|
||||||
@@ -49,10 +63,10 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
activateEditor(name, options = {}, initialContent = "") {
|
activateEditor(name, options = {}, initialContent = "") {
|
||||||
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
||||||
if (name === "data.abilities" && initialContent) {
|
if (name === "system.abilities" && initialContent) {
|
||||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||||
}
|
}
|
||||||
super.activateEditor(name, options, initialContent);
|
return super.activateEditor(name, options, initialContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,15 +114,15 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _updateLinkedActorData(actor) {
|
async _updateLinkedActorData(actor) {
|
||||||
if (!actor || actor.documentName !== "Actor" || !actor.isCharacter) {
|
if (!actor || actor.documentName !== "Actor" || !actor.isCharacter) {
|
||||||
console.warn("L5R5E | Wrong actor type", actor?.data?.type, actor);
|
console.warn("L5R5E | Wrong actor type", actor?.type, actor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.object.update({
|
return this.object.update({
|
||||||
img: actor.data.img,
|
img: actor.img,
|
||||||
data: {
|
system: {
|
||||||
leader: actor.data.name,
|
leader: actor.name,
|
||||||
leader_actor_id: actor.data._id,
|
leader_actor_id: actor._id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -120,7 +134,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
*/
|
*/
|
||||||
async _removeLinkedActor() {
|
async _removeLinkedActor() {
|
||||||
return this.object.update({
|
return this.object.update({
|
||||||
data: {
|
system: {
|
||||||
leader_actor_id: null,
|
leader_actor_id: null,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ export class BaseItemSheetL5r5e extends ItemSheet {
|
|||||||
*/
|
*/
|
||||||
activateEditor(name, options = {}, initialContent = "") {
|
activateEditor(name, options = {}, initialContent = "") {
|
||||||
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
// Symbols Compatibility with old compendium modules (PRE l5r v1.7.2)
|
||||||
if (name === "data.description" && initialContent) {
|
if (name === "system.description" && initialContent) {
|
||||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||||
}
|
}
|
||||||
super.activateEditor(name, options, initialContent);
|
return super.activateEditor(name, options, initialContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -33,15 +33,15 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
* @return {Promise<null|{name, id}>}
|
* @return {Promise<null|{name, id}>}
|
||||||
*/
|
*/
|
||||||
async getLinkedProperty(sheetData) {
|
async getLinkedProperty(sheetData) {
|
||||||
if (sheetData.data.data.linked_property_id) {
|
if (sheetData.data.system.linked_property_id) {
|
||||||
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
||||||
id: sheetData.data.data.linked_property_id,
|
id: sheetData.data.system.linked_property_id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
});
|
});
|
||||||
if (linkedProperty) {
|
if (linkedProperty) {
|
||||||
return {
|
return {
|
||||||
id: linkedProperty.data._id,
|
id: linkedProperty._id,
|
||||||
name: linkedProperty.data.name,
|
name: linkedProperty.name,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,15 +77,15 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
// Only property allowed here
|
// Only property allowed here
|
||||||
let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (!item || item.documentName !== "Item" || item.data.type !== "property") {
|
if (!item || item.documentName !== "Item" || item.type !== "property") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the new property, and update
|
// Set the new property, and update
|
||||||
this.document.data.data.linked_property_id = item.id;
|
this.document.system.linked_property_id = item.id;
|
||||||
this.document.update({
|
this.document.update({
|
||||||
data: {
|
system: {
|
||||||
linked_property_id: this.document.data.data.linked_property_id,
|
linked_property_id: this.document.system.linked_property_id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -102,18 +102,18 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
let name;
|
let name;
|
||||||
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
||||||
id: this.document.data.data.linked_property_id,
|
id: this.document.system.linked_property_id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
});
|
});
|
||||||
if (linkedProperty) {
|
if (linkedProperty) {
|
||||||
name = linkedProperty.data.name;
|
name = linkedProperty.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
const callback = async () => {
|
const callback = async () => {
|
||||||
this.document.data.data.linked_property_id = null;
|
this.document.system.linked_property_id = null;
|
||||||
this.document.update({
|
this.document.update({
|
||||||
data: {
|
system: {
|
||||||
linked_property_id: this.document.data.data.linked_property_id,
|
linked_property_id: this.document.system.linked_property_id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
// Prepare Properties (id/name => object)
|
// Prepare Properties (id/name => object)
|
||||||
await this._prepareProperties(sheetData);
|
await this._prepareProperties(sheetData);
|
||||||
|
|
||||||
|
// Editors enrichment
|
||||||
|
sheetData.data.enrichedHtml = {
|
||||||
|
description: await TextEditor.enrichHTML(sheetData.data.system.description, { async: true }),
|
||||||
|
};
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,9 +42,9 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
async _prepareProperties(sheetData) {
|
async _prepareProperties(sheetData) {
|
||||||
sheetData.data.propertiesList = [];
|
sheetData.data.propertiesList = [];
|
||||||
|
|
||||||
if (Array.isArray(sheetData.data.data.properties)) {
|
if (Array.isArray(sheetData.data.system.properties)) {
|
||||||
const props = [];
|
const props = [];
|
||||||
for (const property of sheetData.data.data.properties) {
|
for (const property of sheetData.data.system.properties) {
|
||||||
const gameProp = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: property.id, type: "Item" });
|
const gameProp = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: property.id, type: "Item" });
|
||||||
if (gameProp) {
|
if (gameProp) {
|
||||||
sheetData.data.propertiesList.push(gameProp);
|
sheetData.data.propertiesList.push(gameProp);
|
||||||
@@ -56,7 +61,7 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sheetData.data.data.properties = props;
|
sheetData.data.system.properties = props;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,15 +119,15 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Specific ItemPattern's drop, get the associated props instead
|
// Specific ItemPattern's drop, get the associated props instead
|
||||||
if (item.data.type === "item_pattern" && item.data.data.linked_property_id) {
|
if (item.type === "item_pattern" && item.system.linked_property_id) {
|
||||||
item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
||||||
id: item.data.data.linked_property_id,
|
id: item.system.linked_property_id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Final object has to be a property
|
// Final object has to be a property
|
||||||
if (item.data.type !== "property") {
|
if (item.type !== "property") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,27 +141,27 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_addProperty(item) {
|
_addProperty(item) {
|
||||||
if (!Array.isArray(this.document.data.data.properties)) {
|
if (!Array.isArray(this.document.system.properties)) {
|
||||||
this.document.data.data.properties = [];
|
this.document.system.properties = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.document.data.data.properties.findIndex((p) => p.id === item.id) !== -1) {
|
if (this.document.system.properties.findIndex((p) => p.id === item.id) !== -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.document.data.data.properties.push({ id: item.id, name: item.name });
|
this.document.system.properties.push({ id: item.id, name: item.name });
|
||||||
|
|
||||||
// This props remove others ?
|
// This props remove others ?
|
||||||
if (Array.isArray(item.data.data.properties) && item.data.data.properties.length > 0) {
|
if (Array.isArray(item.system.properties) && item.system.properties.length > 0) {
|
||||||
const idsToRemove = item.data.data.properties.map((e) => e.id);
|
const idsToRemove = item.system.properties.map((e) => e.id);
|
||||||
this.document.data.data.properties = this.document.data.data.properties.filter(
|
this.document.system.properties = this.document.system.properties.filter(
|
||||||
(p) => !idsToRemove.includes(p.id)
|
(p) => !idsToRemove.includes(p.id)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.document.update({
|
this.document.update({
|
||||||
data: {
|
system: {
|
||||||
properties: this.document.data.data.properties,
|
properties: this.document.system.properties,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -171,21 +176,21 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
if (!Array.isArray(this.document.data.data.properties)) {
|
if (!Array.isArray(this.document.system.properties)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const id = $(event.currentTarget).parents(".property").data("propertyId");
|
const id = $(event.currentTarget).parents(".property").data("propertyId");
|
||||||
const tmpProps = this.document.data.data.properties.find((p) => p.id === id);
|
const tmpProps = this.document.system.properties.find((p) => p.id === id);
|
||||||
if (!tmpProps) {
|
if (!tmpProps) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const callback = async () => {
|
const callback = async () => {
|
||||||
this.document.data.data.properties = this.document.data.data.properties.filter((p) => p.id !== id);
|
this.document.system.properties = this.document.system.properties.filter((p) => p.id !== id);
|
||||||
this.document.update({
|
this.document.update({
|
||||||
data: {
|
system: {
|
||||||
properties: this.document.data.data.properties,
|
properties: this.document.system.properties,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
||||||
|
|
||||||
// Sanitize Difficulty and Skill list
|
// Sanitize Difficulty and Skill list
|
||||||
sheetData.data.data.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.data.difficulty);
|
sheetData.data.system.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.system.difficulty);
|
||||||
sheetData.data.data.skill = TechniqueSheetL5r5e.translateSkillsList(
|
sheetData.data.system.skill = TechniqueSheetL5r5e.translateSkillsList(
|
||||||
TechniqueSheetL5r5e.formatSkillList(sheetData.data.data.skill.split(",")),
|
TechniqueSheetL5r5e.formatSkillList(sheetData.data.system.skill.split(",")),
|
||||||
false
|
false
|
||||||
).join(", ");
|
).join(", ");
|
||||||
|
|
||||||
@@ -46,16 +46,16 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
async _updateObject(event, formData) {
|
async _updateObject(event, formData) {
|
||||||
// Change the image according to the type if this is already the case
|
// Change the image according to the type if this is already the case
|
||||||
if (
|
if (
|
||||||
formData["data.technique_type"] &&
|
formData["system.technique_type"] &&
|
||||||
formData.img === `${CONFIG.l5r5e.paths.assets}icons/techs/${this.object.data.data.technique_type}.svg`
|
formData.img === `${CONFIG.l5r5e.paths.assets}icons/techs/${this.object.system.technique_type}.svg`
|
||||||
) {
|
) {
|
||||||
formData.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${formData["data.technique_type"]}.svg`;
|
formData.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${formData["system.technique_type"]}.svg`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanitize Difficulty and Skill list
|
// Sanitize Difficulty and Skill list
|
||||||
formData["data.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["data.difficulty"]);
|
formData["system.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["system.difficulty"]);
|
||||||
formData["data.skill"] = TechniqueSheetL5r5e.formatSkillList(
|
formData["system.skill"] = TechniqueSheetL5r5e.formatSkillList(
|
||||||
TechniqueSheetL5r5e.translateSkillsList(formData["data.skill"].split(","), true)
|
TechniqueSheetL5r5e.translateSkillsList(formData["system.skill"].split(","), true)
|
||||||
).join(",");
|
).join(",");
|
||||||
|
|
||||||
return super._updateObject(event, formData);
|
return super._updateObject(event, formData);
|
||||||
@@ -77,7 +77,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
// Autocomplete
|
// Autocomplete
|
||||||
game.l5r5e.HelpersL5r5e.autocomplete(
|
game.l5r5e.HelpersL5r5e.autocomplete(
|
||||||
html,
|
html,
|
||||||
"data.difficulty",
|
"system.difficulty",
|
||||||
[
|
[
|
||||||
"@T:intrigueRank",
|
"@T:intrigueRank",
|
||||||
"@T:focus",
|
"@T:focus",
|
||||||
@@ -93,7 +93,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
);
|
);
|
||||||
game.l5r5e.HelpersL5r5e.autocomplete(
|
game.l5r5e.HelpersL5r5e.autocomplete(
|
||||||
html,
|
html,
|
||||||
"data.skill",
|
"system.skill",
|
||||||
Object.values(TechniqueSheetL5r5e.getSkillsTranslationMap(false)),
|
Object.values(TechniqueSheetL5r5e.getSkillsTranslationMap(false)),
|
||||||
","
|
","
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
const sheetData = await super.getData(options);
|
const sheetData = await super.getData(options);
|
||||||
|
|
||||||
// Prepare OwnedItems
|
// Prepare OwnedItems
|
||||||
sheetData.data.embedItemsList = this._prepareEmbedItems(sheetData.data.data.items);
|
sheetData.data.embedItemsList = this._prepareEmbedItems(sheetData.data.system.items);
|
||||||
|
|
||||||
// Automatically compute the total xp cost (full price) and XP in title (cursus, some halved prices)
|
// Automatically compute the total xp cost (full price) and XP in title (cursus, some halved prices)
|
||||||
const { xp_used_total, xp_used } = game.l5r5e.HelpersL5r5e.getItemsXpCost(sheetData.data.embedItemsList);
|
const { xp_used_total, xp_used } = game.l5r5e.HelpersL5r5e.getItemsXpCost(sheetData.data.embedItemsList);
|
||||||
sheetData.data.data.xp_used_total = xp_used_total;
|
sheetData.data.system.xp_used_total = xp_used_total;
|
||||||
sheetData.data.data.xp_used = xp_used;
|
sheetData.data.system.xp_used = xp_used;
|
||||||
|
|
||||||
return sheetData;
|
return sheetData;
|
||||||
}
|
}
|
||||||
@@ -41,11 +41,11 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
_prepareEmbedItems(itemsMap) {
|
_prepareEmbedItems(itemsMap) {
|
||||||
let itemsList = itemsMap;
|
let itemsList = itemsMap;
|
||||||
if (itemsMap instanceof Map) {
|
if (itemsMap instanceof Map) {
|
||||||
itemsList = Array.from(itemsMap).map(([id, item]) => item.data);
|
itemsList = Array.from(itemsMap).map(([id, item]) => item);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by rank desc
|
// Sort by rank desc
|
||||||
itemsList.sort((a, b) => (b.data.rank || 0) - (a.data.rank || 0));
|
itemsList.sort((a, b) => (b.system.rank || 0) - (a.system.rank || 0));
|
||||||
|
|
||||||
return itemsList;
|
return itemsList;
|
||||||
}
|
}
|
||||||
@@ -63,16 +63,16 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
|
|
||||||
// Check item type and subtype
|
// Check item type and subtype
|
||||||
let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
let item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (!item || item.documentName !== "Item" || !["technique", "advancement"].includes(item.data.type)) {
|
if (!item || item.documentName !== "Item" || !["technique", "advancement"].includes(item.type)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = item.data.toObject(false);
|
const data = item.toObject(false);
|
||||||
|
|
||||||
// Check xp for techs
|
// Check xp for techs
|
||||||
if (item.data.type === "technique") {
|
if (item.type === "technique") {
|
||||||
data.data.xp_cost = data.data.xp_cost > 0 ? data.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
data.system.xp_cost = data.system.xp_cost > 0 ? data.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||||
data.data.xp_used = data.data.xp_cost;
|
data.system.xp_used = data.system.xp_cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.document.addEmbedItem(data);
|
this.document.addEmbedItem(data);
|
||||||
@@ -146,7 +146,7 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Switch the state and update
|
// Switch the state and update
|
||||||
item.data.data.in_curriculum = !item.data.data.in_curriculum;
|
item.system.in_curriculum = !item.system.in_curriculum;
|
||||||
return this.document.updateEmbedItem(item);
|
return this.document.updateEmbedItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export class BaseJournalSheetL5r5e extends JournalSheet {
|
|||||||
if (initialContent) {
|
if (initialContent) {
|
||||||
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
initialContent = game.l5r5e.HelpersL5r5e.convertSymbols(initialContent, false);
|
||||||
}
|
}
|
||||||
super.activateEditor(name, options, initialContent);
|
return super.activateEditor(name, options, initialContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -202,8 +202,8 @@ Hooks.once("init", async () => {
|
|||||||
|
|
||||||
// Override enrichHTML for Symbol replacement
|
// Override enrichHTML for Symbol replacement
|
||||||
const oldEnrichHTML = TextEditor.prototype.constructor.enrichHTML;
|
const oldEnrichHTML = TextEditor.prototype.constructor.enrichHTML;
|
||||||
TextEditor.prototype.constructor.enrichHTML = function (content, options = {}) {
|
TextEditor.prototype.constructor.enrichHTML = async function (content, options = {}) {
|
||||||
return HelpersL5r5e.convertSymbols(oldEnrichHTML.call(this, content, options), true);
|
return HelpersL5r5e.convertSymbols(await oldEnrichHTML.call(this, content, options), true);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
// Override the default Token _drawBar function to allow fatigue bar reversing.
|
||||||
@@ -223,7 +223,7 @@ Hooks.once("init", async () => {
|
|||||||
|
|
||||||
// Enlarge the bar for large tokens
|
// Enlarge the bar for large tokens
|
||||||
let h = Math.max(canvas.dimensions.size / 12, 8);
|
let h = Math.max(canvas.dimensions.size / 12, 8);
|
||||||
if (this.data.height >= 2) {
|
if (this.height >= 2) {
|
||||||
h *= 1.6;
|
h *= 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ export class MigrationL5r5e {
|
|||||||
// Migrate World Actors
|
// Migrate World Actors
|
||||||
for (let actor of game.actors.contents) {
|
for (let actor of game.actors.contents) {
|
||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateActorData(actor.data, options);
|
const updateData = MigrationL5r5e._migrateActorData(actor, options);
|
||||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
console.log(`L5R5E | Migrating Actor entity ${actor.name}`);
|
console.log(`L5R5E | Migrating Actor entity ${actor.name}`);
|
||||||
await actor.update(updateData);
|
await actor.update(updateData);
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ export class MigrationL5r5e {
|
|||||||
for (let item of game.items.contents) {
|
for (let item of game.items.contents) {
|
||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateItemData(item.data, options);
|
const updateData = MigrationL5r5e._migrateItemData(item.data, options);
|
||||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
console.log(`L5R5E | Migrating Item entity ${item.name}`);
|
console.log(`L5R5E | Migrating Item entity ${item.name}`);
|
||||||
await item.update(updateData);
|
await item.update(updateData);
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ export class MigrationL5r5e {
|
|||||||
for (let scene of game.scenes.contents) {
|
for (let scene of game.scenes.contents) {
|
||||||
try {
|
try {
|
||||||
const updateData = MigrationL5r5e._migrateSceneData(scene.data, options);
|
const updateData = MigrationL5r5e._migrateSceneData(scene.data, options);
|
||||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
console.log(`L5R5E | Migrating Scene entity ${scene.name}`);
|
console.log(`L5R5E | Migrating Scene entity ${scene.name}`);
|
||||||
await scene.update(updateData);
|
await scene.update(updateData);
|
||||||
// If we do not do this, then synthetic token actors remain in cache
|
// If we do not do this, then synthetic token actors remain in cache
|
||||||
@@ -97,7 +97,7 @@ export class MigrationL5r5e {
|
|||||||
const updatedChatList = [];
|
const updatedChatList = [];
|
||||||
for (let message of game.collections.get("ChatMessage")) {
|
for (let message of game.collections.get("ChatMessage")) {
|
||||||
const updateData = MigrationL5r5e._migrateChatMessage(message.data, options);
|
const updateData = MigrationL5r5e._migrateChatMessage(message.data, options);
|
||||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
if (!foundry.utils.isEmpty(updateData)) {
|
||||||
updateData["_id"] = message.data._id;
|
updateData["_id"] = message.data._id;
|
||||||
updatedChatList.push(updateData);
|
updatedChatList.push(updateData);
|
||||||
}
|
}
|
||||||
@@ -156,7 +156,7 @@ export class MigrationL5r5e {
|
|||||||
updateData = MigrationL5r5e._migrateSceneData(ent.data);
|
updateData = MigrationL5r5e._migrateSceneData(ent.data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (foundry.utils.isObjectEmpty(updateData)) {
|
if (foundry.utils.isEmpty(updateData)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ export class MigrationL5r5e {
|
|||||||
*/
|
*/
|
||||||
static _migrateActorData(actor, options = { force: false }) {
|
static _migrateActorData(actor, options = { force: false }) {
|
||||||
const updateData = {};
|
const updateData = {};
|
||||||
const actorData = actor.data;
|
const actorData = actor.system;
|
||||||
|
|
||||||
// We need to be careful for unlinked tokens, only the diff is store in "data".
|
// We need to be careful for unlinked tokens, only the diff is store in "data".
|
||||||
// ex no diff : actor = {type: "npc"}, actorData = undefined
|
// ex no diff : actor = {type: "npc"}, actorData = undefined
|
||||||
@@ -243,16 +243,17 @@ export class MigrationL5r5e {
|
|||||||
if (options?.force || MigrationL5r5e.needUpdate("1.1.0")) {
|
if (options?.force || MigrationL5r5e.needUpdate("1.1.0")) {
|
||||||
// Add "Prepared" in actor
|
// Add "Prepared" in actor
|
||||||
if (actorData.prepared === undefined) {
|
if (actorData.prepared === undefined) {
|
||||||
updateData["data.prepared"] = true;
|
updateData["system.prepared"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NPC are now without autostats, we need to save the value
|
// NPC are now without autostats, we need to save the value
|
||||||
if (actor.type === "npc") {
|
if (actor.type === "npc") {
|
||||||
if (actorData.endurance < 1) {
|
if (actorData.endurance < 1) {
|
||||||
updateData["data.endurance"] = (Number(actorData.rings.earth) + Number(actorData.rings.fire)) * 2;
|
updateData["system.endurance"] = (Number(actorData.rings.earth) + Number(actorData.rings.fire)) * 2;
|
||||||
updateData["data.composure"] = (Number(actorData.rings.earth) + Number(actorData.rings.water)) * 2;
|
updateData["system.composure"] =
|
||||||
updateData["data.focus"] = Number(actorData.rings.air) + Number(actorData.rings.fire);
|
(Number(actorData.rings.earth) + Number(actorData.rings.water)) * 2;
|
||||||
updateData["data.vigilance"] = Math.ceil(
|
updateData["system.focus"] = Number(actorData.rings.air) + Number(actorData.rings.fire);
|
||||||
|
updateData["system.vigilance"] = Math.ceil(
|
||||||
(Number(actorData.rings.air) + Number(actorData.rings.water)) / 2
|
(Number(actorData.rings.air) + Number(actorData.rings.water)) / 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -264,18 +265,18 @@ export class MigrationL5r5e {
|
|||||||
if (options?.force || MigrationL5r5e.needUpdate("1.3.0")) {
|
if (options?.force || MigrationL5r5e.needUpdate("1.3.0")) {
|
||||||
// PC/NPC removed notes useless props "value"
|
// PC/NPC removed notes useless props "value"
|
||||||
if (actorData.notes?.value) {
|
if (actorData.notes?.value) {
|
||||||
updateData["data.notes"] = actorData.notes.value;
|
updateData["system.notes"] = actorData.notes.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NPC have now more thant a Strength and a Weakness
|
// NPC have now more thant a Strength and a Weakness
|
||||||
if (actor.type === "npc" && actorData.rings_affinities?.strength) {
|
if (actor.type === "npc" && actorData.rings_affinities?.strength) {
|
||||||
const aff = actorData.rings_affinities;
|
const aff = actorData.rings_affinities;
|
||||||
updateData["data.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
updateData["system.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
||||||
updateData["data.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
updateData["system.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
||||||
|
|
||||||
// Delete old keys
|
// Delete old keys
|
||||||
updateData["data.rings_affinities.-=strength"] = null;
|
updateData["system.rings_affinities.-=strength"] = null;
|
||||||
updateData["data.rings_affinities.-=weakness"] = null;
|
updateData["system.rings_affinities.-=weakness"] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ***** End of 1.3.0 *****
|
// ***** End of 1.3.0 *****
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -59,6 +59,8 @@ button {
|
|||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
color: black;
|
||||||
|
|
||||||
&.fa-comments {
|
&.fa-comments {
|
||||||
background-image: url("../assets/ui/sidebar/chat.svg");
|
background-image: url("../assets/ui/sidebar/chat.svg");
|
||||||
&:before {
|
&:before {
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "l5r5e",
|
"id": "l5r5e",
|
||||||
"title": "Legend of the Five Rings (5th Edition)",
|
"title": "Legend of the Five Rings (5th Edition)",
|
||||||
"description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by <a href='https://edge-studio.net/'>Edge Studio</a> <p> - Join the official Discord server: <a href='https://discord.gg/foundryvtt'> Official Discord</a></p><p> - Rejoignez la communauté Francophone: <a href='https://discord.gg/pPSDNJk'>Francophone Discord</a></p>",
|
"description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by <a href='https://edge-studio.net/'>Edge Studio</a> <p> - Join the official Discord server: <a href='https://discord.gg/foundryvtt'> Official Discord</a></p><p> - Rejoignez la communauté Francophone: <a href='https://discord.gg/pPSDNJk'>Francophone Discord</a></p>",
|
||||||
"url": "https://gitlab.com/teaml5r/l5r5e",
|
"url": "https://gitlab.com/teaml5r/l5r5e",
|
||||||
"readme": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/README.md",
|
"readme": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/README.md",
|
||||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||||
|
"license": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/LICENSE.md",
|
||||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.0/raw/l5r5e.zip?job=build",
|
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.0/raw/l5r5e.zip?job=build",
|
||||||
"version": "1.9.0",
|
"version": "1.9.0",
|
||||||
"minimumCoreVersion": "9",
|
"compatibility": {
|
||||||
"compatibleCoreVersion": "9",
|
"minimum": 10,
|
||||||
|
"verified": "10.273"
|
||||||
|
},
|
||||||
"manifestPlusVersion": "1.2.0",
|
"manifestPlusVersion": "1.2.0",
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"author": "Team L5R",
|
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Vlyan",
|
"name": "Vlyan",
|
||||||
|
|||||||
@@ -145,10 +145,6 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{{#each actor.items as |pattern|}}
|
{{#each actor.items as |pattern|}}
|
||||||
{{#ifCond pattern.data.type '==' 'item_pattern'}}
|
{{#ifCond pattern.data.type '==' 'item_pattern'}}
|
||||||
|
|
||||||
{{!-- json pattern.data --}}
|
|
||||||
{{!-- voir pkoi : data.linkedProperty.name --}}
|
|
||||||
|
|
||||||
<li>{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-text.html' data=pattern.data editable=../options.editable}}</li>
|
<li>{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-text.html' data=pattern.data editable=../options.editable}}</li>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name">
|
<h2 class="item-name">
|
||||||
{{data.name}}
|
{{data.name}}
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{#if data.img}}<p><img src="{{data.img}}" title="{{data.name}}" /></p>{{/if}}
|
{{#if data.img}}<p><img src="{{data.img}}" title="{{data.name}}" /></p>{{/if}}
|
||||||
{{#if data.data.description}}<p>{{{enrichHTML data.data.description}}}</p>{{/if}}
|
{{#if data.enrichedHtml.description}}<p>{{{data.enrichedHtml.description}}}</p>{{/if}}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label-casualties">
|
<label class="attribute-label-casualties">
|
||||||
<input name="data.battle_readiness.casualties_strength.value" type="number" value="{{data.data.battle_readiness.casualties_strength.value}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.battle_readiness.casualties_strength.value" type="number" value="{{data.system.battle_readiness.casualties_strength.value}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="casualties" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="casualties" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="casualties" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="casualties" data-value="-1"></i>
|
||||||
@@ -24,13 +24,13 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label-strength">
|
<label class="attribute-label-strength">
|
||||||
<input name="data.battle_readiness.casualties_strength.max" type="number" value="{{data.data.battle_readiness.casualties_strength.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.battle_readiness.casualties_strength.max" type="number" value="{{data.system.battle_readiness.casualties_strength.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label-panic">
|
<label class="attribute-label-panic">
|
||||||
<input name="data.battle_readiness.panic_discipline.value" type="number" value="{{data.data.battle_readiness.panic_discipline.value}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.battle_readiness.panic_discipline.value" type="number" value="{{data.system.battle_readiness.panic_discipline.value}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="panic" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="panic" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="panic" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="panic" data-value="-1"></i>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label-discipline">
|
<label class="attribute-label-discipline">
|
||||||
<input name="data.battle_readiness.panic_discipline.max" type="number" value="{{data.data.battle_readiness.panic_discipline.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.battle_readiness.panic_discipline.max" type="number" value="{{data.system.battle_readiness.panic_discipline.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,35 +1,35 @@
|
|||||||
<div class="header-fields warlord">
|
<div class="header-fields warlord">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{#if data.editable_not_soft_locked}}{{^if data.data.warlord_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{/if}}{{localize 'l5r5e.army.warlord'}}</legend>
|
<legend>{{#if data.editable_not_soft_locked}}{{^if data.system.warlord_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{/if}}{{localize 'l5r5e.army.warlord'}}</legend>
|
||||||
<p class="warlord-name">
|
<p class="warlord-name">
|
||||||
{{#if data.data.warlord_actor_id}}
|
{{#if data.system.warlord_actor_id}}
|
||||||
<label>
|
<label>
|
||||||
<a data-actor-id="{{data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{data.data.warlord}}</a>
|
<a data-actor-id="{{data.system.warlord_actor_id}}" class="open-sheet-actor-id">{{data.system.warlord}}</a>
|
||||||
{{#if data.editable_not_soft_locked}}
|
{{#if data.editable_not_soft_locked}}
|
||||||
<span data-actor-id="{{actor.id}}" data-type="warlord" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
<span data-actor-id="{{actor.id}}" data-type="warlord" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</label>
|
</label>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input name="data.warlord" type="text" value="{{data.data.warlord}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.warlord" type="text" value="{{data.system.warlord}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
||||||
<textarea type="text" name="data.allies_backers" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.allies_backers}}</textarea>
|
<textarea type="text" name="system.allies_backers" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.allies_backers}}</textarea>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.army.purpose_mustering'}}</strong>
|
<strong>{{localize 'l5r5e.army.purpose_mustering'}}</strong>
|
||||||
<textarea type="text" name="data.purpose_mustering" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.purpose_mustering}}</textarea>
|
<textarea type="text" name="system.purpose_mustering" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.purpose_mustering}}</textarea>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-fields commander">
|
<div class="header-fields commander">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{#if data.editable_not_soft_locked}}{{^if data.data.commander_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{/if}}{{localize 'l5r5e.army.commander'}}</legend>
|
<legend>{{#if data.editable_not_soft_locked}}{{^if data.system.commander_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{/if}}{{localize 'l5r5e.army.commander'}}</legend>
|
||||||
<div class="warlord-name">
|
<div class="warlord-name">
|
||||||
{{#if data.data.commander_actor_id}}
|
{{#if data.system.commander_actor_id}}
|
||||||
<label>
|
<label>
|
||||||
<a data-actor-id="{{data.data.commander_actor_id}}" class="open-sheet-actor-id">{{data.data.commander}}</a>
|
<a data-actor-id="{{data.system.commander_actor_id}}" class="open-sheet-actor-id">{{data.system.commander}}</a>
|
||||||
{{#if data.editable_not_soft_locked}}
|
{{#if data.editable_not_soft_locked}}
|
||||||
<span data-actor-id="{{actor.id}}" data-type="commander" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
<span data-actor-id="{{actor.id}}" data-type="commander" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -42,25 +42,25 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||||
<input name="data.commander_standing.honor" type="number" value="{{data.data.commander_standing.honor}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.commander_standing.honor" type="number" value="{{data.system.commander_standing.honor}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||||
<input name="data.commander_standing.glory" type="number" value="{{data.data.commander_standing.glory}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.commander_standing.glory" type="number" value="{{data.system.commander_standing.glory}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||||
<input name="data.commander_standing.status" type="number" value="{{data.data.commander_standing.status}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.commander_standing.status" type="number" value="{{data.system.commander_standing.status}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<label>
|
<label>
|
||||||
<strong>{{localize 'l5r5e.army.commander_abilities'}}</strong>
|
<strong>{{localize 'l5r5e.army.commander_abilities'}}</strong>
|
||||||
<textarea type="text" name="data.commander_abilities" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.commander_abilities}}</textarea>
|
<textarea type="text" name="system.commander_abilities" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.commander_abilities}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="army-abilities">
|
<fieldset class="army-abilities">
|
||||||
<legend>{{localize 'l5r5e.army.army_abilities'}}</legend>
|
<legend>{{localize 'l5r5e.army.army_abilities'}}</legend>
|
||||||
{{editor content=data.data.army_abilities target="data.army_abilities" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.army_abilities target="system.army_abilities" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
{{!-- Supplies and Logistics --}}
|
{{!-- Supplies and Logistics --}}
|
||||||
<fieldset class="supplies_logistics">
|
<fieldset class="supplies_logistics">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
|
||||||
{{editor content=data.data.supplies_logistics target="data.supplies_logistics" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.supplies_logistics target="system.supplies_logistics" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Past Battles --}}
|
{{!-- Past Battles --}}
|
||||||
<fieldset class="past_battles">
|
<fieldset class="past_battles">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
|
||||||
{{editor content=data.data.past_battles target="data.past_battles" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.past_battles target="system.past_battles" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Description (public) --}}
|
{{!-- Description (public) --}}
|
||||||
<fieldset class="description">
|
<fieldset class="description">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.description'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.description'}}</legend>
|
||||||
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.description target="system.description" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Notes (private) --}}
|
{{!-- Notes (private) --}}
|
||||||
<fieldset class="note">
|
<fieldset class="note">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes'}}</legend>
|
||||||
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.notes target="system.notes" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
{{!-- Skills Tab --}}
|
{{!-- Skills Tab --}}
|
||||||
<article class="tab skills" data-group="primary" data-tab="skills">
|
<article class="tab skills" data-group="primary" data-tab="skills">
|
||||||
<ul class="skills-wrapper">
|
<ul class="skills-wrapper">
|
||||||
{{#each data.data.skills as |category id|}}
|
{{#each data.system.skills as |category id|}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
|
{{> 'systems/l5r5e/templates/actors/character/category.html' category=category categoryId=id data=../data}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<tr class="flexrow row advancement">
|
<tr class="flexrow row advancement">
|
||||||
<td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" {{#if parent_id}}data-item-parent-id="{{parent_id}}"{{/if}} name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}{{#if advancement.data.bond_type}} ({{advancement.data.bond_type}}){{/if}}</td>
|
<td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" {{#if parent_id}}data-item-parent-id="{{parent_id}}"{{/if}} name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}{{#if advancement.system.bond_type}} ({{advancement.system.bond_type}}){{/if}}</td>
|
||||||
{{#if show_curriculum_toggle}}<td class="curriculum" name="curriculum">{{#if advancement.data.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>{{/if}}
|
{{#if show_curriculum_toggle}}<td class="curriculum" name="curriculum">{{#if advancement.system.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>{{/if}}
|
||||||
<td class="xp" name="advancement.xp">{{#if advancement.data.xp_used_total}}{{advancement.data.xp_used_total}}{{else}}{{advancement.data.xp_used}}{{/if}}</td>
|
<td class="xp" name="advancement.xp">{{#if advancement.system.xp_used_total}}{{advancement.system.xp_used_total}}{{else}}{{advancement.system.xp_used}}{{/if}}</td>
|
||||||
<td class="rank" name="advancement.rank">{{advancement.data.rank}}</td>
|
<td class="rank" name="advancement.rank">{{advancement.system.rank}}</td>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<tr data-group="advancements" data-tab="advancement_rank_{{rank}}" class="flexrow row advancement tab">
|
<tr data-group="advancements" data-tab="advancement_rank_{{rank}}" class="flexrow row advancement tab">
|
||||||
<td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}</td>
|
<td class="name l5r5e-tooltip" data-item-id="{{advancement._id}}" name="advancement.name"><img src="{{advancement.img}}" title="{{advancement.name}}"> {{advancement.name}}</td>
|
||||||
<td class="curriculum" name="curriculum">{{#if advancement.data.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>
|
<td class="curriculum" name="curriculum">{{#if advancement.system.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>
|
||||||
<td class="xp" name="advancement.xp">{{advancement.data.xp_used}}</td>
|
<td class="xp" name="advancement.xp">{{advancement.system.xp_used}}</td>
|
||||||
<td class="rank" name="advancement.rank">{{advancement.data.rank}}</td>
|
<td class="rank" name="advancement.rank">{{advancement.system.rank}}</td>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<li class="endurance-content">
|
<li class="endurance-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.endurance'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.endurance'}}</strong>
|
||||||
<input class="centered-input" type="number" name="data.endurance" value="{{data.data.endurance}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.endurance" value="{{data.system.endurance}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.fatigue'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.fatigue'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.fatigue.value" value="{{data.data.fatigue.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.fatigue.value" value="{{data.system.fatigue.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="fatigue" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="fatigue" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="fatigue" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="fatigue" data-value="-1"></i>
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
<li class="composure-content">
|
<li class="composure-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.composure'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.composure'}}</strong>
|
||||||
<input class="centered-input" type="number" name="data.composure" value="{{data.data.composure}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.composure" value="{{data.system.composure}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.strife'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.strife'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.strife.value" value="{{data.data.strife.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.strife.value" value="{{data.system.strife.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="strife" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="strife" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="strife" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="strife" data-value="-1"></i>
|
||||||
@@ -32,17 +32,17 @@
|
|||||||
<li class="focus-content">
|
<li class="focus-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.focus' }}</strong>
|
<strong>{{localize 'l5r5e.attributes.focus' }}</strong>
|
||||||
<input class="centered-input" type="number" name="data.focus" value="{{data.data.focus}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.focus" value="{{data.system.focus}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="vigilance-content {{#if data.data.is_compromised}}compromised{{/if}}">
|
<li class="vigilance-content {{#if data.system.is_compromised}}compromised{{/if}}">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.vigilance'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.vigilance'}}</strong>
|
||||||
{{#if data.data.is_compromised}}
|
{{#if data.system.is_compromised}}
|
||||||
<input class="centered-input" type="number" value="1" disabled/>
|
<input class="centered-input" type="number" value="1" disabled/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input class="centered-input" type="number" name="data.vigilance" value="{{data.data.vigilance}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.vigilance" value="{{data.system.vigilance}}" data-dtype="Number" disabled/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<li class="void-content">
|
<li class="void-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.voidpoints'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.voidpoints'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.void_points.value" value="{{data.data.void_points.value}}" data-dtype="Number" placeholder="0" min="0" max="{{data.data.void_points.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.void_points.value" value="{{data.system.void_points.value}}" data-dtype="Number" placeholder="0" min="0" max="{{data.system.void_points.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<input class="centered-input" type="number" name="data.void_points.max" value="{{data.data.void_points.max}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.void_points.max" value="{{data.system.void_points.max}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<legend class="section-header">
|
<legend class="section-header">
|
||||||
{{localize 'l5r5e.conflict.initiative.title'}}
|
{{localize 'l5r5e.conflict.initiative.title'}}
|
||||||
<a class="encounter prepared-control" data-id="{{data.type}}">
|
<a class="encounter prepared-control" data-id="{{data.type}}">
|
||||||
<i class="fa fas prepared-icon prepared-icon-{{data.data.prepared}} prepared-{{data.type}}" title="{{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=data.data.prepared)}}"></i>
|
<i class="fa fas prepared-icon prepared-icon-{{data.system.prepared}} prepared-{{data.type}}" title="{{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=data.system.prepared)}}"></i>
|
||||||
</a>
|
</a>
|
||||||
</legend>
|
</legend>
|
||||||
<button class="initiative dice-picker" data-initiative="true" data-skill="sentiment">{{localize 'l5r5e.conflict.initiative.intrigue'}}</button>
|
<button class="initiative dice-picker" data-initiative="true" data-skill="sentiment">{{localize 'l5r5e.conflict.initiative.intrigue'}}</button>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<fieldset class="stances-content flexrow">
|
<fieldset class="stances-content flexrow">
|
||||||
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each data.data.rings as |ringValue ringId|}}
|
{{#each data.system.rings as |ringValue ringId|}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.data.stance ringId=ringId}}
|
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.system.stance ringId=ringId}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -2,22 +2,22 @@
|
|||||||
<legend>{{localize 'l5r5e.sheets.experience'}}</legend>
|
<legend>{{localize 'l5r5e.sheets.experience'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.advancements.total'}}
|
{{localize 'l5r5e.advancements.total'}}
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.xp_total" value="{{data.data.xp_total}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.xp_total" value="{{data.system.xp_total}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.xp_spent" value="{{data.data.xp_spent}}" data-dtype="Number" min="0" placeholder="0" disabled/>
|
<input class="centered-input select-on-focus" type="number" name="system.xp_spent" value="{{data.system.xp_spent}}" data-dtype="Number" min="0" placeholder="0" disabled/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.advancements.saved'}}
|
{{localize 'l5r5e.advancements.saved'}}
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.xp_saved" value="{{data.data.xp_saved}}" data-dtype="Number" min="0" placeholder="0" disabled/>
|
<input class="centered-input select-on-focus" type="number" name="system.xp_saved" value="{{data.system.xp_saved}}" data-dtype="Number" min="0" placeholder="0" disabled/>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- School progession --}}
|
{{!-- School progession --}}
|
||||||
<fieldset class="advancement advancements-body">
|
<fieldset class="advancement advancements-body">
|
||||||
<legend class="tools">
|
<legend class="tools">
|
||||||
{{#if data.data.identity.school_curriculum_journal.id}}
|
{{#if data.system.identity.school_curriculum_journal.id}}
|
||||||
<a class="school-journal-link"><i class="fas fa-file-alt"></i></a> {{data.data.identity.school_curriculum_journal.name}}
|
<a class="school-journal-link"><i class="fas fa-file-alt"></i></a> {{data.system.identity.school_curriculum_journal.name}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="fas fa-question-circle" title="{{localize 'l5r5e.advancements.school_curriculum_journal'}}"></i> {{localize 'l5r5e.sheets.school'}}
|
<i class="fas fa-question-circle" title="{{localize 'l5r5e.advancements.school_curriculum_journal'}}"></i> {{localize 'l5r5e.sheets.school'}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -56,8 +56,8 @@
|
|||||||
<th>{{localize 'l5r5e.advancements.total_xp_spent'}} : {{rankObject.spent.total}}</th>
|
<th>{{localize 'l5r5e.advancements.total_xp_spent'}} : {{rankObject.spent.total}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{{#if ../data.editable_not_soft_locked}}
|
{{#if ../data.editable_not_soft_locked}}
|
||||||
{{#ifCond ../data.data.identity.school_rank '<' 6}}
|
{{#ifCond ../data.system.identity.school_rank '<' 6}}
|
||||||
{{#ifCond (ifCond ../data.data.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}}
|
{{#ifCond (ifCond ../data.system.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}}
|
||||||
<tr class="tfoot flexrow row tab" data-group="advancements" data-tab="advancement_rank_{{rankObject.rank}}">
|
<tr class="tfoot flexrow row tab" data-group="advancements" data-tab="advancement_rank_{{rankObject.rank}}">
|
||||||
<th>
|
<th>
|
||||||
<button type="button" name="validate-curriculum">
|
<button type="button" name="validate-curriculum">
|
||||||
|
|||||||
@@ -1,40 +1,40 @@
|
|||||||
<ul class="identity-content">
|
<ul class="identity-content">
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{#ifCond data.data.template '==' 'pow'}}
|
{{#ifCond data.system.template '==' 'pow'}}
|
||||||
{{localize 'l5r5e.sheets.region'}}
|
{{localize 'l5r5e.sheets.region'}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{localize 'l5r5e.clans.label'}}
|
{{localize 'l5r5e.clans.label'}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
<input type="text" name="data.identity.clan" value="{{data.data.identity.clan}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="text" name="system.identity.clan" value="{{data.system.identity.clan}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{#ifCond data.data.template '==' 'pow'}}
|
{{#ifCond data.system.template '==' 'pow'}}
|
||||||
{{localize 'l5r5e.sheets.upbringing'}}
|
{{localize 'l5r5e.sheets.upbringing'}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{localize 'l5r5e.sheets.family'}}
|
{{localize 'l5r5e.sheets.family'}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
<input type="text" name="data.identity.family" value="{{data.data.identity.family}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="text" name="system.identity.family" value="{{data.system.identity.family}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input type="number" name="data.identity.school_rank" value="{{data.data.identity.school_rank}}" class="select-on-focus" data-dtype="Number" min="0" placeholder="1" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="number" name="system.identity.school_rank" value="{{data.system.identity.school_rank}}" class="select-on-focus" data-dtype="Number" min="0" placeholder="1" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.sheets.school'}}
|
{{localize 'l5r5e.sheets.school'}}
|
||||||
<input type="text" name="data.identity.school" value="{{data.data.identity.school}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="text" name="system.identity.school" value="{{data.system.identity.school}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.roles.title'}}
|
{{localize 'l5r5e.roles.title'}}
|
||||||
<input type="text" name="data.identity.roles" value="{{data.data.identity.roles}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="text" name="system.identity.roles" value="{{data.system.identity.roles}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
|
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.koku'}}
|
{{localize 'l5r5e.money.koku'}}
|
||||||
<input name="data.money.koku" type="number" value="{{data.data.money.koku}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.money.koku" type="number" value="{{data.system.money.koku}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="koku" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="koku" data-value="-1"></i>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.bu'}}
|
{{localize 'l5r5e.money.bu'}}
|
||||||
<input name="data.money.bu" type="number" value="{{data.data.money.bu}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.money.bu" type="number" value="{{data.system.money.bu}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="bu" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="bu" data-value="-1"></i>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.money.zeni'}}
|
{{localize 'l5r5e.money.zeni'}}
|
||||||
<input name="data.money.zeni" type="number" value="{{data.data.money.zeni}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input name="system.money.zeni" type="number" value="{{data.system.money.zeni}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="money-buttons">
|
<span class="money-buttons">
|
||||||
<i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i>
|
<i class="money-control pointer-choice fa fa-plus-square" data-type="zeni" data-value="1"></i>
|
||||||
<i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i>
|
<i class="money-control pointer-choice fa fa-minus-square" data-type="zeni" data-value="-1"></i>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |pattern id|}}
|
{{#each actor.items as |pattern id|}}
|
||||||
{{#ifCond pattern.data.type '==' 'item_pattern'}}
|
{{#ifCond pattern.type '==' 'item_pattern'}}
|
||||||
{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.ninjo'}}
|
{{localize 'l5r5e.social.ninjo'}}
|
||||||
<textarea type="text" name="data.social.ninjo" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.ninjo}}</textarea>
|
<textarea type="text" name="system.social.ninjo" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.ninjo}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{#ifCond data.data.template '==' 'pow'}}
|
{{#ifCond data.system.template '==' 'pow'}}
|
||||||
{{localize 'l5r5e.social.past'}}
|
{{localize 'l5r5e.social.past'}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{localize 'l5r5e.social.giri'}}
|
{{localize 'l5r5e.social.giri'}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
<textarea type="text" name="data.social.giri" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.giri}}</textarea>
|
<textarea type="text" name="system.social.giri" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.giri}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- Bushido Tenets --}}
|
{{!-- Bushido Tenets --}}
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.bushido_tenets.paramount'}}
|
{{localize 'l5r5e.social.bushido_tenets.paramount'}}
|
||||||
<textarea type="text" name="data.social.bushido_tenets.paramount" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.paramount}}</textarea>
|
<textarea type="text" name="system.social.bushido_tenets.paramount" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.bushido_tenets.paramount}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.bushido_tenets.less_significant'}}
|
{{localize 'l5r5e.social.bushido_tenets.less_significant'}}
|
||||||
<textarea type="text" name="data.social.bushido_tenets.less_significant" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.less_significant}}</textarea>
|
<textarea type="text" name="system.social.bushido_tenets.less_significant" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.bushido_tenets.less_significant}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond '["distinction","passion"]' 'includes' item.data.data.peculiarity_type}}
|
{{#ifCond '["distinction","passion"]' 'includes' item.system.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond '["adversity","anxiety"]' 'includes' item.data.data.peculiarity_type}}
|
{{#ifCond '["adversity","anxiety"]' 'includes' item.system.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |bond id|}}
|
{{#each actor.items as |bond id|}}
|
||||||
{{#ifCond bond.data.type '==' 'bond'}}
|
{{#ifCond bond.type '==' 'bond'}}
|
||||||
{{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -82,11 +82,11 @@
|
|||||||
{{!-- Description (public) --}}
|
{{!-- Description (public) --}}
|
||||||
<fieldset class="narrative-description">
|
<fieldset class="narrative-description">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.description' }}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.description' }}</legend>
|
||||||
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.description target="system.description" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- Notes (private) --}}
|
{{!-- Notes (private) --}}
|
||||||
<fieldset class="narrative-note">
|
<fieldset class="narrative-note">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes' }}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes' }}</legend>
|
||||||
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.notes target="system.notes" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,35 +3,35 @@
|
|||||||
<label class="earth">
|
<label class="earth">
|
||||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||||
<strong>{{localizeRing 'earth'}}</strong>
|
<strong>{{localizeRing 'earth'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.earth" value="{{data.system.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<li id="air">
|
||||||
<label class="air">
|
<label class="air">
|
||||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||||
<strong>{{localizeRing 'air'}}</strong>
|
<strong>{{localizeRing 'air'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.air" value="{{data.system.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<li id="water">
|
||||||
<label class="water">
|
<label class="water">
|
||||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||||
<strong>{{localizeRing 'water'}}</strong>
|
<strong>{{localizeRing 'water'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.water" value="{{data.system.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<li id="fire">
|
||||||
<label class="fire">
|
<label class="fire">
|
||||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||||
<strong>{{localizeRing 'fire'}}</strong>
|
<strong>{{localizeRing 'fire'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.fire" value="{{data.system.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<li id="void">
|
||||||
<label class="void">
|
<label class="void">
|
||||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||||
<strong>{{localizeRing 'void'}}</strong>
|
<strong>{{localizeRing 'void'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.void" value="{{data.system.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<input
|
<input
|
||||||
class="centered-input select-on-focus"
|
class="centered-input select-on-focus"
|
||||||
type="number"
|
type="number"
|
||||||
name="data.skills.{{categoryId}}.{{skillId}}"
|
name="system.skills.{{categoryId}}.{{skillId}}"
|
||||||
value="{{skill}}"
|
value="{{skill}}"
|
||||||
data-dtype="Number"
|
data-dtype="Number"
|
||||||
min="0"
|
min="0"
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.data.social.honor}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.honor" value="{{data.system.social.honor}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.data.social.glory}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.glory" value="{{data.system.social.glory}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.data.social.status}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.status" value="{{data.system.social.status}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<li class="stance-content">
|
<li class="stance-content">
|
||||||
<label class="stance-title {{ringId}}">
|
<label class="stance-title {{ringId}}">
|
||||||
{{localizeRing ringId}}
|
{{localizeRing ringId}}
|
||||||
<input id="stance_{{ringId}}" type="radio" name="data.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
|
<input id="stance_{{ringId}}" type="radio" name="system.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description {{#ifCond ringId '==' stance}}stance-active{{/ifCond}}">{{localizeStanceTip ringId}}</p>
|
<p class="item-description {{#ifCond ringId '==' stance}}stance-active{{/ifCond}}">{{localizeStanceTip ringId}}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
||||||
{{#each data.techniquesList as |technique|}}
|
{{#each data.techniquesList as |technique|}}
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="data.techniques.{{technique.id}}" {{checked (lookup ../data.data.techniques technique.id)}} {{^if ../data.editable_not_soft_locked}}disabled{{/if}} />
|
<input type="checkbox" name="system.techniques.{{technique.id}}" {{checked (lookup ../data.system.techniques technique.id)}} {{^if ../data.editable_not_soft_locked}}disabled{{/if}} />
|
||||||
{{technique.label}}
|
{{technique.label}}
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
||||||
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
||||||
</span>
|
</span>
|
||||||
{{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.data.techniques technique)}}
|
{{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.system.techniques technique)}}
|
||||||
<a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
|
<a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
</legend>
|
</legend>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |scroll id|}}
|
{{#each actor.items as |scroll id|}}
|
||||||
{{#ifCond scroll.data.type '==' 'signature_scroll'}}
|
{{#ifCond scroll.type '==' 'signature_scroll'}}
|
||||||
{{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
{{!-- Sheet Header --}}
|
{{!-- Sheet Header --}}
|
||||||
<div class="sheet-header">
|
<div class="sheet-header">
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||||
{{{data.data.description}}}
|
{{{data.enrichedHtml.description}}}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
<li class="endurance-content">
|
<li class="endurance-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.endurance'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.endurance'}}</strong>
|
||||||
<input class="centered-input" type="number" name="data.endurance" value="{{data.data.endurance}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input" type="number" name="system.endurance" value="{{data.system.endurance}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.fatigue'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.fatigue'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.fatigue.value" value="{{data.data.fatigue.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.fatigue.value" value="{{data.system.fatigue.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="fatigue" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="fatigue" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="fatigue" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="fatigue" data-value="-1"></i>
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
<li class="composure-content">
|
<li class="composure-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.composure'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.composure'}}</strong>
|
||||||
<input class="centered-input" type="number" name="data.composure" value="{{data.data.composure}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input" type="number" name="system.composure" value="{{data.system.composure}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.strife'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.strife'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.strife.value" value="{{data.data.strife.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.strife.value" value="{{data.system.strife.value}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<span class="attributes-buttons">
|
<span class="attributes-buttons">
|
||||||
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="strife" data-value="1"></i>
|
<i class="addsub-control pointer-choice fa fa-plus-square" data-type="strife" data-value="1"></i>
|
||||||
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="strife" data-value="-1"></i>
|
<i class="addsub-control pointer-choice fa fa-minus-square" data-type="strife" data-value="-1"></i>
|
||||||
@@ -32,17 +32,17 @@
|
|||||||
<li class="focus-content">
|
<li class="focus-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.focus' }}</strong>
|
<strong>{{localize 'l5r5e.attributes.focus' }}</strong>
|
||||||
<input class="centered-input" type="number" name="data.focus" value="{{data.data.focus}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input" type="number" name="system.focus" value="{{data.system.focus}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="vigilance-content {{#if data.data.is_compromised}}compromised{{/if}}">
|
<li class="vigilance-content {{#if data.system.is_compromised}}compromised{{/if}}">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.vigilance'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.vigilance'}}</strong>
|
||||||
{{#if data.data.is_compromised}}
|
{{#if data.system.is_compromised}}
|
||||||
<input class="centered-input" type="number" value="1" disabled/>
|
<input class="centered-input" type="number" value="1" disabled/>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input class="centered-input" type="number" name="data.vigilance" value="{{data.data.vigilance}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input" type="number" name="system.vigilance" value="{{data.system.vigilance}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<li class="void-content">
|
<li class="void-content">
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
<strong>{{localize 'l5r5e.attributes.voidpoints'}}</strong>
|
<strong>{{localize 'l5r5e.attributes.voidpoints'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.void_points.value" value="{{data.data.void_points.value}}" data-dtype="Number" placeholder="0" min="0" max="{{data.data.void_points.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.void_points.value" value="{{data.system.void_points.value}}" data-dtype="Number" placeholder="0" min="0" max="{{data.system.void_points.max}}" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
<input class="centered-input" type="number" name="data.void_points.max" value="{{data.data.void_points.max}}" data-dtype="Number" disabled/>
|
<input class="centered-input" type="number" name="system.void_points.max" value="{{data.system.void_points.max}}" data-dtype="Number" disabled/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<legend class="section-header">
|
<legend class="section-header">
|
||||||
{{localize 'l5r5e.conflict.initiative.title'}}
|
{{localize 'l5r5e.conflict.initiative.title'}}
|
||||||
<a class="encounter prepared-control" data-id="{{data.type}}">
|
<a class="encounter prepared-control" data-id="{{data.type}}">
|
||||||
<i class="fa fas prepared-icon prepared-icon-{{data.data.prepared}} prepared-{{data.data.type}}" title="{{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=data.data.prepared)}}"></i>
|
<i class="fa fas prepared-icon prepared-icon-{{data.system.prepared}} prepared-{{data.system.type}}" title="{{localize (localize 'l5r5e.conflict.initiative.prepared_{value}' value=data.system.prepared)}}"></i>
|
||||||
</a>
|
</a>
|
||||||
</legend>
|
</legend>
|
||||||
<button class="initiative dice-picker" data-initiative="true" data-skill="sentiment">{{localize 'l5r5e.conflict.initiative.intrigue'}}</button>
|
<button class="initiative dice-picker" data-initiative="true" data-skill="sentiment">{{localize 'l5r5e.conflict.initiative.intrigue'}}</button>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<fieldset class="stances-content flexrow">
|
<fieldset class="stances-content flexrow">
|
||||||
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each data.data.rings as |ringValue ringId|}}
|
{{#each data.system.rings as |ringValue ringId|}}
|
||||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.data.stance ringId=ringId}}
|
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.system.stance ringId=ringId}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<ul class="identity-list">
|
<ul class="identity-list">
|
||||||
{{!-- Npc Type (minion / adversary) --}}
|
{{!-- Npc Type (minion / adversary) --}}
|
||||||
<li>
|
<li>
|
||||||
<select class="attribute-dtype" name="data.type" {{^if data.editable_not_soft_locked}}disabled{{/if}}>
|
<select class="attribute-dtype" name="system.type" {{^if data.editable_not_soft_locked}}disabled{{/if}}>
|
||||||
{{#select data.data.type}}
|
{{#select data.system.type}}
|
||||||
{{#each data.data.types as |t|}}
|
{{#each data.types as |t|}}
|
||||||
<option value="{{t.id}}">{{t.label}}</option>
|
<option value="{{t.id}}">{{t.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
@@ -12,11 +12,11 @@
|
|||||||
{{!-- Martial --}}
|
{{!-- Martial --}}
|
||||||
<li>
|
<li>
|
||||||
<i class="i_bushi" title="{{localize 'l5r5e.social.npc.combat'}}"></i>
|
<i class="i_bushi" title="{{localize 'l5r5e.social.npc.combat'}}"></i>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.martial" value="{{data.data.conflict_rank.martial}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.conflict_rank.martial" value="{{data.system.conflict_rank.martial}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
{{!-- Social --}}
|
{{!-- Social --}}
|
||||||
<li>
|
<li>
|
||||||
<i class="i_courtier" title="{{localize 'l5r5e.social.npc.intrigue'}}"></i>
|
<i class="i_courtier" title="{{localize 'l5r5e.social.npc.intrigue'}}"></i>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.conflict_rank.social" value="{{data.data.conflict_rank.social}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.conflict_rank.social" value="{{data.system.conflict_rank.social}}" data-dtype="Number" min="0" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |pattern id|}}
|
{{#each actor.items as |pattern id|}}
|
||||||
{{#ifCond pattern.data.type '==' 'item_pattern'}}
|
{{#ifCond pattern.type '==' 'item_pattern'}}
|
||||||
{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/item-pattern/item-pattern-entry.html' pattern=pattern id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.ninjo'}}
|
{{localize 'l5r5e.social.ninjo'}}
|
||||||
<textarea type="text" name="data.social.ninjo" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.ninjo}}</textarea>
|
<textarea type="text" name="system.social.ninjo" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.ninjo}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.giri'}} / {{localize 'l5r5e.social.past'}}
|
{{localize 'l5r5e.social.giri'}} / {{localize 'l5r5e.social.past'}}
|
||||||
<textarea type="text" name="data.social.giri" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.giri}}</textarea>
|
<textarea type="text" name="system.social.giri" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.giri}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- Bushido Tenets --}}
|
{{!-- Bushido Tenets --}}
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.bushido_tenets.paramount'}}
|
{{localize 'l5r5e.social.bushido_tenets.paramount'}}
|
||||||
<textarea type="text" name="data.social.bushido_tenets.paramount" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.paramount}}</textarea>
|
<textarea type="text" name="system.social.bushido_tenets.paramount" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.bushido_tenets.paramount}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute-label">
|
<label class="attribute-label">
|
||||||
{{localize 'l5r5e.social.bushido_tenets.less_significant'}}
|
{{localize 'l5r5e.social.bushido_tenets.less_significant'}}
|
||||||
<textarea type="text" name="data.social.bushido_tenets.less_significant" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.data.social.bushido_tenets.less_significant}}</textarea>
|
<textarea type="text" name="system.social.bushido_tenets.less_significant" {{^if data.editable_not_soft_locked}}disabled{{/if}}>{{data.system.social.bushido_tenets.less_significant}}</textarea>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond '["distinction","passion"]' 'includes' item.data.data.peculiarity_type}}
|
{{#ifCond '["distinction","passion"]' 'includes' item.system.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond '["adversity","anxiety"]' 'includes' item.data.data.peculiarity_type}}
|
{{#ifCond '["adversity","anxiety"]' 'includes' item.system.peculiarity_type}}
|
||||||
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/peculiarity/peculiarity-entry.html' peculiarity=item id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |bond id|}}
|
{{#each actor.items as |bond id|}}
|
||||||
{{#ifCond bond.data.type '==' 'bond'}}
|
{{#ifCond bond.type '==' 'bond'}}
|
||||||
{{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/bond/bond-entry.html' bond=bond id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -78,11 +78,11 @@
|
|||||||
{{!-- Description (public) --}}
|
{{!-- Description (public) --}}
|
||||||
<fieldset class="narrative-description">
|
<fieldset class="narrative-description">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.description' }}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.description' }}</legend>
|
||||||
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.description target="system.description" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{{!-- Notes (private) --}}
|
{{!-- Notes (private) --}}
|
||||||
<fieldset class="narrative-note">
|
<fieldset class="narrative-note">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes' }}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.notes' }}</legend>
|
||||||
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
|
{{editor data.enrichedHtml.notes target="system.notes" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,35 +3,35 @@
|
|||||||
<label class="earth">
|
<label class="earth">
|
||||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||||
<strong>{{localizeRing 'earth'}}</strong>
|
<strong>{{localizeRing 'earth'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.earth" value="{{data.system.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="air">
|
<li id="air">
|
||||||
<label class="air">
|
<label class="air">
|
||||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||||
<strong>{{localizeRing 'air'}}</strong>
|
<strong>{{localizeRing 'air'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.air" value="{{data.data.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.air" value="{{data.system.rings.air}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="water">
|
<li id="water">
|
||||||
<label class="water">
|
<label class="water">
|
||||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||||
<strong>{{localizeRing 'water'}}</strong>
|
<strong>{{localizeRing 'water'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.water" value="{{data.data.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.water" value="{{data.system.rings.water}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="fire">
|
<li id="fire">
|
||||||
<label class="fire">
|
<label class="fire">
|
||||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||||
<strong>{{localizeRing 'fire'}}</strong>
|
<strong>{{localizeRing 'fire'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.fire" value="{{data.data.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.fire" value="{{data.system.rings.fire}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li id="void">
|
<li id="void">
|
||||||
<label class="void">
|
<label class="void">
|
||||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||||
<strong>{{localizeRing 'void'}}</strong>
|
<strong>{{localizeRing 'void'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings.void" value="{{data.data.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings.void" value="{{data.system.rings.void}}" data-dtype="Number" min="1" max="9" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<ul class="npc-skill">
|
<ul class="npc-skill">
|
||||||
{{#each data.data.skills as |skillValue skillCatId|}}
|
{{#each data.system.skills as |skillValue skillCatId|}}
|
||||||
<li class="skill skill-wrapper">
|
<li class="skill skill-wrapper">
|
||||||
<label class="dice-picker" data-skillcat="{{skillCatId}}">
|
<label class="dice-picker" data-skillcat="{{skillCatId}}">
|
||||||
{{localizeSkill skillCatId "title"}}
|
{{localizeSkill skillCatId "title"}}
|
||||||
</label>
|
</label>
|
||||||
<input class="centered-input select-on-focus" id="skill_{{skillCatId}}" type="number" name="data.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" min="0" max="9" placeholder="0" {{^if ../data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" id="skill_{{skillCatId}}" type="number" name="system.skills.{{skillCatId}}" value="{{skillValue}}" data-dtype="Number" min="0" max="9" placeholder="0" {{^if ../data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -2,32 +2,32 @@
|
|||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.honor" value="{{data.data.social.honor}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.honor" value="{{data.system.social.honor}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.glory" value="{{data.data.social.glory}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.glory" value="{{data.system.social.glory}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="attribute-label centered-input">
|
<label class="attribute-label centered-input">
|
||||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.social.status" value="{{data.data.social.status}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.social.status" value="{{data.system.social.status}}" data-dtype="Number" placeholder="0" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li class="affinities">
|
<li class="affinities">
|
||||||
{{!-- Attitude --}}
|
{{!-- Attitude --}}
|
||||||
<label class="attitude">
|
<label class="attitude">
|
||||||
<input type="text" name="data.attitude" value="{{data.data.attitude}}" data-dtype="String" placeholder="" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input type="text" name="system.attitude" value="{{data.system.attitude}}" data-dtype="String" placeholder="" {{^if data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
{{localize 'l5r5e.social.attitude'}}
|
{{localize 'l5r5e.social.attitude'}}
|
||||||
</label>
|
</label>
|
||||||
{{!-- Strength & Weakness --}}
|
{{!-- Strength & Weakness --}}
|
||||||
{{#each data.stances as |stance|}}
|
{{#each data.stances as |stance|}}
|
||||||
<label class="ring">
|
<label class="ring">
|
||||||
<i class="i_{{stance}}" title="{{localizeRing stance}}"></i>
|
<i class="i_{{stance}}" title="{{localizeRing stance}}"></i>
|
||||||
<input class="centered-input select-on-focus" type="number" name="data.rings_affinities.{{stance}}" value="{{lookup ../data.data.rings_affinities stance}}" data-dtype="Number" min="-9" max="9" placeholder="0" {{^if ../data.editable_not_soft_locked}}disabled{{/if}}/>
|
<input class="centered-input select-on-focus" type="number" name="system.rings_affinities.{{stance}}" value="{{lookup ../data.system.rings_affinities stance}}" data-dtype="Number" min="-9" max="9" placeholder="0" {{^if ../data.editable_not_soft_locked}}disabled{{/if}}/>
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<li class="stance-content">
|
<li class="stance-content">
|
||||||
<label class="stance-title {{ringId}}">
|
<label class="stance-title {{ringId}}">
|
||||||
{{localizeRing ringId}}
|
{{localizeRing ringId}}
|
||||||
<input id="stance_{{ringId}}" type="radio" name="data.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
|
<input id="stance_{{ringId}}" type="radio" name="system.stance" value="{{ringId}}" {{radioChecked ringId stance}}/>
|
||||||
</label>
|
</label>
|
||||||
<p class="item-description">{{localizeStanceTip ringId}}</p>
|
<p class="item-description">{{localizeStanceTip ringId}}</p>
|
||||||
</li>
|
</li>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
||||||
{{#each data.techniquesList as |technique|}}
|
{{#each data.techniquesList as |technique|}}
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="data.techniques.{{technique.id}}" {{checked (lookup ../data.data.techniques technique.id)}} {{^if ../data.editable_not_soft_locked}}disabled{{/if}} />
|
<input type="checkbox" name="system.techniques.{{technique.id}}" {{checked (lookup ../data.system.techniques technique.id)}} {{^if ../data.editable_not_soft_locked}}disabled{{/if}} />
|
||||||
{{technique.label}}
|
{{technique.label}}
|
||||||
</label>
|
</label>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
||||||
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
||||||
</span>
|
</span>
|
||||||
{{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.data.techniques technique)}}
|
{{#ifCond ../data.editable_not_soft_locked '&&' (lookup ../data.system.techniques technique)}}
|
||||||
<a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
|
<a data-item-type="technique" class="technique-control item-add" data-tech-type="{{technique}}" title="{{localize 'l5r5e.global.add'}}"><i class="fas fa-plus"></i></a>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
</legend>
|
</legend>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |scroll id|}}
|
{{#each actor.items as |scroll id|}}
|
||||||
{{#ifCond scroll.data.type '==' 'signature_scroll'}}
|
{{#ifCond scroll.type '==' 'signature_scroll'}}
|
||||||
{{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../data.editable_not_soft_locked}}
|
{{> 'systems/l5r5e/templates/items/signature-scroll/signature-scroll-entry.html' scroll=scroll id=id editable=../data.editable_not_soft_locked}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
<td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
|
<td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
|
||||||
<td>
|
<td>
|
||||||
<a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a>
|
<a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a>
|
||||||
{{#if actor.data.data.attitude}}<p>({{actor.data.data.attitude}})</p>{{/if}}
|
{{#if actor.system.attitude}}<p>({{actor.system.attitude}})</p>{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a data-actor-id="{{actor.id}}" data-type="stance" class="actor-modify-control">
|
<a data-actor-id="{{actor.id}}" data-type="stance" class="actor-modify-control">
|
||||||
<i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.data.data.stance}} - {{lookup actor.data.data.rings actor.data.data.stance}})</h2>{{localizeStanceTip actor.data.data.stance}}" class="i_{{actor.data.data.stance}} actor-infos-control"></i>
|
<i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.system.stance}} - {{lookup actor.system.rings actor.system.stance}})</h2>{{localizeStanceTip actor.system.stance}}" class="i_{{actor.system.stance}} actor-infos-control"></i>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -39,15 +39,15 @@
|
|||||||
<td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
|
<td>{{#if actor.haveArmorEquipped}}<i data-type="armors" data-actor-id="{{actor.id}}" class="fas fa-user-shield actor-infos-control"></i>{{/if}}</td>
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
{{#if actor.data.data.identity.school_rank}}
|
{{#if actor.system.identity.school_rank}}
|
||||||
{{actor.data.data.identity.school_rank}}
|
{{actor.system.identity.school_rank}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="i_bushi" title="{{localize 'l5r5e.social.npc.combat'}}"></i> {{actor.data.data.conflict_rank.martial}} <i class="i_courtier" title="{{localize 'l5r5e.social.npc.intrigue'}}"></i> {{actor.data.data.conflict_rank.social}}
|
<i class="i_bushi" title="{{localize 'l5r5e.social.npc.combat'}}"></i> {{actor.system.conflict_rank.martial}} <i class="i_courtier" title="{{localize 'l5r5e.social.npc.intrigue'}}"></i> {{actor.system.conflict_rank.social}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{#if actor.data.data.rings_affinities}}
|
{{#if actor.system.rings_affinities}}
|
||||||
{{#each actor.data.data.rings_affinities as |ringValue ringId|}}
|
{{#each actor.system.rings_affinities as |ringValue ringId|}}
|
||||||
{{#if ringValue}}
|
{{#if ringValue}}
|
||||||
<i class="i_{{ringId}}" title="{{localizeRing ringId}}"></i> {{ringValue}}
|
<i class="i_{{ringId}}" title="{{localizeRing ringId}}"></i> {{ringValue}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -57,24 +57,24 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="fatigue" class="actor-modify-control">
|
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="fatigue" class="actor-modify-control">
|
||||||
<span class="{{#ifCond actor.data.data.fatigue.value '>' actor.data.data.fatigue.max}}badvalue{{/ifCond}}">{{actor.data.data.fatigue.value}}</span>
|
<span class="{{#ifCond actor.system.fatigue.value '>' actor.system.fatigue.max}}badvalue{{/ifCond}}">{{actor.system.fatigue.value}}</span>
|
||||||
/ {{actor.data.data.fatigue.max}}
|
/ {{actor.system.fatigue.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="strife" class="actor-modify-control">
|
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="strife" class="actor-modify-control">
|
||||||
<span class="{{#ifCond actor.data.data.strife.value '>' actor.data.data.strife.max}}badvalue{{/ifCond}}">{{actor.data.data.strife.value}}</span>
|
<span class="{{#ifCond actor.system.strife.value '>' actor.system.strife.max}}badvalue{{/ifCond}}">{{actor.system.strife.value}}</span>
|
||||||
/ {{actor.data.data.strife.max}}
|
/ {{actor.system.strife.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{actor.data.data.focus}}
|
{{actor.system.focus}}
|
||||||
/ {{#if actor.data.data.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.data.data.vigilance}}{{/if}}
|
/ {{#if actor.system.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.system.vigilance}}{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="void_points" class="actor-modify-control">
|
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="void_points" class="actor-modify-control">
|
||||||
{{actor.data.data.void_points.value}}
|
{{actor.system.void_points.value}}
|
||||||
/ {{actor.data.data.void_points.max}}
|
/ {{actor.system.void_points.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||||
@@ -102,34 +102,34 @@
|
|||||||
<td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
|
<td><img data-actor-id="{{actor.id}}" draggable="true" class="profile actor-profile dragndrop-actor-id pointer" title="{{actor.name}}" src="{{actor.img}}"></td>
|
||||||
<td><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
|
<td><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
|
||||||
<td>
|
<td>
|
||||||
{{#if actor.data.data.warlord_actor_id}}
|
{{#if actor.system.warlord_actor_id}}
|
||||||
<a data-actor-id="{{actor.data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.warlord}}</a>
|
<a data-actor-id="{{actor.system.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.system.warlord}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{actor.data.data.warlord}}
|
{{actor.system.warlord}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="casualties" class="actor-modify-control">
|
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="casualties" class="actor-modify-control">
|
||||||
<span class="{{#ifCond actor.data.data.battle_readiness.casualties_strength.value '>' actor.data.data.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.casualties_strength.value}}</span>
|
<span class="{{#ifCond actor.system.battle_readiness.casualties_strength.value '>' actor.system.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.system.battle_readiness.casualties_strength.value}}</span>
|
||||||
/ {{actor.data.data.battle_readiness.casualties_strength.max}}
|
/ {{actor.system.battle_readiness.casualties_strength.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="panic" class="actor-modify-control">
|
<a title="{{localize 'l5r5e.gm.monitor.mouse_control'}}" data-actor-id="{{actor.id}}" data-type="panic" class="actor-modify-control">
|
||||||
<span class="{{#ifCond actor.data.data.battle_readiness.panic_discipline.value '>' actor.data.data.battle_readiness.panic_discipline.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.panic_discipline.value}}</span>
|
<span class="{{#ifCond actor.system.battle_readiness.panic_discipline.value '>' actor.system.battle_readiness.panic_discipline.max}}badvalue{{/ifCond}}">{{actor.system.battle_readiness.panic_discipline.value}}</span>
|
||||||
/ {{actor.data.data.battle_readiness.panic_discipline.max}}
|
/ {{actor.system.battle_readiness.panic_discipline.max}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{#if actor.data.data.commander_actor_id}}
|
{{#if actor.system.commander_actor_id}}
|
||||||
<a data-actor-id="{{actor.data.data.commander_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.commander}}</a>
|
<a data-actor-id="{{actor.system.commander_actor_id}}" class="open-sheet-actor-id">{{actor.system.commander}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{actor.data.data.commander}}
|
{{actor.system.commander}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<br>
|
<br>
|
||||||
<span class="{{#ifCond actor.data.data.commander_standing.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.honor '<' 30}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.honor}}</span>
|
<span class="{{#ifCond actor.system.commander_standing.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.system.commander_standing.honor '<' 30}}badvalue{{/ifCond}}">{{actor.system.commander_standing.honor}}</span>
|
||||||
/ <span class="{{#ifCond actor.data.data.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.data.data.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.data.data.commander_standing.glory}}</span>
|
/ <span class="{{#ifCond actor.system.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.system.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.system.commander_standing.glory}}</span>
|
||||||
/ {{actor.data.data.commander_standing.status}}
|
/ {{actor.system.commander_standing.status}}
|
||||||
</td>
|
</td>
|
||||||
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
<td><i data-actor-id="{{actor.id}}" data-type="global" class="fas fa-question-circle actor-infos-control"></i></td>
|
||||||
<td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
<td><span data-actor-id="{{actor.id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span></td>
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
<h2>{{localize 'ACTOR.TypeArmy'}}</h2>
|
<h2>{{localize 'ACTOR.TypeArmy'}}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{!-- warlord --}}
|
{{!-- warlord --}}
|
||||||
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.data.allies_backers}}</li>
|
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.system.allies_backers}}</li>
|
||||||
<li><b>{{localize 'l5r5e.army.purpose_mustering'}}</b> : {{actorData.data.purpose_mustering}}</li>
|
<li><b>{{localize 'l5r5e.army.purpose_mustering'}}</b> : {{actorData.system.purpose_mustering}}</li>
|
||||||
|
|
||||||
{{!-- commander --}}
|
{{!-- commander --}}
|
||||||
<li><b>{{localize 'l5r5e.army.commander_abilities'}}</b> : {{actorData.data.commander_abilities}}</li>
|
<li><b>{{localize 'l5r5e.army.commander_abilities'}}</b> : {{actorData.system.commander_abilities}}</li>
|
||||||
<li><b>{{localize 'l5r5e.army.army_abilities'}}</b> : {{{enrichHTML actorData.data.army_abilities}}}</li>
|
<li><b>{{localize 'l5r5e.army.army_abilities'}}</b> : {{{actorData.enrichedHtml.army_abilities}}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!-- description --}}
|
{{!-- description --}}
|
||||||
<p>{{{enrichHTML actorData.data.description}}}</p>
|
<p>{{{actorData.enrichedHtml.description}}}</p>
|
||||||
|
|
||||||
{{!-- Cohorts --}}
|
{{!-- Cohorts --}}
|
||||||
{{#if actorData.splitItemsList.army_cohort}}
|
{{#if actorData.splitItemsList.army_cohort}}
|
||||||
@@ -18,12 +18,12 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{{#each actorData.splitItemsList.army_cohort as |cohort|}}
|
{{#each actorData.splitItemsList.army_cohort as |cohort|}}
|
||||||
<li>
|
<li>
|
||||||
<b>{{cohort.name}} {{#if cohort.data.leader}}({{cohort.data.leader}}){{/if}}</b>
|
<b>{{cohort.name}} {{#if cohort.system.leader}}({{cohort.system.leader}}){{/if}}</b>
|
||||||
<br>
|
<br>
|
||||||
<i class="fas fa-user-injured" title="{{localize 'l5r5e.army.battle_readiness.casualties'}}"> {{cohort.data.battle_readiness.casualties_strength.value}}</i>
|
<i class="fas fa-user-injured" title="{{localize 'l5r5e.army.battle_readiness.casualties'}}"> {{cohort.system.battle_readiness.casualties_strength.value}}</i>
|
||||||
<i class="fas fa-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.data.battle_readiness.casualties_strength.max}}</i>
|
<i class="fas fa-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.system.battle_readiness.casualties_strength.max}}</i>
|
||||||
<i class="fas fa-ghost" title="{{localize 'l5r5e.army.battle_readiness.panic'}}"> {{cohort.data.battle_readiness.panic_discipline.value}}</i>
|
<i class="fas fa-ghost" title="{{localize 'l5r5e.army.battle_readiness.panic'}}"> {{cohort.system.battle_readiness.panic_discipline.value}}</i>
|
||||||
<i class="fas fa-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.data.battle_readiness.panic_discipline.max}}</i>
|
<i class="fas fa-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.system.battle_readiness.panic_discipline.max}}</i>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -36,8 +36,8 @@
|
|||||||
{{#each actorData.splitItemsList.army_fortification as |fortification|}}
|
{{#each actorData.splitItemsList.army_fortification as |fortification|}}
|
||||||
<li>
|
<li>
|
||||||
<b>{{fortification.name}}</b>
|
<b>{{fortification.name}}</b>
|
||||||
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.data.difficulty}}</i>
|
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.system.difficulty}}</i>
|
||||||
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.data.attrition_reduction}}</i>
|
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.system.attrition_reduction}}</i>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,29 +1,29 @@
|
|||||||
<section>
|
<section>
|
||||||
<ul>
|
<ul>
|
||||||
{{!-- Ninjo/Giri --}}
|
{{!-- Ninjo/Giri --}}
|
||||||
<li><b>{{localize 'l5r5e.social.ninjo'}}</b> : {{actorData.social.ninjo}}</li>
|
<li><b>{{localize 'l5r5e.social.ninjo'}}</b> : {{actorData.system.social.ninjo}}</li>
|
||||||
<li><b>{{localize 'l5r5e.social.giri'}}</b> : {{actorData.social.giri}}</li>
|
<li><b>{{localize 'l5r5e.social.giri'}}</b> : {{actorData.system.social.giri}}</li>
|
||||||
|
|
||||||
{{!-- Bushido Tenet --}}
|
{{!-- Bushido Tenet --}}
|
||||||
<li><b>{{localize 'l5r5e.social.bushido_tenets.paramount'}}</b> : {{actorData.social.bushido_tenets.paramount}}</li>
|
<li><b>{{localize 'l5r5e.social.bushido_tenets.paramount'}}</b> : {{actorData.system.social.bushido_tenets.paramount}}</li>
|
||||||
<li><b>{{localize 'l5r5e.social.bushido_tenets.less_significant'}}</b> : {{actorData.social.bushido_tenets.less_significant}}</li>
|
<li><b>{{localize 'l5r5e.social.bushido_tenets.less_significant'}}</b> : {{actorData.system.social.bushido_tenets.less_significant}}</li>
|
||||||
|
|
||||||
{{!-- Peculiarities --}}
|
{{!-- Peculiarities --}}
|
||||||
<li><b>{{localize 'l5r5e.social.npc.advantages'}}</b> : {{advantages}}</li>
|
<li><b>{{localize 'l5r5e.social.npc.advantages'}}</b> : {{advantages}}</li>
|
||||||
<li><b>{{localize 'l5r5e.social.npc.disadvantages'}}</b> : {{disadvantages}}</li>
|
<li><b>{{localize 'l5r5e.social.npc.disadvantages'}}</b> : {{disadvantages}}</li>
|
||||||
|
|
||||||
{{!-- Honor/Glory/Status --}}
|
{{!-- Honor/Glory/Status --}}
|
||||||
<li><b>{{localize 'l5r5e.social.honor'}}</b> : <span class="{{#ifCond actorData.social.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actorData.social.honor '<' 30}}badvalue{{/ifCond}}">{{actorData.social.honor}}</span></li>
|
<li><b>{{localize 'l5r5e.social.honor'}}</b> : <span class="{{#ifCond actorData.system.social.honor '>' 64}}goodvalue{{/ifCond}}{{#ifCond actorData.system.social.honor '<' 30}}badvalue{{/ifCond}}">{{actorData.system.social.honor}}</span></li>
|
||||||
<li><b>{{localize 'l5r5e.social.glory'}}</b> : <span class="{{#ifCond actorData.social.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actorData.social.glory '<' 20}}badvalue{{/ifCond}}">{{actorData.social.glory}}</span></li>
|
<li><b>{{localize 'l5r5e.social.glory'}}</b> : <span class="{{#ifCond actorData.system.social.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actorData.system.social.glory '<' 20}}badvalue{{/ifCond}}">{{actorData.system.social.glory}}</span></li>
|
||||||
<li><b>{{localize 'l5r5e.social.status'}}</b> : {{actorData.social.status}}</li>
|
<li><b>{{localize 'l5r5e.social.status'}}</b> : {{actorData.system.social.status}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{#ifCond actor_type "==" "character"}}
|
{{#ifCond actor_type "==" "character"}}
|
||||||
{{!-- 20Q --}}
|
{{!-- 20Q --}}
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>{{localize (localize 'l5r5e.twenty_questions.part5.q14{suffix}' suffix=suffix)}}</b> : {{actorData.twenty_questions.step14.first_sight}}</li>
|
<li><b>{{localize (localize 'l5r5e.twenty_questions.part5.q14{suffix}' suffix=suffix)}}</b> : {{actorData.system.twenty_questions.step14.first_sight}}</li>
|
||||||
<li><b>{{localize (localize 'l5r5e.twenty_questions.part5.q15{suffix}' suffix=suffix)}}</b> : {{actorData.twenty_questions.step15.stress}}</li>
|
<li><b>{{localize (localize 'l5r5e.twenty_questions.part5.q15{suffix}' suffix=suffix)}}</b> : {{actorData.system.twenty_questions.step15.stress}}</li>
|
||||||
<li><b>{{localize (localize 'l5r5e.twenty_questions.part7.q20{suffix}' suffix=suffix)}}</b> : {{actorData.twenty_questions.step20.death}}</li>
|
<li><b>{{localize (localize 'l5r5e.twenty_questions.part7.q20{suffix}' suffix=suffix)}}</b> : {{actorData.system.twenty_questions.step20.death}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
<p>{{{enrichHTML actorData.description}}}</p>
|
<p>{{{actorData.enrichedHtml.description}}}</p>
|
||||||
</section>
|
</section>
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{!-- Attributes Tab --}}
|
{{!-- Attributes Tab --}}
|
||||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
<select name="data.advancement_type" id="advancement_type">
|
<select name="system.advancement_type" id="advancement_type">
|
||||||
{{#select data.data.advancement_type}}
|
{{#select data.system.advancement_type}}
|
||||||
{{#each data.subTypesList as |label type|}}
|
{{#each data.subTypesList as |label type|}}
|
||||||
<option value="{{type}}">{{localize label}}</option>
|
<option value="{{type}}">{{localize label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{{#ifCond data.data.advancement_type '==' 'ring'}}
|
{{#ifCond data.system.advancement_type '==' 'ring'}}
|
||||||
<select name="data.ring" id="advancement_ring">
|
<select name="system.ring" id="advancement_ring">
|
||||||
{{#select data.data.ring}}
|
{{#select data.system.ring}}
|
||||||
{{#each data.ringsList as |obj|}}
|
{{#each data.ringsList as |obj|}}
|
||||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -25,10 +25,10 @@
|
|||||||
</select>
|
</select>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
|
|
||||||
{{#ifCond data.data.advancement_type '==' 'skill'}}
|
{{#ifCond data.system.advancement_type '==' 'skill'}}
|
||||||
<select name="data.skill" id="advancement_skill">
|
<select name="system.skill" id="advancement_skill">
|
||||||
<option value="">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
<option value="">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
||||||
{{#select data.data.skill}}
|
{{#select data.system.skill}}
|
||||||
{{#each data.skillsList as |skills catId|}}
|
{{#each data.skillsList as |skills catId|}}
|
||||||
<optgroup label="{{localizeSkill catId 'title'}}">
|
<optgroup label="{{localizeSkill catId 'title'}}">
|
||||||
{{#each skills as |obj|}}
|
{{#each skills as |obj|}}
|
||||||
@@ -40,20 +40,20 @@
|
|||||||
</select>
|
</select>
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
<label class="cursus attribute-value checkbox">
|
<label class="cursus attribute-value checkbox">
|
||||||
<input type="checkbox" name="data.in_curriculum" {{checked data.data.in_curriculum}} />
|
<input type="checkbox" name="system.in_curriculum" {{checked data.system.in_curriculum}} />
|
||||||
{{localize 'l5r5e.advancements.curriculum'}}
|
{{localize 'l5r5e.advancements.curriculum'}}
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
{{#ifCond data.data.advancement_type '==' 'ring' }}
|
{{#ifCond data.system.advancement_type '==' 'ring' }}
|
||||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.data.ring}}
|
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.system.ring}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<strong>{{localize 'l5r5e.skills.label'}}</strong> : {{localizeSkillId data.data.skill}}
|
<strong>{{localize 'l5r5e.skills.label'}}</strong> : {{localizeSkillId data.system.skill}}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
</li>
|
</li>
|
||||||
<li><strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.data.in_curriculum}}</li>
|
<li><strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.system.in_curriculum}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}</li>
|
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}</li>
|
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}</li>
|
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<li class="item-img"><img src="{{armor.img}}" title="{{armor.name}}" width="32px" height="32px"/></li>
|
<li class="item-img"><img src="{{armor.img}}" title="{{armor.name}}" width="32px" height="32px"/></li>
|
||||||
<li class="item-name l5r5e-tooltip" data-item-id="{{armor.id}}">{{armor.name}}</li>
|
<li class="item-name l5r5e-tooltip" data-item-id="{{armor.id}}">{{armor.name}}</li>
|
||||||
<li class="icon-stat-container">
|
<li class="icon-stat-container">
|
||||||
<i class="fas fa-tint" title="{{localize 'l5r5e.armors.type'}} {{localize 'l5r5e.armors.physical'}}"> {{armor.data.data.armor.physical}}</i>
|
<i class="fas fa-tint" title="{{localize 'l5r5e.armors.type'}} {{localize 'l5r5e.armors.physical'}}"> {{armor.system.armor.physical}}</i>
|
||||||
<i class="fas fa-bolt" title="{{localize 'l5r5e.armors.type'}} {{localize 'l5r5e.armors.supernatural'}}"> {{armor.data.data.armor.supernatural}}</i>
|
<i class="fas fa-bolt" title="{{localize 'l5r5e.armors.type'}} {{localize 'l5r5e.armors.supernatural'}}"> {{armor.system.armor.supernatural}}</i>
|
||||||
</li>
|
</li>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<li data-item-id="{{armor.id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
<li data-item-id="{{armor.id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-properties">
|
<ul class="item-properties">
|
||||||
{{#each armor.data.data.properties as |property id|}}
|
{{#each armor.system.properties as |property id|}}
|
||||||
<li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li>
|
<li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{{!-- attributes --}}
|
{{!-- attributes --}}
|
||||||
<article class="attributes" data-group="primary" data-tab="description">
|
<article class="attributes" data-group="primary" data-tab="description">
|
||||||
<label class="equipped checkbox">
|
<label class="equipped checkbox">
|
||||||
<input type="checkbox" name="data.equipped" {{checked data.data.equipped}} />
|
<input type="checkbox" name="system.equipped" {{checked data.system.equipped}} />
|
||||||
{{ localize 'l5r5e.armors.equipped' }}
|
{{ localize 'l5r5e.armors.equipped' }}
|
||||||
</label>
|
</label>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
|
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
<legend class="text-header">{{localize 'l5r5e.armors.type'}}</legend>
|
<legend class="text-header">{{localize 'l5r5e.armors.type'}}</legend>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.armors.physical'}}
|
{{localize 'l5r5e.armors.physical'}}
|
||||||
<input class="select-on-focus" type="number" name="data.armor.physical" value="{{data.data.armor.physical}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.armor.physical" value="{{data.system.armor.physical}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
{{localize 'l5r5e.armors.supernatural'}}
|
{{localize 'l5r5e.armors.supernatural'}}
|
||||||
<input class="select-on-focus" type="number" name="data.armor.supernatural" value="{{data.data.armor.supernatural}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.armor.supernatural" value="{{data.system.armor.supernatural}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,42 +1,42 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.data.equipped}}
|
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.system.equipped}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.data.readied}}
|
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.system.readied}}
|
||||||
</li>
|
</li>
|
||||||
{{!--item-value--}}
|
{{!--item-value--}}
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.data.quantity}}
|
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.system.quantity}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.data.weight}}
|
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.system.weight}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.data.rarity}}
|
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.system.rarity}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.data.zeni}}
|
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.system.zeni}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.armors.physical'}}</strong> : {{data.data.armor.physical}}
|
<strong>{{localize 'l5r5e.armors.physical'}}</strong> : {{data.system.armor.physical}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.armors.supernatural'}}</strong> : {{data.data.armor.supernatural}}
|
<strong>{{localize 'l5r5e.armors.supernatural'}}</strong> : {{data.system.armor.supernatural}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--properties--}}
|
{{!--properties--}}
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
||||||
{{#each data.data.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
{{#each data.system.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
||||||
</p>
|
</p>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</legend>
|
</legend>
|
||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each actor.items as |item id|}}
|
{{#each actor.items as |item id|}}
|
||||||
{{#ifCond (ifCond item.type '==' 'armor') '&&' (ifCond item.data.data.equipped '==' true)}}
|
{{#ifCond (ifCond item.type '==' 'armor') '&&' (ifCond item.system.equipped '==' true)}}
|
||||||
{{> 'systems/l5r5e/templates/items/armor/armor-entry.html' armor=item id=id editable=../data.editable_not_soft_locked }}
|
{{> 'systems/l5r5e/templates/items/armor/armor-entry.html' armor=item id=id editable=../data.editable_not_soft_locked }}
|
||||||
{{/ifCond}}
|
{{/ifCond}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<li class="item cohort flexcol dragndrop-actor-id actor">
|
<li class="item cohort flexcol dragndrop-actor-id actor">
|
||||||
<ul class="item-header item-control">
|
<ul class="item-header item-control">
|
||||||
<li class="item-img"><img src="{{cohort.img}}" title="{{cohort.name}}" width="32px" height="32px" {{#if cohort.data.leader_actor_id}}draggable="true" class="dragndrop-actor-id pointer" data-actor-id="{{cohort.data.leader_actor_id}}"{{/if}}/></li>
|
<li class="item-img"><img src="{{cohort.img}}" title="{{cohort.name}}" width="32px" height="32px" {{#if cohort.system.leader_actor_id}}draggable="true" class="dragndrop-actor-id pointer" data-actor-id="{{cohort.system.leader_actor_id}}"{{/if}}/></li>
|
||||||
<li class="item-name l5r5e-tooltip" data-item-id="{{cohort._id}}">{{cohort.name}}</li>
|
<li class="item-name l5r5e-tooltip" data-item-id="{{cohort._id}}">{{cohort.name}}</li>
|
||||||
<li class="icon-stat-container">
|
<li class="icon-stat-container">
|
||||||
<i class="fas fa-user-injured" title="{{localize 'l5r5e.army.battle_readiness.casualties'}}"> {{cohort.data.battle_readiness.casualties_strength.value}}</i>
|
<i class="fas fa-user-injured" title="{{localize 'l5r5e.army.battle_readiness.casualties'}}"> {{cohort.system.battle_readiness.casualties_strength.value}}</i>
|
||||||
<i class="fas fa-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.data.battle_readiness.casualties_strength.max}}</i>
|
<i class="fas fa-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.system.battle_readiness.casualties_strength.max}}</i>
|
||||||
<i class="fas fa-ghost" title="{{localize 'l5r5e.army.battle_readiness.panic'}}"> {{cohort.data.battle_readiness.panic_discipline.value}}</i>
|
<i class="fas fa-ghost" title="{{localize 'l5r5e.army.battle_readiness.panic'}}"> {{cohort.system.battle_readiness.panic_discipline.value}}</i>
|
||||||
<i class="fas fa-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.data.battle_readiness.panic_discipline.max}}</i>
|
<i class="fas fa-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.system.battle_readiness.panic_discipline.max}}</i>
|
||||||
</li>
|
</li>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<li data-item-id="{{cohort._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
<li data-item-id="{{cohort._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-properties">
|
<ul class="item-properties">
|
||||||
{{#if cohort.data.leader}}<li>{{localize 'l5r5e.army.cohort.leader'}} : {{#if cohort.data.leader_actor_id}}<a data-actor-id="{{cohort.data.leader_actor_id}}" class="open-sheet-actor-id">{{cohort.data.leader}}</a>{{else}}{{cohort.data.leader}}{{/if}}</li>{{/if}}
|
{{#if cohort.system.leader}}<li>{{localize 'l5r5e.army.cohort.leader'}} : {{#if cohort.system.leader_actor_id}}<a data-actor-id="{{cohort.system.leader_actor_id}}" class="open-sheet-actor-id">{{cohort.system.leader}}</a>{{else}}{{cohort.system.leader}}{{/if}}</li>{{/if}}
|
||||||
{{#if cohort.data.equipment}}<li>{{localize 'l5r5e.sheets.equipment'}} : {{cohort.data.equipment}}</li>{{/if}}
|
{{#if cohort.system.equipment}}<li>{{localize 'l5r5e.sheets.equipment'}} : {{cohort.system.equipment}}</li>{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -10,35 +10,35 @@
|
|||||||
{{!-- battle readiness --}}
|
{{!-- battle readiness --}}
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.battle_readiness.casualties'}}
|
{{localize 'l5r5e.army.battle_readiness.casualties'}}
|
||||||
<input class="select-on-focus" type="number" name="data.battle_readiness.casualties_strength.value" value="{{data.data.battle_readiness.casualties_strength.value}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.battle_readiness.casualties_strength.value" value="{{data.system.battle_readiness.casualties_strength.value}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.battle_readiness.strength'}}
|
{{localize 'l5r5e.army.battle_readiness.strength'}}
|
||||||
<input class="select-on-focus" type="number" name="data.battle_readiness.casualties_strength.max" value="{{data.data.battle_readiness.casualties_strength.max}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.battle_readiness.casualties_strength.max" value="{{data.system.battle_readiness.casualties_strength.max}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.battle_readiness.panic'}}
|
{{localize 'l5r5e.army.battle_readiness.panic'}}
|
||||||
<input class="select-on-focus" type="number" name="data.battle_readiness.panic_discipline.value" value="{{data.data.battle_readiness.panic_discipline.value}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.battle_readiness.panic_discipline.value" value="{{data.system.battle_readiness.panic_discipline.value}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.battle_readiness.discipline'}}
|
{{localize 'l5r5e.army.battle_readiness.discipline'}}
|
||||||
<input class="select-on-focus" type="number" name="data.battle_readiness.panic_discipline.max" value="{{data.data.battle_readiness.panic_discipline.max}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.battle_readiness.panic_discipline.max" value="{{data.system.battle_readiness.panic_discipline.max}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="attribute army-cohort-types flx50">
|
<label class="attribute army-cohort-types flx50">
|
||||||
{{^if data.data.leader_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{localize 'l5r5e.army.cohort.leader'}}
|
{{^if data.system.leader_actor_id}}<i class="fa fa-sign-in-alt" aria-hidden="true"></i> {{/if}}{{localize 'l5r5e.army.cohort.leader'}}
|
||||||
{{#if data.data.leader_actor_id}}
|
{{#if data.system.leader_actor_id}}
|
||||||
<div>
|
<div>
|
||||||
<span data-actor-id="{{data.data.leader_actor_id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
<span data-actor-id="{{data.system.leader_actor_id}}" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
||||||
<a data-actor-id="{{data.data.leader_actor_id}}" class="open-sheet-actor-id">{{data.data.leader}}</a>
|
<a data-actor-id="{{data.system.leader_actor_id}}" class="open-sheet-actor-id">{{data.system.leader}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<input class="select-on-focus" type="text" name="data.leader" value="{{data.data.leader}}" data-dtype="String"/>
|
<input class="select-on-focus" type="text" name="system.leader" value="{{data.system.leader}}" data-dtype="String"/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types flx50">
|
<label class="attribute army-cohort-types flx50">
|
||||||
{{localize 'l5r5e.sheets.equipment'}}
|
{{localize 'l5r5e.sheets.equipment'}}
|
||||||
<input class="select-on-focus" type="text" name="data.equipment" value="{{data.data.equipment}}" data-dtype="String"/>
|
<input class="select-on-focus" type="text" name="system.equipment" value="{{data.system.equipment}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<article class="tab abilities" data-group="primary" data-tab="abilities">
|
<article class="tab abilities" data-group="primary" data-tab="abilities">
|
||||||
<fieldset class="attribute army-cohort-types flx100">
|
<fieldset class="attribute army-cohort-types flx100">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.army.cohort.abilities'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.army.cohort.abilities'}}</legend>
|
||||||
{{editor content=data.data.abilities target="data.abilities" button=true owner=owner editable=editable}}
|
{{editor data.enrichedHtml.abilities target="system.abilities" button=true owner=owner editable=editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>{{localize 'l5r5e.army.cohort.leader'}}</strong> : {{data.data.leader}}</li>
|
<li><strong>{{localize 'l5r5e.army.cohort.leader'}}</strong> : {{data.system.leader}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.sheets.equipment'}}</strong> : {{data.data.equipment}}</li>
|
<li><strong>{{localize 'l5r5e.sheets.equipment'}}</strong> : {{data.system.equipment}}</li>
|
||||||
{{!-- battle readiness --}}
|
{{!-- battle readiness --}}
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong> : {{data.data.battle_readiness.casualties_strength.value}}</li>
|
<li><strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong> : {{data.system.battle_readiness.casualties_strength.value}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong> : {{data.data.battle_readiness.casualties_strength.max}}</li>
|
<li><strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong> : {{data.system.battle_readiness.casualties_strength.max}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong> : {{data.data.battle_readiness.panic_discipline.value}}</li>
|
<li><strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong> : {{data.system.battle_readiness.panic_discipline.value}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong> : {{data.data.battle_readiness.panic_discipline.max}}</li>
|
<li><strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong> : {{data.system.battle_readiness.panic_discipline.max}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!-- abilities --}}
|
{{!-- abilities --}}
|
||||||
<p><strong>{{localize 'l5r5e.army.cohort.abilities'}}</strong> : {{{enrichHTML data.data.abilities}}}</p>
|
<p><strong>{{localize 'l5r5e.army.cohort.abilities'}}</strong> : {{{data.enrichedHtml.abilities}}}</p>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<li class="item-img"><img src="{{fortification.img}}" title="{{fortification.name}}" width="32px" height="32px"/></li>
|
<li class="item-img"><img src="{{fortification.img}}" title="{{fortification.name}}" width="32px" height="32px"/></li>
|
||||||
<li class="item-name l5r5e-tooltip" data-item-id="{{fortification._id}}">{{fortification.name}}</li>
|
<li class="item-name l5r5e-tooltip" data-item-id="{{fortification._id}}">{{fortification.name}}</li>
|
||||||
<li class="icon-stat-container">
|
<li class="icon-stat-container">
|
||||||
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.data.difficulty}}</i>
|
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.system.difficulty}}</i>
|
||||||
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.data.attrition_reduction}}</i>
|
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.system.attrition_reduction}}</i>
|
||||||
</li>
|
</li>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<li data-item-id="{{fortification._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
<li data-item-id="{{fortification._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
<article class="attributes" data-group="primary" data-tab="description">
|
<article class="attributes" data-group="primary" data-tab="description">
|
||||||
<label class="attribute army-fortification-types">
|
<label class="attribute army-fortification-types">
|
||||||
{{localize 'l5r5e.army.fortification.difficulty'}}
|
{{localize 'l5r5e.army.fortification.difficulty'}}
|
||||||
<input class="select-on-focus" type="number" name="data.difficulty" value="{{data.data.difficulty}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.difficulty" value="{{data.system.difficulty}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="attribute army-fortification-types">
|
<label class="attribute army-fortification-types">
|
||||||
{{localize 'l5r5e.army.fortification.attrition_reduction'}}
|
{{localize 'l5r5e.army.fortification.attrition_reduction'}}
|
||||||
<input class="select-on-focus" type="number" name="data.attrition_reduction" value="{{data.data.attrition_reduction}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="number" name="system.attrition_reduction" value="{{data.system.attrition_reduction}}" data-dtype="Number"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>{{localize 'l5r5e.army.fortification.difficulty'}}</strong> : {{data.data.difficulty}}</li>
|
<li><strong>{{localize 'l5r5e.army.fortification.difficulty'}}</strong> : {{data.system.difficulty}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.army.fortification.attrition_reduction'}}</strong> : {{data.data.attrition_reduction}}</li>
|
<li><strong>{{localize 'l5r5e.army.fortification.attrition_reduction'}}</strong> : {{data.system.attrition_reduction}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
<li data-item-id="{{bond.id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
<li data-item-id="{{bond.id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
{{#if bond.data.data.bond_type}}
|
{{#if bond.system.bond_type}}
|
||||||
<ul class="item-properties">
|
<ul class="item-properties">
|
||||||
<li>{{bond.data.data.bond_type}} {{bond.data.data.rank}}</li>
|
<li>{{bond.system.bond_type}} {{bond.system.rank}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
@@ -9,23 +9,23 @@
|
|||||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
<label class="attribute bonds-types">
|
<label class="attribute bonds-types">
|
||||||
{{localize 'l5r5e.sheets.types'}}
|
{{localize 'l5r5e.sheets.types'}}
|
||||||
<input class="select-on-focus" type="text" name="data.bond_type" value="{{data.data.bond_type}}" data-dtype="String"/>
|
<input class="select-on-focus" type="text" name="system.bond_type" value="{{data.system.bond_type}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.cost'}}
|
{{localize 'l5r5e.advancements.cost'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_cost" value="{{data.data.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_cost" value="{{data.system.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.data.bond_type}}
|
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.system.bond_type}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}
|
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}
|
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--properties--}}
|
{{!--properties--}}
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
||||||
{{#each data.data.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
{{#each data.system.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
||||||
</p>
|
</p>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,23 +9,23 @@
|
|||||||
<article class="attributes item-list" data-group="primary" data-tab="attributes">
|
<article class="attributes item-list" data-group="primary" data-tab="attributes">
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.rarity_modifier'}}
|
{{localize 'l5r5e.advancements.rarity_modifier'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rarity_modifier" value="{{data.data.rarity_modifier}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rarity_modifier" value="{{data.system.rarity_modifier}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.cost'}}
|
{{localize 'l5r5e.advancements.cost'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_cost" value="{{data.data.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_cost" value="{{data.system.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute item">
|
<label class="attribute item">
|
||||||
{{localize 'l5r5e.sheets.linked_property'}}
|
{{localize 'l5r5e.sheets.linked_property'}}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>{{localize 'l5r5e.advancements.rarity_modifier'}}</strong> : {{data.data.rarity_modifier}}</li>
|
<li><strong>{{localize 'l5r5e.advancements.rarity_modifier'}}</strong> : {{data.system.rarity_modifier}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}</li>
|
<li><strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}</li>
|
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}</li>
|
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}</li>
|
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--Linked property--}}
|
{{!--Linked property--}}
|
||||||
<strong>{{localize 'l5r5e.sheets.linked_property'}}</strong> : {{{data.linkedProperty.name}}}
|
<strong>{{localize 'l5r5e.sheets.linked_property'}}</strong> : {{{data.linkedProperty.name}}}
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<li class="item flexcol" data-item-id="{{item._id}}">
|
<li class="item flexcol" data-item-id="{{item._id}}">
|
||||||
<ul class="item-header item-control">
|
<ul class="item-header item-control">
|
||||||
<li class="item-img"><img src="{{item.img}}" title="{{item.name}}" width="32px" height="32px"/></li>
|
<li class="item-img"><img src="{{item.img}}" title="{{item.name}}" width="32px" height="32px"/></li>
|
||||||
<li class="item-name l5r5e-tooltip" data-item-id="{{item._id}}">{{item.name}} <sub>x{{item.data.quantity}}</sub></li>
|
<li class="item-name l5r5e-tooltip" data-item-id="{{item._id}}">{{item.name}} <sub>x{{item.system.quantity}}</sub></li>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<li data-item-id="{{item._id}}" data-type="equipped" class="item-equip equip-readied-control" title="{{localize 'l5r5e.armors.equipped'}}"><i class="fas {{#if item.data.equipped}}fa-tshirt{{else}}fa-weight-hanging{{/if}}"></i></li>
|
<li data-item-id="{{item._id}}" data-type="equipped" class="item-equip equip-readied-control" title="{{localize 'l5r5e.armors.equipped'}}"><i class="fas {{#if item.system.equipped}}fa-tshirt{{else}}fa-weight-hanging{{/if}}"></i></li>
|
||||||
{{^if soft_locked}}
|
{{^if soft_locked}}
|
||||||
<li data-item-id="{{item._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
<li data-item-id="{{item._id}}" class="item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
<li data-item-id="{{item._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
<li data-item-id="{{item._id}}" class="item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="item-properties">
|
<ul class="item-properties">
|
||||||
{{#each item.data.properties as |property idx|}}
|
{{#each item.system.properties as |property idx|}}
|
||||||
<li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li>
|
<li class="l5r5e-tooltip" data-property-id="{{property.id}}">{{{property.name}}}</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<article class="tab infos active" data-group="primary" data-tab="infos">
|
<article class="tab infos active" data-group="primary" data-tab="infos">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.sheets.description'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.sheets.description'}}</legend>
|
||||||
{{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor data.enrichedHtml.description target="system.description" button=true owner=owner editable=editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<label class="reference">
|
<label class="reference">
|
||||||
{{localize 'l5r5e.sheets.book_reference'}}
|
{{localize 'l5r5e.sheets.book_reference'}}
|
||||||
<input type="text" name="data.book_reference" value="{{data.data.book_reference}}" />
|
<input type="text" name="system.book_reference" value="{{data.system.book_reference}}" />
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
{{!-- properties Tab --}}
|
{{!-- properties Tab --}}
|
||||||
<article class="attributes" data-group="primary" data-tab="checkbox">
|
<article class="attributes" data-group="primary" data-tab="checkbox">
|
||||||
<label class="equipped checkbox">
|
<label class="equipped checkbox">
|
||||||
<input type="checkbox" name="data.equipped" {{checked data.data.equipped}} />
|
<input type="checkbox" name="system.equipped" {{checked data.datasystem.equipped}} />
|
||||||
{{ localize 'l5r5e.armors.equipped' }}
|
{{ localize 'l5r5e.armors.equipped' }}
|
||||||
</label>
|
</label>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
|
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
|
||||||
|
|||||||
@@ -1,36 +1,36 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.data.equipped}}
|
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.system.equipped}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.data.readied}}
|
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.system.readied}}
|
||||||
</li>
|
</li>
|
||||||
{{!--item-value--}}
|
{{!--item-value--}}
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.data.quantity}}
|
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.system.quantity}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.data.weight}}
|
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.system.weight}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.data.rarity}}
|
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.system.rarity}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.data.zeni}}
|
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.system.zeni}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--properties--}}
|
{{!--properties--}}
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
<strong>{{localize 'l5r5e.sheets.properties'}}</strong> :
|
||||||
{{#each data.data.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
{{#each data.system.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
||||||
</p>
|
</p>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<label class="value">
|
<label class="value">
|
||||||
{{localize 'l5r5e.sheets.quantity'}}
|
{{localize 'l5r5e.sheets.quantity'}}
|
||||||
<input class="select-on-focus" type="number" name="data.quantity" value="{{data.data.quantity}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.quantity" value="{{data.system.quantity}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="value">
|
<label class="value">
|
||||||
{{localize 'l5r5e.sheets.weight'}}
|
{{localize 'l5r5e.sheets.weight'}}
|
||||||
<input class="select-on-focus" type="number" name="data.weight" value="{{data.data.weight}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.weight" value="{{data.system.weight}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="value">
|
<label class="value">
|
||||||
{{localize 'l5r5e.sheets.rarity'}}
|
{{localize 'l5r5e.sheets.rarity'}}
|
||||||
<input class="select-on-focus" type="text" name="data.rarity" value="{{data.data.rarity}}" data-dtype="String" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="text" name="system.rarity" value="{{data.system.rarity}}" data-dtype="String" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="value">
|
<label class="value">
|
||||||
<i class="fas fa-coins"></i>
|
<i class="fas fa-coins"></i>
|
||||||
<input class="select-on-focus" type="text" name="data.zeni" value="{{data.data.zeni}}" data-dtype="String" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="text" name="system.zeni" value="{{data.system.zeni}}" data-dtype="String" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
<ul class="item-list inventory-item-list-{{type}} {{#ifCond ../data.storeInfos 'includes' (concat 'inventory-item-list-' type)}}toggle-hidden{{/ifCond}}">
|
<ul class="item-list inventory-item-list-{{type}} {{#ifCond ../data.storeInfos 'includes' (concat 'inventory-item-list-' type)}}toggle-hidden{{/ifCond}}">
|
||||||
{{#each cat as |item id|}}
|
{{#each cat as |item id|}}
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id editable=../../options.editable soft_locked=../../data.data.soft_locked}}
|
{{> 'systems/l5r5e/templates/items/item/item-entry.html' item=item id=id editable=../../options.editable soft_locked=../../data.system.soft_locked}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@@ -7,9 +7,9 @@
|
|||||||
<li data-item-id="{{peculiarity.id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
<li data-item-id="{{peculiarity.id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</ul>
|
</ul>
|
||||||
{{#if peculiarity.data.data.types}}
|
{{#if peculiarity.system.types}}
|
||||||
<ul class="item-properties">
|
<ul class="item-properties">
|
||||||
<li>{{peculiarity.data.data.types}}</li>
|
<li>{{peculiarity.system.types}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
@@ -7,39 +7,39 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{!-- Attributes Tab --}}
|
{{!-- Attributes Tab --}}
|
||||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
<select name="data.ring">
|
<select name="system.ring">
|
||||||
{{#select data.data.ring}}
|
{{#select data.system.ring}}
|
||||||
{{#each data.ringsList as |obj|}}
|
{{#each data.ringsList as |obj|}}
|
||||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<select class="attribute" name="data.peculiarity_type">
|
<select class="attribute" name="system.peculiarity_type">
|
||||||
{{#select data.data.peculiarity_type}}
|
{{#select data.system.peculiarity_type}}
|
||||||
{{#each data.subTypesList as |type|}}
|
{{#each data.subTypesList as |type|}}
|
||||||
<option value="{{type.id}}">{{type.label}}</option>
|
<option value="{{type.id}}">{{type.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<label class="cursus attribute-value checkbox">
|
<label class="cursus attribute-value checkbox">
|
||||||
<input type="checkbox" name="data.in_curriculum" {{checked data.data.in_curriculum}} />
|
<input type="checkbox" name="system.in_curriculum" {{checked data.system.in_curriculum}} />
|
||||||
{{localize 'l5r5e.advancements.curriculum'}}
|
{{localize 'l5r5e.advancements.curriculum'}}
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0" />
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0" />
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank' }}
|
{{localize 'l5r5e.sheets.rank' }}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0" />
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0" />
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0" />
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0" />
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute full">
|
<label class="attribute full">
|
||||||
{{localize 'l5r5e.sheets.types' }}
|
{{localize 'l5r5e.sheets.types' }}
|
||||||
<input type="text" name="data.types" value="{{data.data.types}}" />
|
<input type="text" name="system.types" value="{{data.system.types}}" />
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.data.ring}}
|
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.system.ring}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{localize (localize 'l5r5e.peculiarities.types.{type}' type=data.data.peculiarity_type)}}
|
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{localize (localize 'l5r5e.peculiarities.types.{type}' type=data.system.peculiarity_type)}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.data.in_curriculum}}
|
<strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.system.in_curriculum}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}
|
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.data.types}}
|
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.system.types}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
@@ -7,11 +7,11 @@
|
|||||||
{{!--cancelled properties--}}
|
{{!--cancelled properties--}}
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.removed_properties'}}</strong> :
|
<strong>{{localize 'l5r5e.sheets.removed_properties'}}</strong> :
|
||||||
{{#each data.data.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
{{#each data.system.properties as |property idx|}}{{#ifCond idx '>' 0}}, {{/ifCond}}{{property.name}}{{/each}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,19 +9,19 @@
|
|||||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.cost'}}
|
{{localize 'l5r5e.advancements.cost'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_cost" value="{{data.data.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_cost" value="{{data.system.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<div class="{{cssClass}}" data-actor-id="{{actor.data._id}}" data-item-id="{{data._id}}">
|
<div class="{{cssClass}}" data-actor-id="{{actor._id}}" data-item-id="{{data._id}}">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||||
</header>
|
</header>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}
|
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}
|
<strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<li class="item technique flexcol" data-item-id="{{technique._id}}" {{#if technique.data.parent_id.item_id}}data-item-parent-id="{{technique.data.parent_id.item_id}}"{{/if}}>
|
<li class="item technique flexcol" data-item-id="{{technique._id}}" {{#if technique.system.parent_id.item_id}}data-item-parent-id="{{technique.system.parent_id.item_id}}"{{/if}}>
|
||||||
<ul class="item-header technique-controls">
|
<ul class="item-header technique-controls">
|
||||||
<li class="item-img"><img src="{{technique.img}}" title="{{technique.name}}" width="32px" height="32px"/></li>
|
<li class="item-img"><img src="{{technique.img}}" title="{{technique.name}}" width="32px" height="32px"/></li>
|
||||||
<li class="item-name l5r5e-tooltip {{#if technique.data.skill}}dice-picker-tech{{/if}}" data-item-id="{{technique._id}}" {{#if technique.data.parent_id.item_id}}data-item-parent-id="{{technique.data.parent_id.item_id}}"{{/if}}>{{technique.name}}</li>
|
<li class="item-name l5r5e-tooltip {{#if technique.system.skill}}dice-picker-tech{{/if}}" data-item-id="{{technique._id}}" {{#if technique.system.parent_id.item_id}}data-item-parent-id="{{technique.system.parent_id.item_id}}"{{/if}}>{{technique.name}}</li>
|
||||||
{{#if editable}}
|
{{#if editable}}
|
||||||
<li data-item-id="{{technique._id}}" {{#if technique.data.parent_id.item_id}}data-item-parent-id="{{technique.data.parent_id.item_id}}"{{/if}} class="item-control item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
<li data-item-id="{{technique._id}}" {{#if technique.system.parent_id.item_id}}data-item-parent-id="{{technique.system.parent_id.item_id}}"{{/if}} class="item-control item-edit" title="{{localize 'l5r5e.global.edit'}}"><i class="fas fa-edit"></i></li>
|
||||||
{{^if technique.data.parent_id.item_id}}
|
{{^if technique.system.parent_id.item_id}}
|
||||||
<li data-item-id="{{technique._id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
<li data-item-id="{{technique._id}}" class="item-control item-delete" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
@@ -7,48 +7,48 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{!-- Attributes Tab --}}
|
{{!-- Attributes Tab --}}
|
||||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||||
<select name="data.ring">
|
<select name="system.ring">
|
||||||
{{#select data.data.ring}}
|
{{#select data.system.ring}}
|
||||||
{{#each data.ringsList as |obj|}}
|
{{#each data.ringsList as |obj|}}
|
||||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<select name="data.technique_type">
|
<select name="system.technique_type">
|
||||||
{{#select data.data.technique_type}}
|
{{#select data.system.technique_type}}
|
||||||
{{#each data.techniquesList as |obj|}}
|
{{#each data.techniquesList as |obj|}}
|
||||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<label class="cursus attribute-value checkbox">
|
<label class="cursus attribute-value checkbox">
|
||||||
<input type="checkbox" name="data.in_curriculum" {{checked data.data.in_curriculum}} />
|
<input type="checkbox" name="system.in_curriculum" {{checked data.system.in_curriculum}} />
|
||||||
{{localize 'l5r5e.advancements.curriculum'}}
|
{{localize 'l5r5e.advancements.curriculum'}}
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.cost'}}
|
{{localize 'l5r5e.advancements.cost'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_cost" value="{{data.data.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_cost" value="{{data.system.xp_cost}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.advancements.spent'}}
|
{{localize 'l5r5e.advancements.spent'}}
|
||||||
<input class="select-on-focus" type="number" name="data.xp_used" value="{{data.data.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.xp_used" value="{{data.system.xp_used}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.rank'}}
|
{{localize 'l5r5e.sheets.rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.rank" value="{{data.data.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.rank" value="{{data.system.rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
{{localize 'l5r5e.sheets.bought_at_rank'}}
|
||||||
<input class="select-on-focus" type="number" name="data.bought_at_rank" value="{{data.data.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
<input class="select-on-focus" type="number" name="system.bought_at_rank" value="{{data.system.bought_at_rank}}" data-dtype="Number" min="0" placeholder="0"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.skills.title'}}
|
{{localize 'l5r5e.skills.title'}}
|
||||||
<input class="select-on-focus" type="text" name="data.skill" value="{{data.data.skill}}" data-dtype="String"/>
|
<input class="select-on-focus" type="text" name="system.skill" value="{{data.system.skill}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute">
|
<label class="attribute">
|
||||||
{{localize 'l5r5e.dice.dicepicker.difficulty_title'}}
|
{{localize 'l5r5e.dice.dicepicker.difficulty_title'}}
|
||||||
<input class="select-on-focus" type="text" name="data.difficulty" value="{{data.data.difficulty}}" data-dtype="String"/>
|
<input class="select-on-focus" type="text" name="system.difficulty" value="{{data.system.difficulty}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
</article>
|
</article>
|
||||||
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
{{> 'systems/l5r5e/templates/items/item/item-infos.html'}}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user