Working on Compatibility for FVTT v10
This commit is contained in:
@@ -17,6 +17,7 @@ module.exports = {
|
||||
"import/extensions": "off",
|
||||
"class-methods-use-this": "off",
|
||||
// Personal Preference
|
||||
// "operator-linebreak": ["error", "before"], // prettier bug
|
||||
"linebreak-style": "off",
|
||||
"no-mixed-operators": "off",
|
||||
"no-param-reassign": "off",
|
||||
@@ -419,7 +420,7 @@ module.exports = {
|
||||
filterObject: "readonly",
|
||||
flattenObject: "readonly",
|
||||
expandObject: "readonly",
|
||||
isObjectEmpty: "readonly",
|
||||
isEmpty: "readonly",
|
||||
mergeObject: "readonly",
|
||||
diffObject: "readonly",
|
||||
hasProperty: "readonly",
|
||||
@@ -438,6 +439,7 @@ module.exports = {
|
||||
saveDataToFile: "readonly",
|
||||
readTextFromFile: "readonly",
|
||||
fromUuid: "readonly",
|
||||
fromUuidSync: "readonly",
|
||||
_handleMouseWheelInputChange: "readonly",
|
||||
getTemplate: "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`)" :
|
||||
- `@` fixed, trigger the parser
|
||||
- `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.
|
||||
- `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`.
|
||||
|
||||
@@ -16,12 +16,12 @@ export class ActorL5r5e extends Actor {
|
||||
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`;
|
||||
}
|
||||
|
||||
// Some tweak on actors token
|
||||
data.token = data.token || {};
|
||||
// Some tweak on actors prototypeToken
|
||||
data.prototypeToken = data.prototypeToken || {};
|
||||
switch (data.type) {
|
||||
case "character":
|
||||
foundry.utils.mergeObject(
|
||||
data.token,
|
||||
data.prototypeToken,
|
||||
{
|
||||
// vision: true,
|
||||
// dimSight: 30,
|
||||
@@ -41,7 +41,7 @@ export class ActorL5r5e extends Actor {
|
||||
|
||||
case "npc":
|
||||
foundry.utils.mergeObject(
|
||||
data.token,
|
||||
data.prototypeToken,
|
||||
{
|
||||
actorLink: true,
|
||||
disposition: 0, // neutral
|
||||
@@ -58,7 +58,7 @@ export class ActorL5r5e extends Actor {
|
||||
|
||||
case "army":
|
||||
foundry.utils.mergeObject(
|
||||
data.token,
|
||||
data.prototypeToken,
|
||||
{
|
||||
actorLink: true,
|
||||
disposition: 0, // neutral
|
||||
@@ -94,22 +94,25 @@ export class ActorL5r5e extends Actor {
|
||||
context.pack = this.pack;
|
||||
|
||||
// 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) {
|
||||
data["token.actorLink"] = data["data.type"] === "adversary";
|
||||
if (!!data["system.type"] && this.type === "npc" && data["system.type"] !== this.system.type) {
|
||||
data["prototypeToken.actorLink"] = data["system.type"] === "adversary";
|
||||
}
|
||||
|
||||
// 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
|
||||
// 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 (
|
||||
data[fieldName] &&
|
||||
!data["token." + fieldName] &&
|
||||
this.data[fieldName] === this.data.token[fieldName] &&
|
||||
this.data[fieldName] !== data[fieldName]
|
||||
data[dataProp] &&
|
||||
!data["prototypeToken." + TknProp] &&
|
||||
this[dataProp] === foundry.utils.getProperty(this.prototypeToken, TknProp) &&
|
||||
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();
|
||||
|
||||
if (this.isCharacter) {
|
||||
const data = this.data.data;
|
||||
const system = this.system;
|
||||
|
||||
// No automation for npc as they cheat in stats
|
||||
if (this.data.type === "character") {
|
||||
ActorL5r5e.computeDerivedAttributes(data);
|
||||
if (this.type === "character") {
|
||||
ActorL5r5e.computeDerivedAttributes(system);
|
||||
}
|
||||
|
||||
// Attributes bars
|
||||
data.fatigue.max = data.endurance;
|
||||
data.strife.max = data.composure;
|
||||
data.void_points.max = data.rings.void;
|
||||
system.fatigue.max = system.endurance;
|
||||
system.strife.max = system.composure;
|
||||
system.void_points.max = system.rings.void;
|
||||
|
||||
// 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
|
||||
if (data.void_points.value > data.void_points.max) {
|
||||
data.void_points.value = data.void_points.max;
|
||||
if (system.void_points.value > system.void_points.max) {
|
||||
system.void_points.value = system.void_points.max;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set derived attributes (endurance, composure, focus, vigilance) from rings values
|
||||
* @param {Object} system
|
||||
*/
|
||||
static computeDerivedAttributes(data) {
|
||||
data.endurance = (Number(data.rings.earth) + Number(data.rings.fire)) * 2;
|
||||
data.composure = (Number(data.rings.earth) + Number(data.rings.water)) * 2;
|
||||
data.focus = Number(data.rings.air) + Number(data.rings.fire);
|
||||
data.vigilance = Math.ceil((Number(data.rings.air) + Number(data.rings.water)) / 2);
|
||||
static computeDerivedAttributes(system) {
|
||||
system.endurance = (Number(system.rings.earth) + Number(system.rings.fire)) * 2;
|
||||
system.composure = (Number(system.rings.earth) + Number(system.rings.water)) * 2;
|
||||
system.focus = Number(system.rings.air) + Number(system.rings.fire);
|
||||
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) {
|
||||
if (item && item.type === "advancement") {
|
||||
const actor = foundry.utils.duplicate(this.data.data);
|
||||
const itemData = item.data.data;
|
||||
const actor = foundry.utils.duplicate(this.system);
|
||||
const itemData = item.system;
|
||||
if (itemData.advancement_type === "ring") {
|
||||
// Ring
|
||||
if (isAdd) {
|
||||
@@ -216,7 +220,7 @@ export class ActorL5r5e extends Actor {
|
||||
|
||||
// Update Actor
|
||||
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>}
|
||||
*/
|
||||
async renderTextTemplate() {
|
||||
const data = (await this.sheet?.getData()) || this;
|
||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, data);
|
||||
const sheetData = (await this.sheet?.getData()) || this;
|
||||
const tpl = await renderTemplate(`${CONFIG.l5r5e.paths.templates}actors/actor-text.html`, sheetData);
|
||||
if (!tpl) {
|
||||
return null;
|
||||
}
|
||||
@@ -239,7 +243,7 @@ export class ActorL5r5e extends Actor {
|
||||
* @return {boolean}
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
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
|
||||
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") {
|
||||
isPrepared = this.data.data.prepared ? "true" : "false";
|
||||
isPrepared = this.system.prepared ? "true" : "false";
|
||||
}
|
||||
|
||||
return isPrepared;
|
||||
@@ -298,7 +302,7 @@ export class ActorL5r5e extends Actor {
|
||||
if (!this.isCharacter) {
|
||||
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) {
|
||||
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) {
|
||||
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
|
||||
*/
|
||||
_initialize() {
|
||||
const data = this.object.data.data;
|
||||
const data = this.object.system;
|
||||
|
||||
// update linked actor datas
|
||||
if (data.commander_actor_id) {
|
||||
@@ -79,10 +79,13 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
activateEditor(name, options = {}, initialContent = "") {
|
||||
// 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);
|
||||
}
|
||||
super.activateEditor(name, options, initialContent);
|
||||
return super.activateEditor(name, options, initialContent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,7 +103,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
// Casualties/Panic +/-
|
||||
html.find(".addsub-control").on("click", this._modifyCasualtiesOrPanic.bind(this));
|
||||
|
||||
if (this.actor.data.data.soft_locked) {
|
||||
if (this.actor.system.soft_locked) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -109,12 +112,19 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
getData(options = {}) {
|
||||
const sheetData = super.getData(options);
|
||||
async getData(options = {}) {
|
||||
const sheetData = await super.getData(options);
|
||||
|
||||
// Split Items by types
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -143,15 +153,15 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
async _onDrop(event) {
|
||||
// *** 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;
|
||||
}
|
||||
|
||||
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...
|
||||
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;
|
||||
}
|
||||
@@ -162,7 +172,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
return;
|
||||
}
|
||||
|
||||
let itemData = item.data.toObject(true);
|
||||
let itemData = item.toObject(true);
|
||||
|
||||
// Finally, create the embed
|
||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||
@@ -175,7 +185,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
async _onDropActors(type, event) {
|
||||
// *** 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;
|
||||
}
|
||||
|
||||
@@ -211,7 +221,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
async _updateLinkedActorData(type, actor, isInit = false) {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -219,26 +229,26 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
const actorData = {};
|
||||
switch (type) {
|
||||
case "commander":
|
||||
actorData["data.commander"] = actor.data.name;
|
||||
actorData["data.commander_actor_id"] = actor.data._id;
|
||||
actorData["data.commander_standing.honor"] = actor.data.data.social.honor;
|
||||
actorData["data.commander_standing.glory"] = actor.data.data.social.glory;
|
||||
actorData["data.commander_standing.status"] = actor.data.data.social.status;
|
||||
actorData["system.commander"] = actor.name;
|
||||
actorData["system.commander_actor_id"] = actor._id;
|
||||
actorData["system.commander_standing.honor"] = actor.system.social.honor;
|
||||
actorData["system.commander_standing.glory"] = actor.system.social.glory;
|
||||
actorData["system.commander_standing.status"] = actor.system.social.status;
|
||||
|
||||
// Replace the image by commander's image
|
||||
if (
|
||||
!isInit &&
|
||||
this.actor.data.img !== actor.data.img &&
|
||||
![`${actorPath}character.svg`, `${actorPath}npc.svg`].includes(actor.data.img)
|
||||
this.actor.img !== actor.img &&
|
||||
![`${actorPath}character.svg`, `${actorPath}npc.svg`].includes(actor.img)
|
||||
) {
|
||||
actorData["img"] = actor.data.img;
|
||||
actorData["token.img"] = actor.data.token.img;
|
||||
actorData["img"] = actor.img;
|
||||
actorData["prototypeToken.texture.src"] = actor.prototypeToken.texture.src;
|
||||
}
|
||||
break;
|
||||
|
||||
case "warlord":
|
||||
actorData["data.warlord"] = actor.data.name;
|
||||
actorData["data.warlord_actor_id"] = actor.data._id;
|
||||
actorData["system.warlord"] = actor.name;
|
||||
actorData["system.warlord_actor_id"] = actor._id;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -269,7 +279,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
console.warn("L5R5E | Unknown type", type);
|
||||
return;
|
||||
}
|
||||
return this.actor.update({ data: actorData });
|
||||
return this.actor.update({ system: actorData });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,13 +300,10 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
switch (type) {
|
||||
case "casualties":
|
||||
await this.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
battle_readiness: {
|
||||
casualties_strength: {
|
||||
value: Math.max(
|
||||
0,
|
||||
this.actor.data.data.battle_readiness.casualties_strength.value + mod
|
||||
),
|
||||
value: Math.max(0, this.actor.system.battle_readiness.casualties_strength.value + mod),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -305,10 +312,10 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
|
||||
case "panic":
|
||||
await this.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
battle_readiness: {
|
||||
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 */
|
||||
getData(options = {}) {
|
||||
const sheetData = super.getData(options);
|
||||
async getData(options = {}) {
|
||||
const sheetData = await super.getData(options);
|
||||
|
||||
sheetData.data.stances = CONFIG.l5r5e.stances;
|
||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ displayInTypes: true });
|
||||
@@ -58,31 +58,31 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
sheetData.items.forEach((item) => {
|
||||
switch (item.type) {
|
||||
case "technique":
|
||||
if (!out[item.data.technique_type]) {
|
||||
if (!out[item.system.technique_type]) {
|
||||
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;
|
||||
|
||||
case "title":
|
||||
// Embed technique in titles
|
||||
Array.from(item.data.items).forEach(([id, embedItem]) => {
|
||||
if (embedItem.data.type === "technique") {
|
||||
if (!out[embedItem.data.data.technique_type]) {
|
||||
Array.from(item.system.items).forEach(([id, embedItem]) => {
|
||||
if (embedItem.type === "technique") {
|
||||
if (!out[embedItem.system.technique_type]) {
|
||||
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 (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);
|
||||
}
|
||||
break;
|
||||
@@ -91,17 +91,17 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
|
||||
// Remove unused techs
|
||||
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];
|
||||
}
|
||||
});
|
||||
|
||||
// Manage school add button
|
||||
sheetData.data.data.techniques["school_ability"] = out["school_ability"].length === 0;
|
||||
sheetData.data.data.techniques["mastery_ability"] = out["mastery_ability"].length === 0;
|
||||
sheetData.data.system.techniques["school_ability"] = out["school_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
|
||||
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"];
|
||||
}
|
||||
|
||||
@@ -134,56 +134,59 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
*/
|
||||
async _onDrop(event) {
|
||||
// *** 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;
|
||||
}
|
||||
|
||||
// Check item type and subtype
|
||||
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;
|
||||
}
|
||||
|
||||
// Specific curriculum journal drop
|
||||
if (item.documentName === "JournalEntry") {
|
||||
// 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;
|
||||
}
|
||||
this.actor.data.data.identity.school_curriculum_journal = {
|
||||
id: item.data._id,
|
||||
name: item.data.name,
|
||||
this.actor.system.identity.school_curriculum_journal = {
|
||||
id: item._id,
|
||||
name: item.name,
|
||||
pack: item.pack || null,
|
||||
};
|
||||
await this.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
identity: {
|
||||
school_curriculum_journal: this.actor.data.data.identity.school_curriculum_journal,
|
||||
school_curriculum_journal: this.actor.system.identity.school_curriculum_journal,
|
||||
},
|
||||
},
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Dropped a item with same "id" as one owned
|
||||
if (this.actor.data.items) {
|
||||
// Dropped an item with same "id" as one owned
|
||||
if (this.actor.items) {
|
||||
// Exit if we already owned exactly this id (drag a personal item on our own sheet)
|
||||
if (
|
||||
this.actor.data.items.some((embedItem) => {
|
||||
this.actor.items.some((embedItem) => {
|
||||
// Search in children
|
||||
if (embedItem.items instanceof Map && embedItem.items.has(item.data._id)) {
|
||||
return true;
|
||||
}
|
||||
return embedItem.data._id === item.data._id;
|
||||
return embedItem._id === item._id;
|
||||
})
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add quantity instead if they have (id is different so use type and name)
|
||||
if (item.data.data.quantity) {
|
||||
const tmpItem = this.actor.data.items.find(
|
||||
(embedItem) => embedItem.name === item.data.name && embedItem.type === item.data.type
|
||||
if (item.system.quantity) {
|
||||
const tmpItem = this.actor.items.find(
|
||||
(embedItem) => embedItem.name === item.name && embedItem.type === item.type
|
||||
);
|
||||
if (tmpItem && this._modifyQuantity(tmpItem.id, 1)) {
|
||||
return;
|
||||
@@ -197,13 +200,13 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
return;
|
||||
}
|
||||
|
||||
let itemData = item.data.toObject(true);
|
||||
let itemData = item.toObject(true);
|
||||
|
||||
// Item subtype specific
|
||||
switch (itemData.type) {
|
||||
case "army_cohort":
|
||||
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;
|
||||
|
||||
case "advancement":
|
||||
@@ -216,24 +219,22 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
await item.generateNewIdsForAllEmbedItems();
|
||||
|
||||
// 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") {
|
||||
await this.actor.addBonus(embedItem);
|
||||
}
|
||||
}
|
||||
|
||||
// refresh data
|
||||
itemData = item.data.toObject(true);
|
||||
itemData = item.toObject(true);
|
||||
break;
|
||||
|
||||
case "technique":
|
||||
// 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 (
|
||||
Array.from(this.actor.items).some((e) => {
|
||||
return (
|
||||
e.type === "technique" && e.data.data.technique_type === itemData.data.technique_type
|
||||
);
|
||||
return e.type === "technique" && e.system.technique_type === itemData.system.technique_type;
|
||||
})
|
||||
) {
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.only_one"));
|
||||
@@ -241,27 +242,27 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
}
|
||||
|
||||
// No cost for schools
|
||||
itemData.data.xp_cost = 0;
|
||||
itemData.data.xp_used = 0;
|
||||
itemData.data.in_curriculum = true;
|
||||
itemData.system.xp_cost = 0;
|
||||
itemData.system.xp_used = 0;
|
||||
itemData.system.in_curriculum = true;
|
||||
} else {
|
||||
// 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"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify cost
|
||||
itemData.data.xp_cost =
|
||||
itemData.data.xp_cost > 0 ? itemData.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||
itemData.data.xp_used = itemData.data.xp_cost;
|
||||
itemData.system.xp_cost =
|
||||
itemData.system.xp_cost > 0 ? itemData.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||
itemData.system.xp_used = itemData.system.xp_cost;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Modify the bought at rank to the current actor rank
|
||||
if (itemData.data.bought_at_rank !== undefined && this.actor.data.data.identity?.school_rank) {
|
||||
itemData.data.bought_at_rank = this.actor.data.data.identity.school_rank;
|
||||
if (itemData.system.bought_at_rank !== undefined && this.actor.system.identity?.school_rank) {
|
||||
itemData.system.bought_at_rank = this.actor.system.identity.school_rank;
|
||||
}
|
||||
|
||||
// Finally create the embed
|
||||
@@ -332,10 +333,10 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
this.actor.data.data.prepared = !this.actor.data.data.prepared;
|
||||
this.actor.system.prepared = !this.actor.system.prepared;
|
||||
this.actor.update({
|
||||
data: {
|
||||
prepared: this.actor.data.data.prepared,
|
||||
system: {
|
||||
prepared: this.actor.system.prepared,
|
||||
},
|
||||
});
|
||||
this.render(false);
|
||||
@@ -367,26 +368,26 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
const item = this.actor.items.get(created[0].id);
|
||||
|
||||
// Assign current school rank to the new adv/tech
|
||||
if (this.actor.data.data.identity?.school_rank) {
|
||||
item.data.data.bought_at_rank = this.actor.data.data.identity.school_rank;
|
||||
if (["advancement", "technique"].includes(item.data.type)) {
|
||||
item.data.data.rank = this.actor.data.data.identity.school_rank;
|
||||
if (this.actor.system.identity?.school_rank) {
|
||||
item.system.bought_at_rank = this.actor.system.identity.school_rank;
|
||||
if (["advancement", "technique"].includes(item.type)) {
|
||||
item.system.rank = this.actor.system.identity.school_rank;
|
||||
}
|
||||
}
|
||||
|
||||
switch (item.data.type) {
|
||||
switch (item.type) {
|
||||
case "item": // no break
|
||||
case "armor": // no break
|
||||
case "weapon":
|
||||
item.data.data.equipped = isEquipped;
|
||||
item.system.equipped = isEquipped;
|
||||
break;
|
||||
|
||||
case "technique": {
|
||||
// If technique, select the current sub-type
|
||||
if (CONFIG.l5r5e.techniques.get(techniqueType)) {
|
||||
item.data.name = game.i18n.localize(`l5r5e.techniques.${techniqueType}`);
|
||||
item.data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`;
|
||||
item.data.data.technique_type = techniqueType;
|
||||
item.name = game.i18n.localize(`l5r5e.techniques.${techniqueType}`);
|
||||
item.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`;
|
||||
item.system.technique_type = techniqueType;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -496,8 +497,8 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
const item = this.actor.items.get(itemId);
|
||||
if (item.type !== "item") {
|
||||
item.update({
|
||||
data: {
|
||||
in_curriculum: !item.data.data.in_curriculum,
|
||||
system: {
|
||||
in_curriculum: !item.system.in_curriculum,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -510,10 +511,10 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
_modifyQuantity(itemId, add) {
|
||||
const tmpItem = this.actor.items.get(itemId);
|
||||
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({
|
||||
data: {
|
||||
quantity: tmpItem.data.data.quantity,
|
||||
system: {
|
||||
quantity: tmpItem.system.quantity,
|
||||
},
|
||||
});
|
||||
return true;
|
||||
@@ -539,9 +540,9 @@ export class BaseCharacterSheetL5r5e extends BaseSheetL5r5e {
|
||||
switch (type) {
|
||||
case "fatigue":
|
||||
await this.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
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":
|
||||
await this.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
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 tmpItem = this.actor.items.get(itemId);
|
||||
if (!tmpItem || tmpItem.data.data[type] === undefined) {
|
||||
if (!tmpItem || tmpItem.system[type] === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
tmpItem.data.data[type] = !tmpItem.data.data[type];
|
||||
tmpItem.system[type] = !tmpItem.system[type];
|
||||
const data = {
|
||||
equipped: tmpItem.data.data.equipped,
|
||||
equipped: tmpItem.system.equipped,
|
||||
};
|
||||
// Only weapons
|
||||
if (tmpItem.data.data.readied !== undefined) {
|
||||
data.readied = tmpItem.data.data.readied;
|
||||
if (tmpItem.system.readied !== undefined) {
|
||||
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) {
|
||||
// Lock/Unlock
|
||||
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",
|
||||
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: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"lock-" + this.object.id,
|
||||
() => {
|
||||
this.actor.update({
|
||||
data: {
|
||||
soft_locked: !this.actor.data.data.soft_locked,
|
||||
system: {
|
||||
soft_locked: !this.actor.system.soft_locked,
|
||||
},
|
||||
});
|
||||
},
|
||||
@@ -66,8 +66,8 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
getData(options = {}) {
|
||||
const sheetData = super.getData(options);
|
||||
async getData(options = {}) {
|
||||
const sheetData = await super.getData(options);
|
||||
|
||||
// System Header Buttons
|
||||
sheetData.l5rHeaderButtons = this._getL5rHeaderButtons();
|
||||
@@ -79,8 +79,14 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
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
|
||||
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;
|
||||
}
|
||||
@@ -105,10 +111,10 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
*/
|
||||
activateEditor(name, options = {}, initialContent = "") {
|
||||
// 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);
|
||||
}
|
||||
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
|
||||
*/
|
||||
initializeFromActor() {
|
||||
const actorDatas = this.actor.data.data;
|
||||
const actorDatas = this.actor.system;
|
||||
|
||||
// Identity
|
||||
this.object.clan = actorDatas.identity.clan || "random";
|
||||
@@ -97,7 +97,7 @@ export class CharacterGeneratorDialog extends FormApplication {
|
||||
label: game.i18n.localize("l5r5e.clans." + e),
|
||||
}));
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
isNpc: this.actor.type === "npc",
|
||||
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
|
||||
genderList: [
|
||||
|
||||
@@ -291,7 +291,7 @@ export class CharacterGenerator {
|
||||
narrative: true,
|
||||
}
|
||||
) {
|
||||
const actorDatas = actor.data.data;
|
||||
const actorDatas = actor.system;
|
||||
const isNpc = actor.type === "npc";
|
||||
|
||||
// Need to set some required values
|
||||
@@ -304,7 +304,7 @@ export class CharacterGenerator {
|
||||
actorDatas.identity.female = this.isFemale;
|
||||
|
||||
// Name
|
||||
let newName = actor.data.name;
|
||||
let newName = actor.name;
|
||||
if (generate.name) {
|
||||
newName =
|
||||
this.data.family +
|
||||
@@ -325,9 +325,9 @@ export class CharacterGenerator {
|
||||
`${folder}/npc.svg`,
|
||||
`${folder}/traditional-japanese-man.svg`,
|
||||
`${folder}/traditional-japanese-woman.svg`,
|
||||
].includes(actor.data.img)
|
||||
].includes(actor.img)
|
||||
? `${folder}/traditional-japanese-${this.isFemale ? "woman" : "man"}.svg`
|
||||
: actor.data.img;
|
||||
: actor.img;
|
||||
|
||||
// Generate attributes & Social Standing
|
||||
if (generate.attributes) {
|
||||
@@ -453,7 +453,7 @@ export class CharacterGenerator {
|
||||
*/
|
||||
async _generatePeculiarities(actor, newItemsData) {
|
||||
// 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) {
|
||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||
}
|
||||
@@ -476,7 +476,7 @@ export class CharacterGenerator {
|
||||
*/
|
||||
async _generateItems(actor, newItemsData) {
|
||||
// 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) {
|
||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||
}
|
||||
@@ -521,7 +521,7 @@ export class CharacterGenerator {
|
||||
*/
|
||||
async _generateTechniques(actor, newItemsData) {
|
||||
// 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) {
|
||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||
}
|
||||
@@ -598,7 +598,7 @@ export class CharacterGenerator {
|
||||
const cfg = techCfg[pack];
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
@@ -613,9 +613,10 @@ export class CharacterGenerator {
|
||||
let item;
|
||||
do {
|
||||
item = await CharacterGenerator._getItemFromPack(`l5r5e.core-techniques-${pack}`);
|
||||
} while (item && item.data.data.rank > avgrv);
|
||||
} while (item && item.system.rank > avgrv);
|
||||
|
||||
if (item) {
|
||||
console.log(item); //todo tmp check this!
|
||||
newItemsData.push(foundry.utils.duplicate(item.data));
|
||||
}
|
||||
} // fr qty
|
||||
|
||||
@@ -41,14 +41,14 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
/**
|
||||
* Commons datas
|
||||
*/
|
||||
getData(options = {}) {
|
||||
const sheetData = super.getData(options);
|
||||
async getData(options = {}) {
|
||||
const sheetData = await super.getData(options);
|
||||
|
||||
// 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
|
||||
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
|
||||
this._prepareSchoolAdvancement(sheetData);
|
||||
@@ -57,8 +57,8 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
this._prepareOthersAdvancement(sheetData);
|
||||
|
||||
// Total
|
||||
sheetData.data.data.xp_saved = Math.floor(
|
||||
parseInt(sheetData.data.data.xp_total) - parseInt(sheetData.data.data.xp_spent)
|
||||
sheetData.data.system.xp_saved = Math.floor(
|
||||
parseInt(sheetData.data.system.xp_total) - parseInt(sheetData.data.system.xp_spent)
|
||||
);
|
||||
|
||||
return sheetData;
|
||||
@@ -87,7 +87,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
"data.identity.family",
|
||||
CONFIG.l5r5e.families.get(
|
||||
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]
|
||||
)
|
||||
);
|
||||
@@ -118,7 +118,7 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
// TODO class "Active" Bug on load, dunno why :/
|
||||
this._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) {
|
||||
const adv = [];
|
||||
sheetData.data.data.xp_spent = 0;
|
||||
sheetData.data.system.xp_spent = 0;
|
||||
sheetData.items
|
||||
.filter((item) => ["peculiarity", "technique", "advancement"].includes(item.type))
|
||||
.forEach((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]) {
|
||||
adv[rank] = {
|
||||
rank: rank,
|
||||
@@ -162,16 +162,16 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
);
|
||||
|
||||
// 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
|
||||
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
|
||||
);
|
||||
|
||||
// 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) {
|
||||
// Clan tag trim if autocomplete in school name
|
||||
if (
|
||||
formData["autoCompleteListName"] === "data.identity.school" &&
|
||||
formData["autoCompleteListName"] === "system.identity.school" &&
|
||||
formData["autoCompleteListSelectedIndex"] >= 0 &&
|
||||
!!formData["data.identity.clan"] &&
|
||||
formData["data.identity.school"].indexOf(` [${formData["data.identity.clan"]}]`) !== -1
|
||||
!!formData["system.identity.clan"] &&
|
||||
formData["system.identity.school"].indexOf(` [${formData["system.identity.clan"]}]`) !== -1
|
||||
) {
|
||||
formData["data.identity.school"] = formData["data.identity.school"].replace(
|
||||
` [${formData["data.identity.clan"]}]`,
|
||||
formData["system.identity.school"] = formData["system.identity.school"].replace(
|
||||
` [${formData["system.identity.clan"]}]`,
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
// Store money in Zeni
|
||||
if (formData["data.money.koku"] || formData["data.money.bu"] || formData["data.money.zeni"]) {
|
||||
formData["data.zeni"] = this._moneyToZeni(
|
||||
formData["data.money.koku"] || 0,
|
||||
formData["data.money.bu"] || 0,
|
||||
formData["data.money.zeni"] || 0
|
||||
if (formData["system.money.koku"] || formData["system.money.bu"] || formData["system.money.zeni"]) {
|
||||
formData["system.zeni"] = this._moneyToZeni(
|
||||
formData["system.money.koku"] || 0,
|
||||
formData["system.money.bu"] || 0,
|
||||
formData["system.money.zeni"] || 0
|
||||
);
|
||||
// Remove fake money object
|
||||
delete formData["data.money.koku"];
|
||||
delete formData["data.money.bu"];
|
||||
delete formData["data.money.zeni"];
|
||||
delete formData["system.money.koku"];
|
||||
delete formData["system.money.bu"];
|
||||
delete formData["system.money.zeni"];
|
||||
}
|
||||
|
||||
// Save computed values
|
||||
const currentData = this.object.data.data;
|
||||
formData["data.focus"] = currentData.focus;
|
||||
formData["data.vigilance"] = currentData.vigilance;
|
||||
formData["data.endurance"] = currentData.endurance;
|
||||
formData["data.composure"] = currentData.composure;
|
||||
formData["data.fatigue.max"] = currentData.fatigue.max;
|
||||
formData["data.strife.max"] = currentData.strife.max;
|
||||
formData["data.void_points.max"] = currentData.void_points.max;
|
||||
const currentData = this.object.system;
|
||||
formData["system.focus"] = currentData.focus;
|
||||
formData["system.vigilance"] = currentData.vigilance;
|
||||
formData["system.endurance"] = currentData.endurance;
|
||||
formData["system.composure"] = currentData.composure;
|
||||
formData["system.fatigue.max"] = currentData.fatigue.max;
|
||||
formData["system.strife.max"] = currentData.strife.max;
|
||||
formData["system.void_points.max"] = currentData.void_points.max;
|
||||
|
||||
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]);
|
||||
}
|
||||
|
||||
this.actor.data.data.zeni = +this.actor.data.data.zeni + mod;
|
||||
this.actor.system.zeni = +this.actor.system.zeni + mod;
|
||||
this.actor.update({
|
||||
data: {
|
||||
zeni: this.actor.data.data.zeni,
|
||||
system: {
|
||||
zeni: this.actor.system.zeni,
|
||||
},
|
||||
});
|
||||
this.render(false);
|
||||
@@ -294,11 +294,11 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
event.preventDefault();
|
||||
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({
|
||||
data: {
|
||||
system: {
|
||||
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.stopPropagation();
|
||||
|
||||
const actorJournal = this.actor.data.data.identity.school_curriculum_journal;
|
||||
const actorJournal = this.actor.system.identity.school_curriculum_journal;
|
||||
if (!actorJournal.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
*/
|
||||
_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;
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
getData(options = {}) {
|
||||
const sheetData = super.getData();
|
||||
async getData(options = {}) {
|
||||
const sheetData = await super.getData();
|
||||
|
||||
// NPC Subtypes
|
||||
sheetData.data.data.types = NpcSheetL5r5e.types.map((e) => ({
|
||||
sheetData.data.types = NpcSheetL5r5e.types.map((e) => ({
|
||||
id: 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 skillsListStep17 = this._getSkillZero(skillsList, skillsPoints, "step17.skill");
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(),
|
||||
skillsList,
|
||||
skillsListStep7,
|
||||
@@ -260,20 +260,20 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
// Get item
|
||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
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;
|
||||
}
|
||||
|
||||
// Specific step18_heritage, all item/tech allowed
|
||||
if (stepKey === "step18.heritage_item") {
|
||||
type = item.data.type;
|
||||
type = item.type;
|
||||
}
|
||||
|
||||
if (
|
||||
(type !== "item" && item.data.type !== type) ||
|
||||
(type === "item" && !["item", "weapon", "armor"].includes(item.data.type))
|
||||
(type !== "item" && item.type !== 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;
|
||||
}
|
||||
|
||||
@@ -284,13 +284,13 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
case "technique":
|
||||
// School Ability
|
||||
if (stepKey === "step3.school_ability") {
|
||||
if (item.data.data.technique_type !== "school_ability") {
|
||||
if (item.system.technique_type !== "school_ability") {
|
||||
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;
|
||||
}
|
||||
} 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
|
||||
ui.notifications.info(game.i18n.localize("l5r5e.techniques.not_allowed"));
|
||||
return;
|
||||
@@ -300,38 +300,38 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
case "peculiarity":
|
||||
switch (stepKey) {
|
||||
case "step9.distinction":
|
||||
if (item.data.data.peculiarity_type !== "distinction") {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (item.system.peculiarity_type !== "distinction") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step10.adversity":
|
||||
if (item.data.data.peculiarity_type !== "adversity") {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (item.system.peculiarity_type !== "adversity") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step11.passion":
|
||||
if (item.data.data.peculiarity_type !== "passion") {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (item.system.peculiarity_type !== "passion") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step12.anxiety":
|
||||
if (item.data.data.peculiarity_type !== "anxiety") {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (item.system.peculiarity_type !== "anxiety") {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step13.advantage":
|
||||
if (!["distinction", "passion"].includes(item.data.data.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (!["distinction", "passion"].includes(item.system.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "step13.disadvantage":
|
||||
if (!["adversity", "anxiety"].includes(item.data.data.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.data.data.peculiarity_type);
|
||||
if (!["adversity", "anxiety"].includes(item.system.peculiarity_type)) {
|
||||
console.warn("L5R5E | Wrong type", item.system.peculiarity_type);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -391,9 +391,9 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
this.summary = this.object.validateForm();
|
||||
|
||||
// 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({
|
||||
data: {
|
||||
system: {
|
||||
template: formData["template"],
|
||||
twenty_questions: this.object.data,
|
||||
},
|
||||
|
||||
@@ -191,10 +191,10 @@ export class TwentyQuestions {
|
||||
* Initialize data from a actor
|
||||
*/
|
||||
fromActor(actor) {
|
||||
const actorDatas = actor.data.data;
|
||||
const actorDatas = actor.system;
|
||||
|
||||
// already 20q struct ?
|
||||
if (!foundry.utils.isObjectEmpty(actorDatas.twenty_questions)) {
|
||||
if (!foundry.utils.isEmpty(actorDatas.twenty_questions)) {
|
||||
this.data = {
|
||||
...this.data,
|
||||
...actorDatas.twenty_questions,
|
||||
@@ -220,14 +220,14 @@ export class TwentyQuestions {
|
||||
this.data.step6.social_ninjo = actorDatas.social.ninjo;
|
||||
this.data.step8.tenet_paramount = actorDatas.social.bushido_tenets.paramount;
|
||||
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
|
||||
*/
|
||||
async toActor(actor, itemsCache) {
|
||||
const actorDatas = actor.data.data;
|
||||
const actorDatas = actor.system;
|
||||
const formData = this.data;
|
||||
|
||||
this.data.generated = true;
|
||||
@@ -304,7 +304,7 @@ export class TwentyQuestions {
|
||||
});
|
||||
|
||||
// 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) {
|
||||
await actor.deleteEmbeddedDocuments("Item", deleteIds);
|
||||
}
|
||||
@@ -330,7 +330,7 @@ export class TwentyQuestions {
|
||||
// Update actor
|
||||
await actor.update({
|
||||
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
|
||||
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
|
||||
const isPc = combatant.actor.data.type === "character";
|
||||
const isPc = combatant.actor.type === "character";
|
||||
const isPrepared = combatant.actor.isPrepared;
|
||||
|
||||
// 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 (a.initiative === b.initiative) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
// if tie again : Character > Adversary > Minion
|
||||
if (a.actor.data.data.social.honor === b.actor.data.data.social.honor) {
|
||||
return (
|
||||
CombatL5r5e._getWeightByActorType(a.actor.data) - CombatL5r5e._getWeightByActorType(b.actor.data)
|
||||
);
|
||||
if (a.actor.system.social.honor === b.actor.system.social.honor) {
|
||||
return CombatL5r5e._getWeightByActorType(a.actor) - CombatL5r5e._getWeightByActorType(b.actor);
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -165,6 +163,6 @@ export class CombatL5r5e extends Combat {
|
||||
* @private
|
||||
*/
|
||||
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;
|
||||
}
|
||||
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) {
|
||||
this.object.targetInfos = targetToken
|
||||
? {
|
||||
img: targetToken.data.img,
|
||||
name: targetToken.data.name,
|
||||
img: targetToken.img,
|
||||
name: targetToken.name,
|
||||
}
|
||||
: null;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
*/
|
||||
set ringId(ringId) {
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
switch (this._actor.data.type) {
|
||||
switch (this._actor.type) {
|
||||
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;
|
||||
break;
|
||||
|
||||
case "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;
|
||||
break;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
* @type {String}
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
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
|
||||
* @return {Object}
|
||||
*/
|
||||
getData(options = null) {
|
||||
async getData(options = null) {
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
ringsList: game.l5r5e.HelpersL5r5e.getRingsList(this._actor),
|
||||
data: this.object,
|
||||
actor: this._actor,
|
||||
@@ -343,7 +343,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
canUseVoidPoint:
|
||||
this.object.difficulty.addVoidPoint ||
|
||||
!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,
|
||||
difficultyHiddenIsLock: this._difficultyHiddenIsLock.gm || this._difficultyHiddenIsLock.option,
|
||||
};
|
||||
@@ -485,7 +485,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
|
||||
// Update 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
|
||||
if (this.object.isInitiativeRoll) {
|
||||
@@ -503,10 +503,10 @@ export class DicePickerDialog extends FormApplication {
|
||||
}
|
||||
|
||||
// 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) {
|
||||
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.difficulty.addVoidPoint &&
|
||||
!!this._actor &&
|
||||
this._actor.data.data.void_points.value < 1
|
||||
this._actor.system.void_points.value < 1
|
||||
) {
|
||||
this.object.useVoidPoint = false;
|
||||
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 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) {
|
||||
macro = await Macro.create({
|
||||
name: name,
|
||||
@@ -631,7 +631,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ export class DicePickerDialog extends FormApplication {
|
||||
return acc;
|
||||
}
|
||||
|
||||
const targetData = targetActor.data.data;
|
||||
const targetData = targetActor.system;
|
||||
const value = targetActor[property] || targetData[property] || null;
|
||||
if (!value) {
|
||||
return acc;
|
||||
@@ -734,8 +734,8 @@ export class DicePickerDialog extends FormApplication {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check in actor.<prop> or actor.data.data.<prop>
|
||||
difficulty = targetActor[infos[2]] || targetActor.data.data[infos[2]] || null;
|
||||
// Check in actor.<prop> or actor.system.<prop>
|
||||
difficulty = targetActor[infos[2]] || targetActor.system[infos[2]] || null;
|
||||
if (difficulty < 1) {
|
||||
console.log("L5R5E | Fail to parse difficulty from target");
|
||||
return false;
|
||||
|
||||
@@ -78,12 +78,20 @@ export class RollnKeepDialog extends FormApplication {
|
||||
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 {boolean}
|
||||
*/
|
||||
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
|
||||
this.roll = game.l5r5e.RollL5r5e.fromData(this._message._roll);
|
||||
this.roll = game.l5r5e.RollL5r5e.fromData(this.messageRoll);
|
||||
|
||||
// Already history
|
||||
if (Array.isArray(this.roll.l5r5e.history)) {
|
||||
@@ -223,7 +231,7 @@ export class RollnKeepDialog extends FormApplication {
|
||||
* @param options
|
||||
* @return {Object}
|
||||
*/
|
||||
getData(options = null) {
|
||||
async getData(options = null) {
|
||||
const rollData = this.roll.l5r5e;
|
||||
|
||||
// Disable submit / edition
|
||||
@@ -239,7 +247,7 @@ export class RollnKeepDialog extends FormApplication {
|
||||
}
|
||||
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
isGM: game.user.isGM,
|
||||
showChoices: options.editable && !rollData.rnkEnded,
|
||||
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;
|
||||
if (actorMod !== 0 && this.roll.l5r5e.actor?.isCharacter) {
|
||||
await this.roll.l5r5e.actor.update({
|
||||
data: {
|
||||
system: {
|
||||
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) {
|
||||
this.l5r5e.targetInfos = targetToken
|
||||
? {
|
||||
img: targetToken.data.img,
|
||||
name: targetToken.data.name,
|
||||
img: targetToken.img,
|
||||
name: targetToken.name,
|
||||
}
|
||||
: null;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ export class RollL5r5e extends Roll {
|
||||
} else if (data.l5r5e.actor.uuid) {
|
||||
// Only uuid, get the object
|
||||
let actor;
|
||||
let tmpItem = game.l5r5e.HelpersL5r5e.fromUuidNoPack(data.l5r5e.actor.uuid);
|
||||
const tmpItem = fromUuidSync(data.l5r5e.actor.uuid);
|
||||
if (tmpItem instanceof Actor) {
|
||||
actor = tmpItem;
|
||||
} else if (tmpItem instanceof TokenDocument) {
|
||||
|
||||
@@ -91,7 +91,7 @@ export class GmMonitor extends FormApplication {
|
||||
actors = game.actors.filter((e) => ids.includes(e.id));
|
||||
} else {
|
||||
// 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();
|
||||
}
|
||||
|
||||
@@ -120,9 +120,9 @@ export class GmMonitor extends FormApplication {
|
||||
* @return {Object}
|
||||
* @override
|
||||
*/
|
||||
getData(options = null) {
|
||||
async getData(options = null) {
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
data: {
|
||||
...this.object,
|
||||
actors: this.object.actors.filter((e) =>
|
||||
@@ -197,12 +197,13 @@ export class GmMonitor extends FormApplication {
|
||||
if (!json) {
|
||||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
const actor = game.actors.find((e) => e.id === data.id);
|
||||
const actor = game.actors.find((a) => a.uuid === data.uuid);
|
||||
if (!actor) {
|
||||
return;
|
||||
}
|
||||
@@ -275,8 +276,7 @@ export class GmMonitor extends FormApplication {
|
||||
const add = event.which === 2 ? -999 : event.which === 1 ? 1 : -1;
|
||||
|
||||
// Stance
|
||||
let stanceIdx =
|
||||
CONFIG.l5r5e.stances.findIndex((s) => s === actor.data.data.stance) + (event.which === 1 ? 1 : -1);
|
||||
let stanceIdx = CONFIG.l5r5e.stances.findIndex((s) => s === actor.system.stance) + (event.which === 1 ? 1 : -1);
|
||||
if (stanceIdx < 0) {
|
||||
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) {
|
||||
// *** Characters ***
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
case "void_points":
|
||||
updateData["data.void_points.value"] = Math.min(
|
||||
actor.data.data.void_points.max,
|
||||
Math.max(0, actor.data.data.void_points.value + add)
|
||||
updateData["system.void_points.value"] = Math.min(
|
||||
actor.system.void_points.max,
|
||||
Math.max(0, actor.system.void_points.value + add)
|
||||
);
|
||||
break;
|
||||
|
||||
case "stance":
|
||||
updateData["data.stance"] = CONFIG.l5r5e.stances[stanceIdx];
|
||||
updateData["system.stance"] = CONFIG.l5r5e.stances[stanceIdx];
|
||||
break;
|
||||
|
||||
case "prepared":
|
||||
updateData["data.prepared"] = !actor.data.data.prepared;
|
||||
updateData["system.prepared"] = !actor.system.prepared;
|
||||
break;
|
||||
|
||||
// *** Armies ***
|
||||
case "casualties":
|
||||
updateData["data.battle_readiness.casualties_strength.value"] = Math.max(
|
||||
updateData["system.battle_readiness.casualties_strength.value"] = Math.max(
|
||||
0,
|
||||
actor.data.data.battle_readiness.casualties_strength.value + add
|
||||
actor.system.battle_readiness.casualties_strength.value + add
|
||||
);
|
||||
break;
|
||||
|
||||
case "panic":
|
||||
updateData["data.battle_readiness.panic_discipline.value"] = Math.max(
|
||||
updateData["system.battle_readiness.panic_discipline.value"] = Math.max(
|
||||
0,
|
||||
actor.data.data.battle_readiness.panic_discipline.value + add
|
||||
actor.system.battle_readiness.panic_discipline.value + add
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -328,7 +328,7 @@ export class GmMonitor extends FormApplication {
|
||||
console.warn("L5R5E | Unsupported type", type);
|
||||
break;
|
||||
}
|
||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
await actor.update(updateData);
|
||||
this.render(false);
|
||||
}
|
||||
@@ -336,52 +336,52 @@ export class GmMonitor extends FormApplication {
|
||||
|
||||
/**
|
||||
* Get tooltips information for this character
|
||||
* @param {BaseSheetL5r5e} actor
|
||||
* @param {ActorL5r5e} actor
|
||||
* @return {string}
|
||||
* @private
|
||||
*/
|
||||
async _getTooltipGlobal(actor) {
|
||||
const data = actor.data.data;
|
||||
const actorData = (await actor.sheet?.getData()?.data) || actor;
|
||||
|
||||
// Peculiarities
|
||||
const pec = actor.items.filter((e) => e.type === "peculiarity");
|
||||
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)
|
||||
.join(", ");
|
||||
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)
|
||||
.join(", ");
|
||||
|
||||
// *** Template ***
|
||||
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global.html`, {
|
||||
actorData: data,
|
||||
actorData: actorData,
|
||||
advantages: adv,
|
||||
disadvantages: dis,
|
||||
suffix: data.template === "pow" ? "_pow" : "",
|
||||
actor_type: actor.data.type,
|
||||
suffix: actorData.system.template === "pow" ? "_pow" : "",
|
||||
actor_type: actor.type,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tooltips informations for this army
|
||||
* @param {BaseSheetL5r5e} actor
|
||||
* Get tooltips information for this army
|
||||
* @param {ActorL5r5e} actor
|
||||
* @return {string}
|
||||
* @private
|
||||
*/
|
||||
async _getTooltipArmiesGlobal(actor) {
|
||||
const actorData = (await actor.sheet?.getData()) || actor.data;
|
||||
const actorData = (await actor.sheet?.getData()?.data) || actor;
|
||||
|
||||
// *** Template ***
|
||||
return renderTemplate(`${CONFIG.l5r5e.paths.templates}gm/monitor-tooltips/global-armies.html`, {
|
||||
actorData: actorData.data,
|
||||
actorData: actorData,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get weapons informations for this actor
|
||||
* @param {BaseSheetL5r5e} actor
|
||||
* Get weapons information for this actor
|
||||
* @param {ActorL5r5e} actor
|
||||
* @return {string}
|
||||
* @private
|
||||
*/
|
||||
@@ -397,12 +397,12 @@ export class GmMonitor extends FormApplication {
|
||||
|
||||
// Readied Weapons
|
||||
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));
|
||||
|
||||
// Equipped Weapons
|
||||
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));
|
||||
|
||||
// *** Template ***
|
||||
@@ -413,20 +413,20 @@ export class GmMonitor extends FormApplication {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get armors informations for this actor
|
||||
* @param {BaseSheetL5r5e} actor
|
||||
* Get armors information for this actor
|
||||
* @param {ActorL5r5e} actor
|
||||
* @return {string}
|
||||
* @private
|
||||
*/
|
||||
async _getTooltipArmors(actor) {
|
||||
// Equipped Armors
|
||||
const armors = actor.items
|
||||
.filter((e) => e.type === "armor" && e.data.data.equipped)
|
||||
.filter((e) => e.type === "armor" && e.system.equipped)
|
||||
.map(
|
||||
(e) =>
|
||||
e.name +
|
||||
` (<i class="fas fa-tint">${e.data.data.armor.physical}</i>` +
|
||||
` / <i class="fas fa-bolt">${e.data.data.armor.supernatural}</i>)`
|
||||
` (<i class="fas fa-tint">${e.system.armor.physical}</i>` +
|
||||
` / <i class="fas fa-bolt">${e.system.armor.supernatural}</i>)`
|
||||
);
|
||||
|
||||
// *** Template ***
|
||||
|
||||
@@ -67,7 +67,7 @@ export class GmToolbox extends FormApplication {
|
||||
// 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
|
||||
// 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();
|
||||
} else {
|
||||
// Case 4 - toggle the main menu
|
||||
@@ -102,9 +102,9 @@ export class GmToolbox extends FormApplication {
|
||||
* @return {Object}
|
||||
* @override
|
||||
*/
|
||||
getData(options = null) {
|
||||
async getData(options = null) {
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
data: this.object,
|
||||
};
|
||||
}
|
||||
@@ -201,46 +201,46 @@ export class GmToolbox extends FormApplication {
|
||||
}
|
||||
|
||||
// Manage left/right button
|
||||
if (!isAll && (actor.data.type !== "character" || !actor.hasPlayerOwner)) {
|
||||
if (!isAll && (actor.type !== "character" || !actor.hasPlayerOwner)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case "sleep":
|
||||
// Remove 'water x2' fatigue points
|
||||
actor.data.data.fatigue.value = Math.max(
|
||||
actor.system.fatigue.value = Math.max(
|
||||
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;
|
||||
|
||||
case "scene_end":
|
||||
// If more than half the value => roundup half conflit & fatigue
|
||||
actor.data.data.fatigue.value = Math.min(
|
||||
actor.data.data.fatigue.value,
|
||||
Math.ceil(actor.data.data.fatigue.max / 2)
|
||||
actor.system.fatigue.value = Math.min(
|
||||
actor.system.fatigue.value,
|
||||
Math.ceil(actor.system.fatigue.max / 2)
|
||||
);
|
||||
actor.data.data.strife.value = Math.min(
|
||||
actor.data.data.strife.value,
|
||||
Math.ceil(actor.data.data.strife.max / 2)
|
||||
actor.system.strife.value = Math.min(
|
||||
actor.system.strife.value,
|
||||
Math.ceil(actor.system.strife.max / 2)
|
||||
);
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
await actor.update({
|
||||
data: {
|
||||
system: {
|
||||
fatigue: {
|
||||
value: actor.data.data.fatigue.value,
|
||||
value: actor.system.fatigue.value,
|
||||
},
|
||||
strife: {
|
||||
value: actor.data.data.strife.value,
|
||||
value: actor.system.strife.value,
|
||||
},
|
||||
void_points: {
|
||||
value: actor.data.data.void_points.value,
|
||||
value: actor.system.void_points.value,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -66,6 +66,7 @@ export const RegisterHandlebars = function () {
|
||||
|
||||
// enrichHTML
|
||||
Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
|
||||
options.async = false;
|
||||
return TextEditor.enrichHTML(text, options);
|
||||
});
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ export class HelpDialog extends FormApplication {
|
||||
* @param options
|
||||
* @return {Object}
|
||||
*/
|
||||
getData(options = null) {
|
||||
async getData(options = null) {
|
||||
return {
|
||||
...super.getData(options),
|
||||
...(await super.getData(options)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export class HelpersL5r5e {
|
||||
return CONFIG.l5r5e.stances.map((e) => ({
|
||||
id: 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}`));
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @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
|
||||
* @param {string} id
|
||||
* @param {string} type Type (Item, JournalEntry...)
|
||||
* @param {string} uuid "Item.5qI6SU85VSFqji8W"
|
||||
* @param {string} id "5qI6SU85VSFqji8W"
|
||||
* @param {string} type Type ("Item", "JournalEntry"...)
|
||||
* @param {any[]|null} data Plain data
|
||||
* @param {string|null} pack Pack name
|
||||
* @param {string|null} parentId Used to avoid an infinite loop in properties if set
|
||||
* @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;
|
||||
|
||||
try {
|
||||
// Direct Object
|
||||
if (data?._id) {
|
||||
document = HelpersL5r5e.createDocumentFromCompendium({ type, data });
|
||||
} else if (!id || !type) {
|
||||
} else if (!uuid && (!id || !type)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// UUID
|
||||
if (!document && !!uuid) {
|
||||
document = await fromUuid(uuid);
|
||||
}
|
||||
// TODO need to migrate to UUID
|
||||
|
||||
// Named pack
|
||||
if (!document) {
|
||||
// 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
|
||||
if (document) {
|
||||
// Flag the source GUID
|
||||
if (document.uuid && !document.getFlag("core", "sourceId")) {
|
||||
document.data.update({ "flags.core.sourceId": document.uuid });
|
||||
if (document.uuid && !document.pack && !document.getFlag("core", "sourceId")) {
|
||||
document.updateSource({ "flags.core.sourceId": document.uuid });
|
||||
}
|
||||
|
||||
// Care to infinite loop in properties
|
||||
@@ -263,13 +240,13 @@ export class HelpersL5r5e {
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
static async refreshItemProperties(document) {
|
||||
if (document.data?.data?.properties && typeof Babele !== "undefined") {
|
||||
document.data.data.properties = await Promise.all(
|
||||
document.data.data.properties.map(async (property) => {
|
||||
if (document.system?.properties && typeof Babele !== "undefined") {
|
||||
document.system.properties = await Promise.all(
|
||||
document.system.properties.map(async (property) => {
|
||||
const gameProp = await HelpersL5r5e.getObjectGameOrPack({
|
||||
id: property.id,
|
||||
type: "Item",
|
||||
parentId: document.data?._id || 1,
|
||||
parentId: document._id || 1,
|
||||
});
|
||||
if (gameProp) {
|
||||
return { id: gameProp.id, name: gameProp.name };
|
||||
@@ -279,7 +256,7 @@ export class HelpersL5r5e {
|
||||
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) => {
|
||||
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
|
||||
xp_used_total += xp;
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -626,8 +603,8 @@ export class HelpersL5r5e {
|
||||
|
||||
// Create the link
|
||||
let link = null;
|
||||
if (object.data.flags.core?.sourceId) {
|
||||
link = object.data.flags.core?.sourceId.replace(/(\w+)\.(.+)/, "@$1[$2]");
|
||||
if (object.flags.core?.sourceId) {
|
||||
link = object.flags.core?.sourceId.replace(/(\w+)\.(.+)/, "@$1[$2]");
|
||||
if (!HelpersL5r5e.isLinkValid(link)) {
|
||||
link = null;
|
||||
}
|
||||
@@ -661,7 +638,7 @@ export class HelpersL5r5e {
|
||||
|
||||
// Get a matched World document
|
||||
// "@Item[L5RCoreIte000042]{Amigasa}"
|
||||
if (CONST.ENTITY_TYPES.includes(type)) {
|
||||
if (CONST.DOCUMENT_TYPES.includes(type)) {
|
||||
const collection = game.collections.get(type);
|
||||
const document = /^[a-zA-Z0-9]{16}$/.test(target) ? collection.get(target) : collection.getName(target);
|
||||
return !!document;
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class HooksL5r5e {
|
||||
case "settings":
|
||||
// Add Changelog link
|
||||
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;
|
||||
}
|
||||
@@ -198,13 +198,13 @@ export default class HooksL5r5e {
|
||||
if (["weapon", "armor", "item", "peculiarity", "technique", "peculiarity"].includes(document.type)) {
|
||||
html.find(`[data-document-id="${document.id}"]`).append(
|
||||
`<i` +
|
||||
(document.data.data.ring ? ` class="i_${document.data.data.ring}"` : ``) +
|
||||
(document.system.ring ? ` class="i_${document.system.ring}"` : ``) +
|
||||
`>` +
|
||||
(document.data.data.rarity
|
||||
? `${game.i18n.localize("l5r5e.sheets.rarity")} ${document.data.data.rarity}`
|
||||
(document.system.rarity
|
||||
? `${game.i18n.localize("l5r5e.sheets.rarity")} ${document.system.rarity}`
|
||||
: "") +
|
||||
(document.data.data.rank
|
||||
? game.i18n.localize("l5r5e.sheets.rank") + " " + document.data.data.rank
|
||||
(document.system.rank
|
||||
? game.i18n.localize("l5r5e.sheets.rank") + " " + document.system.rank
|
||||
: "") +
|
||||
`</i>`
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ export class ItemL5r5e extends Item {
|
||||
* @returns {Collection<BaseItem>}
|
||||
*/
|
||||
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}
|
||||
*/
|
||||
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.
|
||||
* @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
|
||||
* @returns {Promise<Document>} The updated Document instance
|
||||
* @returns {Promise<Document>} The updated Document instance
|
||||
*/
|
||||
async update(data = {}, context = {}) {
|
||||
// Regular
|
||||
if (!this.data.data.parent_id) {
|
||||
if (!this.system.parent_id) {
|
||||
return super.update(data, context);
|
||||
}
|
||||
|
||||
@@ -47,19 +47,21 @@ export class ItemL5r5e extends Item {
|
||||
}
|
||||
|
||||
// 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) {
|
||||
this.data.name = result.name;
|
||||
this.name = result.name;
|
||||
}
|
||||
if (result.img) {
|
||||
this.data.img = result.img;
|
||||
this.img = result.img;
|
||||
}
|
||||
if (result.data) {
|
||||
this.data.data = result.data;
|
||||
this.data = result.data; // todo tmp check this!
|
||||
}
|
||||
|
||||
// Update
|
||||
await parentItem.updateEmbedItem(this.data.toObject(false));
|
||||
await parentItem.updateEmbedItem(this.toObject(false));
|
||||
|
||||
// Return new value for sheet
|
||||
return new Promise((resolve) => resolve(this));
|
||||
@@ -70,9 +72,9 @@ export class ItemL5r5e extends Item {
|
||||
super.prepareData();
|
||||
|
||||
// Prepare Embed items
|
||||
if (!(this.data.data.items instanceof Map)) {
|
||||
const itemsData = Array.isArray(this.data.data.items) ? this.data.data.items : [];
|
||||
this.data.data.items = new Map();
|
||||
if (!(this.system.items instanceof Map)) {
|
||||
const itemsData = Array.isArray(this.system.items) ? this.system.items : [];
|
||||
this.system.items = new Map();
|
||||
|
||||
itemsData.forEach((item) => {
|
||||
this.addEmbedItem(item, { save: false, newId: false, addBonusToActor: false });
|
||||
@@ -80,16 +82,16 @@ export class ItemL5r5e extends Item {
|
||||
}
|
||||
|
||||
// Sanitize some values
|
||||
switch (this.data.type) {
|
||||
switch (this.type) {
|
||||
case "armor":
|
||||
this.data.data.armor.physical = this.data.data.armor.physical || 0;
|
||||
this.data.data.armor.supernatural = this.data.data.armor.supernatural || 0;
|
||||
this.system.armor.physical = this.system.armor.physical || 0;
|
||||
this.system.armor.supernatural = this.system.armor.supernatural || 0;
|
||||
break;
|
||||
|
||||
case "weapon":
|
||||
this.data.data.range = this.data.data.range || 0;
|
||||
this.data.data.damage = this.data.data.damage || 0;
|
||||
this.data.data.deadliness = this.data.data.deadliness || 0;
|
||||
this.system.range = this.system.range || 0;
|
||||
this.system.damage = this.system.damage || 0;
|
||||
this.system.deadliness = this.system.deadliness || 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -103,8 +105,8 @@ export class ItemL5r5e extends Item {
|
||||
const parent = {
|
||||
item_id: this.id,
|
||||
};
|
||||
if (this.actor?.data?._id) {
|
||||
parent.actor_id = this.actor.data._id;
|
||||
if (this.actor?._id) {
|
||||
parent.actor_id = this.actor._id;
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
@@ -114,7 +116,7 @@ export class ItemL5r5e extends Item {
|
||||
* @return {ItemL5r5e|null}
|
||||
*/
|
||||
getItemFromParentId() {
|
||||
const parentIds = this.data.data.parent_id;
|
||||
const parentIds = this.system.parent_id;
|
||||
let parentItem;
|
||||
|
||||
if (parentIds?.actor_id) {
|
||||
@@ -134,12 +136,12 @@ export class ItemL5r5e extends Item {
|
||||
* @return {Promise<string|null>}
|
||||
*/
|
||||
async renderTextTemplate() {
|
||||
const data = (await this.sheet?.getData()) || this;
|
||||
if (data instanceof ItemL5r5e) {
|
||||
const sheetData = (await this.sheet?.getData()) || this;
|
||||
if (sheetData instanceof ItemL5r5e) {
|
||||
await game.l5r5e.HelpersL5r5e.refreshItemProperties(this);
|
||||
}
|
||||
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) {
|
||||
return null;
|
||||
}
|
||||
@@ -148,7 +150,7 @@ export class ItemL5r5e extends Item {
|
||||
|
||||
// ***** Embedded items management *****
|
||||
/**
|
||||
* Shortcut for this.data.data.items.get
|
||||
* Shortcut for this.items.get
|
||||
* @param id
|
||||
* @return {ItemL5r5e|null}
|
||||
*/
|
||||
@@ -176,17 +178,17 @@ export class ItemL5r5e extends Item {
|
||||
|
||||
// New id
|
||||
if (newId) {
|
||||
item.data._id = foundry.utils.randomID();
|
||||
item._id = foundry.utils.randomID();
|
||||
}
|
||||
|
||||
// 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)
|
||||
item.data.data.parent_id = this.getParentsIds();
|
||||
item.system.parent_id = this.getParentsIds();
|
||||
|
||||
// Object
|
||||
this.data.data.items.set(item.data._id, item);
|
||||
this.system.items.set(item._id, item);
|
||||
|
||||
// Add bonus to actor
|
||||
if (addBonusToActor) {
|
||||
@@ -199,7 +201,7 @@ export class ItemL5r5e extends Item {
|
||||
if (save) {
|
||||
await this.saveEmbedItems();
|
||||
}
|
||||
return item.data._id;
|
||||
return item._id;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,21 +222,21 @@ export class ItemL5r5e extends Item {
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
async deleteEmbedItem(id, { save = true, removeBonusFromActor = true } = {}) {
|
||||
if (!this.data.data.items.has(id)) {
|
||||
if (!this.system.items.has(id)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove bonus from actor
|
||||
if (removeBonusFromActor) {
|
||||
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) {
|
||||
actor.removeBonus(item);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the embed item
|
||||
this.data.data.items.delete(id);
|
||||
this.system.items.delete(id);
|
||||
|
||||
if (save) {
|
||||
await this.saveEmbedItems();
|
||||
@@ -247,8 +249,8 @@ export class ItemL5r5e extends Item {
|
||||
*/
|
||||
async generateNewIdsForAllEmbedItems() {
|
||||
// Clear olds ids
|
||||
const oldItems = Array.from(this.data.data.items);
|
||||
this.data.data.items = new Map();
|
||||
const oldItems = Array.from(this.system.items);
|
||||
this.system.items = new Map();
|
||||
|
||||
// Re-add with new ids
|
||||
oldItems.forEach(([id, item]) => {
|
||||
@@ -264,7 +266,7 @@ export class ItemL5r5e extends Item {
|
||||
*/
|
||||
async saveEmbedItems() {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -41,9 +41,9 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
return;
|
||||
}
|
||||
|
||||
// const currentType = this.object.data.data.advancement_type;
|
||||
const currentRing = this.object.data.data.ring;
|
||||
const currentSkill = this.object.data.data.skill;
|
||||
// const currentType = this.object.system.advancement_type;
|
||||
const currentRing = this.object.system.ring;
|
||||
const currentSkill = this.object.system.skill;
|
||||
|
||||
html.find("#advancement_type").on("change", (event) => {
|
||||
$(event.target).prop("disabled", true);
|
||||
@@ -78,9 +78,9 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
* @private
|
||||
*/
|
||||
async _updateChoice(oldChoice, newChoice) {
|
||||
let xp_used = this.object.data.data.xp_used;
|
||||
let name = this.object.data.name;
|
||||
let img = this.object.data.img;
|
||||
let xp_used = this.object.system.xp_used;
|
||||
let name = this.object.name;
|
||||
let img = this.object.img;
|
||||
|
||||
// Modify image to reflect choice
|
||||
if (newChoice.ring) {
|
||||
@@ -96,7 +96,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
// Object embed in actor ?
|
||||
const actor = this.document.actor;
|
||||
if (actor) {
|
||||
const actorData = foundry.utils.duplicate(actor.data.data);
|
||||
const actorData = foundry.utils.duplicate(actor.system);
|
||||
let skillCatId = null;
|
||||
|
||||
// Old choices
|
||||
@@ -132,7 +132,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
|
||||
// Update Actor
|
||||
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({
|
||||
name: name,
|
||||
img: img,
|
||||
data: {
|
||||
system: {
|
||||
xp_used: xp_used,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -27,7 +27,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
* @private
|
||||
*/
|
||||
_initialize() {
|
||||
const data = this.object.data.data;
|
||||
const data = this.object.system;
|
||||
|
||||
// update linked actor datas
|
||||
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
|
||||
* @param {string} name The named data field which the editor modifies.
|
||||
@@ -49,10 +63,10 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
*/
|
||||
activateEditor(name, options = {}, initialContent = "") {
|
||||
// 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);
|
||||
}
|
||||
super.activateEditor(name, options, initialContent);
|
||||
return super.activateEditor(name, options, initialContent);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,15 +114,15 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
*/
|
||||
async _updateLinkedActorData(actor) {
|
||||
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 this.object.update({
|
||||
img: actor.data.img,
|
||||
data: {
|
||||
leader: actor.data.name,
|
||||
leader_actor_id: actor.data._id,
|
||||
img: actor.img,
|
||||
system: {
|
||||
leader: actor.name,
|
||||
leader_actor_id: actor._id,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -120,7 +134,7 @@ export class ArmyCohortSheetL5r5e extends ItemSheetL5r5e {
|
||||
*/
|
||||
async _removeLinkedActor() {
|
||||
return this.object.update({
|
||||
data: {
|
||||
system: {
|
||||
leader_actor_id: null,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -62,10 +62,10 @@ export class BaseItemSheetL5r5e extends ItemSheet {
|
||||
*/
|
||||
activateEditor(name, options = {}, initialContent = "") {
|
||||
// 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);
|
||||
}
|
||||
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}>}
|
||||
*/
|
||||
async getLinkedProperty(sheetData) {
|
||||
if (sheetData.data.data.linked_property_id) {
|
||||
if (sheetData.data.system.linked_property_id) {
|
||||
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
||||
id: sheetData.data.data.linked_property_id,
|
||||
id: sheetData.data.system.linked_property_id,
|
||||
type: "Item",
|
||||
});
|
||||
if (linkedProperty) {
|
||||
return {
|
||||
id: linkedProperty.data._id,
|
||||
name: linkedProperty.data.name,
|
||||
id: linkedProperty._id,
|
||||
name: linkedProperty.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -77,15 +77,15 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
||||
|
||||
// Only property allowed here
|
||||
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;
|
||||
}
|
||||
|
||||
// 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({
|
||||
data: {
|
||||
linked_property_id: this.document.data.data.linked_property_id,
|
||||
system: {
|
||||
linked_property_id: this.document.system.linked_property_id,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -102,18 +102,18 @@ export class ItemPatternSheetL5r5e extends ItemSheetL5r5e {
|
||||
|
||||
let name;
|
||||
const linkedProperty = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({
|
||||
id: this.document.data.data.linked_property_id,
|
||||
id: this.document.system.linked_property_id,
|
||||
type: "Item",
|
||||
});
|
||||
if (linkedProperty) {
|
||||
name = linkedProperty.data.name;
|
||||
name = linkedProperty.name;
|
||||
}
|
||||
|
||||
const callback = async () => {
|
||||
this.document.data.data.linked_property_id = null;
|
||||
this.document.system.linked_property_id = null;
|
||||
this.document.update({
|
||||
data: {
|
||||
linked_property_id: this.document.data.data.linked_property_id,
|
||||
system: {
|
||||
linked_property_id: this.document.system.linked_property_id,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -27,6 +27,11 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
// Prepare Properties (id/name => object)
|
||||
await this._prepareProperties(sheetData);
|
||||
|
||||
// Editors enrichment
|
||||
sheetData.data.enrichedHtml = {
|
||||
description: await TextEditor.enrichHTML(sheetData.data.system.description, { async: true }),
|
||||
};
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
|
||||
@@ -37,9 +42,9 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
async _prepareProperties(sheetData) {
|
||||
sheetData.data.propertiesList = [];
|
||||
|
||||
if (Array.isArray(sheetData.data.data.properties)) {
|
||||
if (Array.isArray(sheetData.data.system.properties)) {
|
||||
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" });
|
||||
if (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
|
||||
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({
|
||||
id: item.data.data.linked_property_id,
|
||||
id: item.system.linked_property_id,
|
||||
type: "Item",
|
||||
});
|
||||
}
|
||||
|
||||
// Final object has to be a property
|
||||
if (item.data.type !== "property") {
|
||||
if (item.type !== "property") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,27 +141,27 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
* @private
|
||||
*/
|
||||
_addProperty(item) {
|
||||
if (!Array.isArray(this.document.data.data.properties)) {
|
||||
this.document.data.data.properties = [];
|
||||
if (!Array.isArray(this.document.system.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;
|
||||
}
|
||||
|
||||
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 ?
|
||||
if (Array.isArray(item.data.data.properties) && item.data.data.properties.length > 0) {
|
||||
const idsToRemove = item.data.data.properties.map((e) => e.id);
|
||||
this.document.data.data.properties = this.document.data.data.properties.filter(
|
||||
if (Array.isArray(item.system.properties) && item.system.properties.length > 0) {
|
||||
const idsToRemove = item.system.properties.map((e) => e.id);
|
||||
this.document.system.properties = this.document.system.properties.filter(
|
||||
(p) => !idsToRemove.includes(p.id)
|
||||
);
|
||||
}
|
||||
|
||||
this.document.update({
|
||||
data: {
|
||||
properties: this.document.data.data.properties,
|
||||
system: {
|
||||
properties: this.document.system.properties,
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -171,21 +176,21 @@ export class ItemSheetL5r5e extends BaseItemSheetL5r5e {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (!Array.isArray(this.document.data.data.properties)) {
|
||||
if (!Array.isArray(this.document.system.properties)) {
|
||||
return;
|
||||
}
|
||||
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
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({
|
||||
data: {
|
||||
properties: this.document.data.data.properties,
|
||||
system: {
|
||||
properties: this.document.system.properties,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
@@ -27,9 +27,9 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
sheetData.data.techniquesList = game.l5r5e.HelpersL5r5e.getTechniquesList({ types });
|
||||
|
||||
// Sanitize Difficulty and Skill list
|
||||
sheetData.data.data.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.data.difficulty);
|
||||
sheetData.data.data.skill = TechniqueSheetL5r5e.translateSkillsList(
|
||||
TechniqueSheetL5r5e.formatSkillList(sheetData.data.data.skill.split(",")),
|
||||
sheetData.data.system.difficulty = TechniqueSheetL5r5e.formatDifficulty(sheetData.data.system.difficulty);
|
||||
sheetData.data.system.skill = TechniqueSheetL5r5e.translateSkillsList(
|
||||
TechniqueSheetL5r5e.formatSkillList(sheetData.data.system.skill.split(",")),
|
||||
false
|
||||
).join(", ");
|
||||
|
||||
@@ -46,16 +46,16 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
async _updateObject(event, formData) {
|
||||
// Change the image according to the type if this is already the case
|
||||
if (
|
||||
formData["data.technique_type"] &&
|
||||
formData.img === `${CONFIG.l5r5e.paths.assets}icons/techs/${this.object.data.data.technique_type}.svg`
|
||||
formData["system.technique_type"] &&
|
||||
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
|
||||
formData["data.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["data.difficulty"]);
|
||||
formData["data.skill"] = TechniqueSheetL5r5e.formatSkillList(
|
||||
TechniqueSheetL5r5e.translateSkillsList(formData["data.skill"].split(","), true)
|
||||
formData["system.difficulty"] = TechniqueSheetL5r5e.formatDifficulty(formData["system.difficulty"]);
|
||||
formData["system.skill"] = TechniqueSheetL5r5e.formatSkillList(
|
||||
TechniqueSheetL5r5e.translateSkillsList(formData["system.skill"].split(","), true)
|
||||
).join(",");
|
||||
|
||||
return super._updateObject(event, formData);
|
||||
@@ -77,7 +77,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
// Autocomplete
|
||||
game.l5r5e.HelpersL5r5e.autocomplete(
|
||||
html,
|
||||
"data.difficulty",
|
||||
"system.difficulty",
|
||||
[
|
||||
"@T:intrigueRank",
|
||||
"@T:focus",
|
||||
@@ -93,7 +93,7 @@ export class TechniqueSheetL5r5e extends ItemSheetL5r5e {
|
||||
);
|
||||
game.l5r5e.HelpersL5r5e.autocomplete(
|
||||
html,
|
||||
"data.skill",
|
||||
"system.skill",
|
||||
Object.values(TechniqueSheetL5r5e.getSkillsTranslationMap(false)),
|
||||
","
|
||||
);
|
||||
|
||||
@@ -22,12 +22,12 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
const sheetData = await super.getData(options);
|
||||
|
||||
// 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)
|
||||
const { xp_used_total, xp_used } = game.l5r5e.HelpersL5r5e.getItemsXpCost(sheetData.data.embedItemsList);
|
||||
sheetData.data.data.xp_used_total = xp_used_total;
|
||||
sheetData.data.data.xp_used = xp_used;
|
||||
sheetData.data.system.xp_used_total = xp_used_total;
|
||||
sheetData.data.system.xp_used = xp_used;
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
@@ -41,11 +41,11 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
_prepareEmbedItems(itemsMap) {
|
||||
let itemsList = itemsMap;
|
||||
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
|
||||
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;
|
||||
}
|
||||
@@ -63,16 +63,16 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
|
||||
// Check item type and subtype
|
||||
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;
|
||||
}
|
||||
|
||||
const data = item.data.toObject(false);
|
||||
const data = item.toObject(false);
|
||||
|
||||
// Check xp for techs
|
||||
if (item.data.type === "technique") {
|
||||
data.data.xp_cost = data.data.xp_cost > 0 ? data.data.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||
data.data.xp_used = data.data.xp_cost;
|
||||
if (item.type === "technique") {
|
||||
data.system.xp_cost = data.system.xp_cost > 0 ? data.system.xp_cost : CONFIG.l5r5e.xp.techniqueCost;
|
||||
data.system.xp_used = data.system.xp_cost;
|
||||
}
|
||||
|
||||
this.document.addEmbedItem(data);
|
||||
@@ -146,7 +146,7 @@ export class TitleSheetL5r5e extends ItemSheetL5r5e {
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export class BaseJournalSheetL5r5e extends JournalSheet {
|
||||
if (initialContent) {
|
||||
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
|
||||
const oldEnrichHTML = TextEditor.prototype.constructor.enrichHTML;
|
||||
TextEditor.prototype.constructor.enrichHTML = function (content, options = {}) {
|
||||
return HelpersL5r5e.convertSymbols(oldEnrichHTML.call(this, content, options), true);
|
||||
TextEditor.prototype.constructor.enrichHTML = async function (content, options = {}) {
|
||||
return HelpersL5r5e.convertSymbols(await oldEnrichHTML.call(this, content, options), true);
|
||||
};
|
||||
|
||||
// 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
|
||||
let h = Math.max(canvas.dimensions.size / 12, 8);
|
||||
if (this.data.height >= 2) {
|
||||
if (this.height >= 2) {
|
||||
h *= 1.6;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ export class MigrationL5r5e {
|
||||
// Migrate World Actors
|
||||
for (let actor of game.actors.contents) {
|
||||
try {
|
||||
const updateData = MigrationL5r5e._migrateActorData(actor.data, options);
|
||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
||||
const updateData = MigrationL5r5e._migrateActorData(actor, options);
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
console.log(`L5R5E | Migrating Actor entity ${actor.name}`);
|
||||
await actor.update(updateData);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export class MigrationL5r5e {
|
||||
for (let item of game.items.contents) {
|
||||
try {
|
||||
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}`);
|
||||
await item.update(updateData);
|
||||
}
|
||||
@@ -71,7 +71,7 @@ export class MigrationL5r5e {
|
||||
for (let scene of game.scenes.contents) {
|
||||
try {
|
||||
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}`);
|
||||
await scene.update(updateData);
|
||||
// If we do not do this, then synthetic token actors remain in cache
|
||||
@@ -97,7 +97,7 @@ export class MigrationL5r5e {
|
||||
const updatedChatList = [];
|
||||
for (let message of game.collections.get("ChatMessage")) {
|
||||
const updateData = MigrationL5r5e._migrateChatMessage(message.data, options);
|
||||
if (!foundry.utils.isObjectEmpty(updateData)) {
|
||||
if (!foundry.utils.isEmpty(updateData)) {
|
||||
updateData["_id"] = message.data._id;
|
||||
updatedChatList.push(updateData);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ export class MigrationL5r5e {
|
||||
updateData = MigrationL5r5e._migrateSceneData(ent.data);
|
||||
break;
|
||||
}
|
||||
if (foundry.utils.isObjectEmpty(updateData)) {
|
||||
if (foundry.utils.isEmpty(updateData)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ export class MigrationL5r5e {
|
||||
*/
|
||||
static _migrateActorData(actor, options = { force: false }) {
|
||||
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".
|
||||
// ex no diff : actor = {type: "npc"}, actorData = undefined
|
||||
@@ -243,16 +243,17 @@ export class MigrationL5r5e {
|
||||
if (options?.force || MigrationL5r5e.needUpdate("1.1.0")) {
|
||||
// Add "Prepared" in actor
|
||||
if (actorData.prepared === undefined) {
|
||||
updateData["data.prepared"] = true;
|
||||
updateData["system.prepared"] = true;
|
||||
}
|
||||
|
||||
// NPC are now without autostats, we need to save the value
|
||||
if (actor.type === "npc") {
|
||||
if (actorData.endurance < 1) {
|
||||
updateData["data.endurance"] = (Number(actorData.rings.earth) + Number(actorData.rings.fire)) * 2;
|
||||
updateData["data.composure"] = (Number(actorData.rings.earth) + Number(actorData.rings.water)) * 2;
|
||||
updateData["data.focus"] = Number(actorData.rings.air) + Number(actorData.rings.fire);
|
||||
updateData["data.vigilance"] = Math.ceil(
|
||||
updateData["system.endurance"] = (Number(actorData.rings.earth) + Number(actorData.rings.fire)) * 2;
|
||||
updateData["system.composure"] =
|
||||
(Number(actorData.rings.earth) + Number(actorData.rings.water)) * 2;
|
||||
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
|
||||
);
|
||||
}
|
||||
@@ -264,18 +265,18 @@ export class MigrationL5r5e {
|
||||
if (options?.force || MigrationL5r5e.needUpdate("1.3.0")) {
|
||||
// PC/NPC removed notes useless props "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
|
||||
if (actor.type === "npc" && actorData.rings_affinities?.strength) {
|
||||
const aff = actorData.rings_affinities;
|
||||
updateData["data.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
||||
updateData["data.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
||||
updateData["system.rings_affinities." + aff.strength.ring] = aff.strength.value;
|
||||
updateData["system.rings_affinities." + aff.weakness.ring] = aff.weakness.value;
|
||||
|
||||
// Delete old keys
|
||||
updateData["data.rings_affinities.-=strength"] = null;
|
||||
updateData["data.rings_affinities.-=weakness"] = null;
|
||||
updateData["system.rings_affinities.-=strength"] = null;
|
||||
updateData["system.rings_affinities.-=weakness"] = null;
|
||||
}
|
||||
}
|
||||
// ***** 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-size: 100%;
|
||||
border-radius: 100%;
|
||||
color: black;
|
||||
|
||||
&.fa-comments {
|
||||
background-image: url("../assets/ui/sidebar/chat.svg");
|
||||
&:before {
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
{
|
||||
"name": "l5r5e",
|
||||
"id": "l5r5e",
|
||||
"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>",
|
||||
"url": "https://gitlab.com/teaml5r/l5r5e",
|
||||
"readme": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/README.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",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.9.0/raw/l5r5e.zip?job=build",
|
||||
"version": "1.9.0",
|
||||
"minimumCoreVersion": "9",
|
||||
"compatibleCoreVersion": "9",
|
||||
"compatibility": {
|
||||
"minimum": 10,
|
||||
"verified": "10.273"
|
||||
},
|
||||
"manifestPlusVersion": "1.2.0",
|
||||
"socket": true,
|
||||
"author": "Team L5R",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Vlyan",
|
||||
|
||||
@@ -145,10 +145,6 @@
|
||||
<ul>
|
||||
{{#each actor.items as |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>
|
||||
{{/ifCond}}
|
||||
{{/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">
|
||||
<h2 class="item-name">
|
||||
{{data.name}}
|
||||
@@ -6,6 +6,6 @@
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
{{#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>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<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">
|
||||
<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>
|
||||
@@ -24,13 +24,13 @@
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
|
||||
</li>
|
||||
<li>
|
||||
<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">
|
||||
<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>
|
||||
@@ -40,7 +40,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
|
||||
</li>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<div class="header-fields warlord">
|
||||
<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">
|
||||
{{#if data.data.warlord_actor_id}}
|
||||
{{#if data.system.warlord_actor_id}}
|
||||
<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}}
|
||||
<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}}
|
||||
</label>
|
||||
{{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}}
|
||||
</p>
|
||||
<p>
|
||||
<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>
|
||||
<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>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="header-fields commander">
|
||||
<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">
|
||||
{{#if data.data.commander_actor_id}}
|
||||
{{#if data.system.commander_actor_id}}
|
||||
<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}}
|
||||
<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}}
|
||||
@@ -42,25 +42,25 @@
|
||||
<ul>
|
||||
<li>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
<label>
|
||||
<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>
|
||||
</fieldset>
|
||||
<fieldset class="army-abilities">
|
||||
<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>
|
||||
</div>
|
||||
@@ -1,23 +1,23 @@
|
||||
{{!-- Supplies and Logistics --}}
|
||||
<fieldset class="supplies_logistics">
|
||||
<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>
|
||||
|
||||
{{!-- Past Battles --}}
|
||||
<fieldset class="past_battles">
|
||||
<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>
|
||||
|
||||
{{!-- Description (public) --}}
|
||||
<fieldset class="description">
|
||||
<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>
|
||||
|
||||
{{!-- Notes (private) --}}
|
||||
<fieldset class="note">
|
||||
<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>
|
||||
@@ -34,7 +34,7 @@
|
||||
{{!-- Skills Tab --}}
|
||||
<article class="tab skills" data-group="primary" data-tab="skills">
|
||||
<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}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<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>
|
||||
{{#if show_curriculum_toggle}}<td class="curriculum" name="curriculum">{{#if advancement.data.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="rank" name="advancement.rank">{{advancement.data.rank}}</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.system.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>{{/if}}
|
||||
<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.system.rank}}</td>
|
||||
{{#if editable}}
|
||||
<td class="actions">
|
||||
<ul>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<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="curriculum" name="curriculum">{{#if advancement.data.in_curriculum}}<i class="fas fa-graduation-cap"></i> {{/if}}</td>
|
||||
<td class="xp" name="advancement.xp">{{advancement.data.xp_used}}</td>
|
||||
<td class="rank" name="advancement.rank">{{advancement.data.rank}}</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.system.xp_used}}</td>
|
||||
<td class="rank" name="advancement.rank">{{advancement.system.rank}}</td>
|
||||
{{#if editable}}
|
||||
<td class="actions">
|
||||
<ul>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<li class="endurance-content">
|
||||
<label class="attribute-label">
|
||||
<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 class="attribute-label">
|
||||
<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">
|
||||
<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>
|
||||
@@ -17,11 +17,11 @@
|
||||
<li class="composure-content">
|
||||
<label class="attribute-label">
|
||||
<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 class="attribute-label">
|
||||
<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">
|
||||
<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>
|
||||
@@ -32,17 +32,17 @@
|
||||
<li class="focus-content">
|
||||
<label class="attribute-label">
|
||||
<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>
|
||||
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
||||
</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">
|
||||
<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/>
|
||||
{{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}}
|
||||
</label>
|
||||
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
||||
@@ -50,8 +50,8 @@
|
||||
<li class="void-content">
|
||||
<label class="attribute-label">
|
||||
<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" type="number" name="data.void_points.max" value="{{data.data.void_points.max}}" data-dtype="Number" disabled/>
|
||||
<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="system.void_points.max" value="{{data.system.void_points.max}}" data-dtype="Number" disabled/>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -2,7 +2,7 @@
|
||||
<legend class="section-header">
|
||||
{{localize 'l5r5e.conflict.initiative.title'}}
|
||||
<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>
|
||||
</legend>
|
||||
<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">
|
||||
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
||||
<ul class="item-list">
|
||||
{{#each data.data.rings as |ringValue ringId|}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.data.stance ringId=ringId}}
|
||||
{{#each data.system.rings as |ringValue ringId|}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.system.stance ringId=ringId}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
<legend>{{localize 'l5r5e.sheets.experience'}}</legend>
|
||||
<label class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{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>
|
||||
</fieldset>
|
||||
{{!-- School progession --}}
|
||||
<fieldset class="advancement advancements-body">
|
||||
<legend class="tools">
|
||||
{{#if data.data.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}}
|
||||
{{#if data.system.identity.school_curriculum_journal.id}}
|
||||
<a class="school-journal-link"><i class="fas fa-file-alt"></i></a> {{data.system.identity.school_curriculum_journal.name}}
|
||||
{{else}}
|
||||
<i class="fas fa-question-circle" title="{{localize 'l5r5e.advancements.school_curriculum_journal'}}"></i> {{localize 'l5r5e.sheets.school'}}
|
||||
{{/if}}
|
||||
@@ -56,8 +56,8 @@
|
||||
<th>{{localize 'l5r5e.advancements.total_xp_spent'}} : {{rankObject.spent.total}}</th>
|
||||
</tr>
|
||||
{{#if ../data.editable_not_soft_locked}}
|
||||
{{#ifCond ../data.data.identity.school_rank '<' 6}}
|
||||
{{#ifCond (ifCond ../data.data.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}}
|
||||
{{#ifCond ../data.system.identity.school_rank '<' 6}}
|
||||
{{#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}}">
|
||||
<th>
|
||||
<button type="button" name="validate-curriculum">
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<ul class="identity-content">
|
||||
<li>
|
||||
<label class="attribute-label">
|
||||
{{#ifCond data.data.template '==' 'pow'}}
|
||||
{{#ifCond data.system.template '==' 'pow'}}
|
||||
{{localize 'l5r5e.sheets.region'}}
|
||||
{{else}}
|
||||
{{localize 'l5r5e.clans.label'}}
|
||||
{{/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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label">
|
||||
{{#ifCond data.data.template '==' 'pow'}}
|
||||
{{#ifCond data.system.template '==' 'pow'}}
|
||||
{{localize 'l5r5e.sheets.upbringing'}}
|
||||
{{else}}
|
||||
{{localize 'l5r5e.sheets.family'}}
|
||||
{{/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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label">
|
||||
{{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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label">
|
||||
{{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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label">
|
||||
{{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>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -2,7 +2,7 @@
|
||||
<legend class="section-header">{{localize 'l5r5e.money.title'}}</legend>
|
||||
<label>
|
||||
{{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">
|
||||
<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>
|
||||
@@ -10,7 +10,7 @@
|
||||
</label>
|
||||
<label>
|
||||
{{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">
|
||||
<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>
|
||||
@@ -18,7 +18,7 @@
|
||||
</label>
|
||||
<label>
|
||||
{{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">
|
||||
<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>
|
||||
@@ -40,7 +40,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
||||
<label class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{#ifCond data.data.template '==' 'pow'}}
|
||||
{{#ifCond data.system.template '==' 'pow'}}
|
||||
{{localize 'l5r5e.social.past'}}
|
||||
{{else}}
|
||||
{{localize 'l5r5e.social.giri'}}
|
||||
{{/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>
|
||||
</fieldset>
|
||||
{{!-- Bushido Tenets --}}
|
||||
@@ -20,11 +20,11 @@
|
||||
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
||||
<label class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{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>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -39,7 +39,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -55,7 +55,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -71,7 +71,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -82,11 +82,11 @@
|
||||
{{!-- Description (public) --}}
|
||||
<fieldset class="narrative-description">
|
||||
<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>
|
||||
{{!-- Notes (private) --}}
|
||||
<fieldset class="narrative-note">
|
||||
<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>
|
||||
</div>
|
||||
@@ -3,35 +3,35 @@
|
||||
<label class="earth">
|
||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="air">
|
||||
<label class="air">
|
||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="water">
|
||||
<label class="water">
|
||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="fire">
|
||||
<label class="fire">
|
||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="void">
|
||||
<label class="void">
|
||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -4,7 +4,7 @@
|
||||
<input
|
||||
class="centered-input select-on-focus"
|
||||
type="number"
|
||||
name="data.skills.{{categoryId}}.{{skillId}}"
|
||||
name="system.skills.{{categoryId}}.{{skillId}}"
|
||||
value="{{skill}}"
|
||||
data-dtype="Number"
|
||||
min="0"
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1,7 +1,7 @@
|
||||
<li class="stance-content">
|
||||
<label class="stance-title {{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>
|
||||
<p class="item-description {{#ifCond ringId '==' stance}}stance-active{{/ifCond}}">{{localizeStanceTip ringId}}</p>
|
||||
</li>
|
||||
@@ -4,7 +4,7 @@
|
||||
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
||||
{{#each data.techniquesList as |technique|}}
|
||||
<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}}
|
||||
</label>
|
||||
{{/each}}
|
||||
@@ -16,7 +16,7 @@
|
||||
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
||||
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
||||
</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>
|
||||
{{/ifCond}}
|
||||
</legend>
|
||||
@@ -37,7 +37,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
{{!-- Sheet Header --}}
|
||||
<div class="sheet-header">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
{{{data.data.description}}}
|
||||
{{{data.enrichedHtml.description}}}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<li class="endurance-content">
|
||||
<label class="attribute-label">
|
||||
<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 class="attribute-label">
|
||||
<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">
|
||||
<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>
|
||||
@@ -17,11 +17,11 @@
|
||||
<li class="composure-content">
|
||||
<label class="attribute-label">
|
||||
<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 class="attribute-label">
|
||||
<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">
|
||||
<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>
|
||||
@@ -32,17 +32,17 @@
|
||||
<li class="focus-content">
|
||||
<label class="attribute-label">
|
||||
<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>
|
||||
<p class="item-description"> {{localize 'l5r5e.attributes.focustip'}}</p>
|
||||
</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">
|
||||
<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/>
|
||||
{{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}}
|
||||
</label>
|
||||
<p class="item-description"> {{localize 'l5r5e.attributes.vigilancetip'}}</p>
|
||||
@@ -50,8 +50,8 @@
|
||||
<li class="void-content">
|
||||
<label class="attribute-label">
|
||||
<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" type="number" name="data.void_points.max" value="{{data.data.void_points.max}}" data-dtype="Number" disabled/>
|
||||
<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="system.void_points.max" value="{{data.system.void_points.max}}" data-dtype="Number" disabled/>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -2,7 +2,7 @@
|
||||
<legend class="section-header">
|
||||
{{localize 'l5r5e.conflict.initiative.title'}}
|
||||
<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>
|
||||
</legend>
|
||||
<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">
|
||||
<legend class="section-header">{{localize 'l5r5e.conflict.stance'}}</legend>
|
||||
<ul class="item-list">
|
||||
{{#each data.data.rings as |ringValue ringId|}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.data.stance ringId=ringId}}
|
||||
{{#each data.system.rings as |ringValue ringId|}}
|
||||
{{> 'systems/l5r5e/templates/actors/character/stance.html' stance=../data.system.stance ringId=ringId}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<ul class="identity-list">
|
||||
{{!-- Npc Type (minion / adversary) --}}
|
||||
<li>
|
||||
<select class="attribute-dtype" name="data.type" {{^if data.editable_not_soft_locked}}disabled{{/if}}>
|
||||
{{#select data.data.type}}
|
||||
{{#each data.data.types as |t|}}
|
||||
<select class="attribute-dtype" name="system.type" {{^if data.editable_not_soft_locked}}disabled{{/if}}>
|
||||
{{#select data.system.type}}
|
||||
{{#each data.types as |t|}}
|
||||
<option value="{{t.id}}">{{t.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
@@ -12,11 +12,11 @@
|
||||
{{!-- Martial --}}
|
||||
<li>
|
||||
<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>
|
||||
{{!-- Social --}}
|
||||
<li>
|
||||
<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>
|
||||
</ul>
|
||||
@@ -12,7 +12,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<legend class="text-block-header">{{localize 'l5r5e.social.title'}}</legend>
|
||||
<label class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{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>
|
||||
</fieldset>
|
||||
{{!-- Bushido Tenets --}}
|
||||
@@ -16,11 +16,11 @@
|
||||
<legend class="text-block-header">{{localize 'l5r5e.social.bushido_tenets.title'}}</legend>
|
||||
<label class="attribute-label">
|
||||
{{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 class="attribute-label">
|
||||
{{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>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -35,7 +35,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -51,7 +51,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -67,7 +67,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
@@ -78,11 +78,11 @@
|
||||
{{!-- Description (public) --}}
|
||||
<fieldset class="narrative-description">
|
||||
<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>
|
||||
{{!-- Notes (private) --}}
|
||||
<fieldset class="narrative-note">
|
||||
<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>
|
||||
</div>
|
||||
@@ -3,35 +3,35 @@
|
||||
<label class="earth">
|
||||
<i class="i_earth dice-picker rollable" data-ring="earth"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="air">
|
||||
<label class="air">
|
||||
<i class="i_air dice-picker rollable" data-ring="air"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="water">
|
||||
<label class="water">
|
||||
<i class="i_water dice-picker rollable" data-ring="water"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="fire">
|
||||
<label class="fire">
|
||||
<i class="i_fire dice-picker rollable" data-ring="fire"></i>
|
||||
<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>
|
||||
</li>
|
||||
<li id="void">
|
||||
<label class="void">
|
||||
<i class="i_void dice-picker rollable" data-ring="void"></i>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1,10 +1,10 @@
|
||||
<ul class="npc-skill">
|
||||
{{#each data.data.skills as |skillValue skillCatId|}}
|
||||
{{#each data.system.skills as |skillValue skillCatId|}}
|
||||
<li class="skill skill-wrapper">
|
||||
<label class="dice-picker" data-skillcat="{{skillCatId}}">
|
||||
{{localizeSkill skillCatId "title"}}
|
||||
</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>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -2,32 +2,32 @@
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
<label class="attribute-label centered-input">
|
||||
<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>
|
||||
</li>
|
||||
<li class="affinities">
|
||||
{{!-- 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'}}
|
||||
</label>
|
||||
{{!-- Strength & Weakness --}}
|
||||
{{#each data.stances as |stance|}}
|
||||
<label class="ring">
|
||||
<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>
|
||||
{{/each}}
|
||||
</li>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<li class="stance-content">
|
||||
<label class="stance-title {{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>
|
||||
<p class="item-description">{{localizeStanceTip ringId}}</p>
|
||||
</li>
|
||||
@@ -7,7 +7,7 @@
|
||||
<i>{{localize 'l5r5e.techniques.type'}}</i>
|
||||
{{#each data.techniquesList as |technique|}}
|
||||
<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}}
|
||||
</label>
|
||||
{{/each}}
|
||||
@@ -19,7 +19,7 @@
|
||||
<span class="technique-controls toggle-on-click" data-toggle="toggle-technique-category-{{technique}}">
|
||||
{{localize (localize 'l5r5e.techniques.{technique}' technique=technique)}}
|
||||
</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>
|
||||
{{/ifCond}}
|
||||
</legend>
|
||||
@@ -40,7 +40,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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}}
|
||||
{{/ifCond}}
|
||||
{{/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>
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
<p>
|
||||
{{#if actor.data.data.identity.school_rank}}
|
||||
{{actor.data.data.identity.school_rank}}
|
||||
{{#if actor.system.identity.school_rank}}
|
||||
{{actor.system.identity.school_rank}}
|
||||
{{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}}
|
||||
</p>
|
||||
<p>
|
||||
{{#if actor.data.data.rings_affinities}}
|
||||
{{#each actor.data.data.rings_affinities as |ringValue ringId|}}
|
||||
{{#if actor.system.rings_affinities}}
|
||||
{{#each actor.system.rings_affinities as |ringValue ringId|}}
|
||||
{{#if ringValue}}
|
||||
<i class="i_{{ringId}}" title="{{localizeRing ringId}}"></i> {{ringValue}}
|
||||
{{/if}}
|
||||
@@ -57,24 +57,24 @@
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
/ {{actor.data.data.fatigue.max}}
|
||||
<span class="{{#ifCond actor.system.fatigue.value '>' actor.system.fatigue.max}}badvalue{{/ifCond}}">{{actor.system.fatigue.value}}</span>
|
||||
/ {{actor.system.fatigue.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
/ {{actor.data.data.strife.max}}
|
||||
<span class="{{#ifCond actor.system.strife.value '>' actor.system.strife.max}}badvalue{{/ifCond}}">{{actor.system.strife.value}}</span>
|
||||
/ {{actor.system.strife.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{actor.data.data.focus}}
|
||||
/ {{#if actor.data.data.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.data.data.vigilance}}{{/if}}
|
||||
{{actor.system.focus}}
|
||||
/ {{#if actor.system.is_compromised}}<span class="badvalue">1</span>{{else}}{{actor.system.vigilance}}{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<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.data.data.void_points.max}}
|
||||
{{actor.system.void_points.value}}
|
||||
/ {{actor.system.void_points.max}}
|
||||
</a>
|
||||
</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><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
|
||||
<td>
|
||||
{{#if actor.data.data.warlord_actor_id}}
|
||||
<a data-actor-id="{{actor.data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.warlord}}</a>
|
||||
{{#if actor.system.warlord_actor_id}}
|
||||
<a data-actor-id="{{actor.system.warlord_actor_id}}" class="open-sheet-actor-id">{{actor.system.warlord}}</a>
|
||||
{{else}}
|
||||
{{actor.data.data.warlord}}
|
||||
{{actor.system.warlord}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
/ {{actor.data.data.battle_readiness.casualties_strength.max}}
|
||||
<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.system.battle_readiness.casualties_strength.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
/ {{actor.data.data.battle_readiness.panic_discipline.max}}
|
||||
<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.system.battle_readiness.panic_discipline.max}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{#if actor.data.data.commander_actor_id}}
|
||||
<a data-actor-id="{{actor.data.data.commander_actor_id}}" class="open-sheet-actor-id">{{actor.data.data.commander}}</a>
|
||||
{{#if actor.system.commander_actor_id}}
|
||||
<a data-actor-id="{{actor.system.commander_actor_id}}" class="open-sheet-actor-id">{{actor.system.commander}}</a>
|
||||
{{else}}
|
||||
{{actor.data.data.commander}}
|
||||
{{actor.system.commander}}
|
||||
{{/if}}
|
||||
<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.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>
|
||||
/ {{actor.data.data.commander_standing.status}}
|
||||
<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.system.commander_standing.glory '>' 64}}goodvalue{{/ifCond}}{{#ifCond actor.system.commander_standing.glory '<' 20}}badvalue{{/ifCond}}">{{actor.system.commander_standing.glory}}</span>
|
||||
/ {{actor.system.commander_standing.status}}
|
||||
</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>
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
<h2>{{localize 'ACTOR.TypeArmy'}}</h2>
|
||||
<ul>
|
||||
{{!-- warlord --}}
|
||||
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.data.allies_backers}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.purpose_mustering'}}</b> : {{actorData.data.purpose_mustering}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.allies_backers'}}</b> : {{actorData.system.allies_backers}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.purpose_mustering'}}</b> : {{actorData.system.purpose_mustering}}</li>
|
||||
|
||||
{{!-- commander --}}
|
||||
<li><b>{{localize 'l5r5e.army.commander_abilities'}}</b> : {{actorData.data.commander_abilities}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.army_abilities'}}</b> : {{{enrichHTML actorData.data.army_abilities}}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.commander_abilities'}}</b> : {{actorData.system.commander_abilities}}</li>
|
||||
<li><b>{{localize 'l5r5e.army.army_abilities'}}</b> : {{{actorData.enrichedHtml.army_abilities}}}</li>
|
||||
</ul>
|
||||
{{!-- description --}}
|
||||
<p>{{{enrichHTML actorData.data.description}}}</p>
|
||||
<p>{{{actorData.enrichedHtml.description}}}</p>
|
||||
|
||||
{{!-- Cohorts --}}
|
||||
{{#if actorData.splitItemsList.army_cohort}}
|
||||
@@ -18,12 +18,12 @@
|
||||
<ul>
|
||||
{{#each actorData.splitItemsList.army_cohort as |cohort|}}
|
||||
<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>
|
||||
<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-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.data.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-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.data.battle_readiness.panic_discipline.max}}</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.system.battle_readiness.casualties_strength.max}}</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.system.battle_readiness.panic_discipline.max}}</i>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -36,8 +36,8 @@
|
||||
{{#each actorData.splitItemsList.army_fortification as |fortification|}}
|
||||
<li>
|
||||
<b>{{fortification.name}}</b>
|
||||
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.data.difficulty}}</i>
|
||||
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.data.attrition_reduction}}</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.system.attrition_reduction}}</i>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<section>
|
||||
<ul>
|
||||
{{!-- Ninjo/Giri --}}
|
||||
<li><b>{{localize 'l5r5e.social.ninjo'}}</b> : {{actorData.social.ninjo}}</li>
|
||||
<li><b>{{localize 'l5r5e.social.giri'}}</b> : {{actorData.social.giri}}</li>
|
||||
<li><b>{{localize 'l5r5e.social.ninjo'}}</b> : {{actorData.system.social.ninjo}}</li>
|
||||
<li><b>{{localize 'l5r5e.social.giri'}}</b> : {{actorData.system.social.giri}}</li>
|
||||
|
||||
{{!-- Bushido Tenet --}}
|
||||
<li><b>{{localize 'l5r5e.social.bushido_tenets.paramount'}}</b> : {{actorData.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.paramount'}}</b> : {{actorData.system.social.bushido_tenets.paramount}}</li>
|
||||
<li><b>{{localize 'l5r5e.social.bushido_tenets.less_significant'}}</b> : {{actorData.system.social.bushido_tenets.less_significant}}</li>
|
||||
|
||||
{{!-- Peculiarities --}}
|
||||
<li><b>{{localize 'l5r5e.social.npc.advantages'}}</b> : {{advantages}}</li>
|
||||
<li><b>{{localize 'l5r5e.social.npc.disadvantages'}}</b> : {{disadvantages}}</li>
|
||||
|
||||
{{!-- 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.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.status'}}</b> : {{actorData.social.status}}</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.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.system.social.status}}</li>
|
||||
</ul>
|
||||
{{#ifCond actor_type "==" "character"}}
|
||||
{{!-- 20Q --}}
|
||||
<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.q15{suffix}' suffix=suffix)}}</b> : {{actorData.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.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.system.twenty_questions.step15.stress}}</li>
|
||||
<li><b>{{localize (localize 'l5r5e.twenty_questions.part7.q20{suffix}' suffix=suffix)}}</b> : {{actorData.system.twenty_questions.step20.death}}</li>
|
||||
</ul>
|
||||
{{/ifCond}}
|
||||
<p>{{{enrichHTML actorData.description}}}</p>
|
||||
<p>{{{actorData.enrichedHtml.description}}}</p>
|
||||
</section>
|
||||
@@ -7,17 +7,17 @@
|
||||
<section class="sheet-body">
|
||||
{{!-- Attributes Tab --}}
|
||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||
<select name="data.advancement_type" id="advancement_type">
|
||||
{{#select data.data.advancement_type}}
|
||||
<select name="system.advancement_type" id="advancement_type">
|
||||
{{#select data.system.advancement_type}}
|
||||
{{#each data.subTypesList as |label type|}}
|
||||
<option value="{{type}}">{{localize label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
|
||||
{{#ifCond data.data.advancement_type '==' 'ring'}}
|
||||
<select name="data.ring" id="advancement_ring">
|
||||
{{#select data.data.ring}}
|
||||
{{#ifCond data.system.advancement_type '==' 'ring'}}
|
||||
<select name="system.ring" id="advancement_ring">
|
||||
{{#select data.system.ring}}
|
||||
{{#each data.ringsList as |obj|}}
|
||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||
{{/each}}
|
||||
@@ -25,10 +25,10 @@
|
||||
</select>
|
||||
{{/ifCond}}
|
||||
|
||||
{{#ifCond data.data.advancement_type '==' 'skill'}}
|
||||
<select name="data.skill" id="advancement_skill">
|
||||
{{#ifCond data.system.advancement_type '==' 'skill'}}
|
||||
<select name="system.skill" id="advancement_skill">
|
||||
<option value="">{{localize 'l5r5e.twenty_questions.choose_one_skill'}}</option>
|
||||
{{#select data.data.skill}}
|
||||
{{#select data.system.skill}}
|
||||
{{#each data.skillsList as |skills catId|}}
|
||||
<optgroup label="{{localizeSkill catId 'title'}}">
|
||||
{{#each skills as |obj|}}
|
||||
@@ -40,20 +40,20 @@
|
||||
</select>
|
||||
{{/ifCond}}
|
||||
<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'}}
|
||||
</label>
|
||||
<label class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
{{#ifCond data.data.advancement_type '==' 'ring' }}
|
||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.data.ring}}
|
||||
{{#ifCond data.system.advancement_type '==' 'ring' }}
|
||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.system.ring}}
|
||||
{{else}}
|
||||
<strong>{{localize 'l5r5e.skills.label'}}</strong> : {{localizeSkillId data.data.skill}}
|
||||
<strong>{{localize 'l5r5e.skills.label'}}</strong> : {{localizeSkillId data.system.skill}}
|
||||
{{/ifCond}}
|
||||
</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.data.in_curriculum}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.system.in_curriculum}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}</li>
|
||||
</ul>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<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="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-bolt" title="{{localize 'l5r5e.armors.type'}} {{localize 'l5r5e.armors.supernatural'}}"> {{armor.data.data.armor.supernatural}}</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.system.armor.supernatural}}</i>
|
||||
</li>
|
||||
{{#if editable}}
|
||||
<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}}
|
||||
</ul>
|
||||
<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>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{!-- attributes --}}
|
||||
<article class="attributes" data-group="primary" data-tab="description">
|
||||
<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' }}
|
||||
</label>
|
||||
{{> 'systems/l5r5e/templates/items/item/item-value.html' }}
|
||||
@@ -16,11 +16,11 @@
|
||||
<legend class="text-header">{{localize 'l5r5e.armors.type'}}</legend>
|
||||
<label>
|
||||
{{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>
|
||||
{{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>
|
||||
</fieldset>
|
||||
</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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.data.equipped}}
|
||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.system.equipped}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.data.readied}}
|
||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.system.readied}}
|
||||
</li>
|
||||
{{!--item-value--}}
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.data.quantity}}
|
||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.system.quantity}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.data.weight}}
|
||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.system.weight}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.data.rarity}}
|
||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.system.rarity}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.data.zeni}}
|
||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.system.zeni}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.armors.physical'}}</strong> : {{data.data.armor.physical}}
|
||||
<strong>{{localize 'l5r5e.armors.physical'}}</strong> : {{data.system.armor.physical}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.armors.supernatural'}}</strong> : {{data.data.armor.supernatural}}
|
||||
<strong>{{localize 'l5r5e.armors.supernatural'}}</strong> : {{data.system.armor.supernatural}}
|
||||
</li>
|
||||
</ul>
|
||||
{{!--properties--}}
|
||||
<p>
|
||||
<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>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</legend>
|
||||
<ul class="item-list">
|
||||
{{#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 }}
|
||||
{{/ifCond}}
|
||||
{{/each}}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<li class="item cohort flexcol dragndrop-actor-id actor">
|
||||
<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="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-fist-raised" title="{{localize 'l5r5e.army.battle_readiness.strength'}}"> {{cohort.data.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-user-friends" title="{{localize 'l5r5e.army.battle_readiness.discipline'}}"> {{cohort.data.battle_readiness.panic_discipline.max}}</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.system.battle_readiness.casualties_strength.max}}</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.system.battle_readiness.panic_discipline.max}}</i>
|
||||
</li>
|
||||
{{#if editable}}
|
||||
<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}}
|
||||
</ul>
|
||||
<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.data.equipment}}<li>{{localize 'l5r5e.sheets.equipment'}} : {{cohort.data.equipment}}</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.system.equipment}}<li>{{localize 'l5r5e.sheets.equipment'}} : {{cohort.system.equipment}}</li>{{/if}}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -10,35 +10,35 @@
|
||||
{{!-- battle readiness --}}
|
||||
<label class="attribute army-cohort-types">
|
||||
{{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 class="attribute army-cohort-types">
|
||||
{{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 class="attribute army-cohort-types">
|
||||
{{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 class="attribute army-cohort-types">
|
||||
{{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 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.data.leader_actor_id}}
|
||||
{{^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.system.leader_actor_id}}
|
||||
<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>
|
||||
<a data-actor-id="{{data.data.leader_actor_id}}" class="open-sheet-actor-id">{{data.data.leader}}</a>
|
||||
<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.system.leader_actor_id}}" class="open-sheet-actor-id">{{data.system.leader}}</a>
|
||||
</div>
|
||||
{{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}}
|
||||
</label>
|
||||
<label class="attribute army-cohort-types flx50">
|
||||
{{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>
|
||||
</article>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<article class="tab abilities" data-group="primary" data-tab="abilities">
|
||||
<fieldset class="attribute army-cohort-types flx100">
|
||||
<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>
|
||||
</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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li><strong>{{localize 'l5r5e.army.cohort.leader'}}</strong> : {{data.data.leader}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.equipment'}}</strong> : {{data.data.equipment}}</li>
|
||||
<li><strong>{{localize 'l5r5e.army.cohort.leader'}}</strong> : {{data.system.leader}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.equipment'}}</strong> : {{data.system.equipment}}</li>
|
||||
{{!-- 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.strength'}}</strong> : {{data.data.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.discipline'}}</strong> : {{data.data.battle_readiness.panic_discipline.max}}</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.system.battle_readiness.casualties_strength.max}}</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.system.battle_readiness.panic_discipline.max}}</li>
|
||||
</ul>
|
||||
{{!-- 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--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
@@ -3,8 +3,8 @@
|
||||
<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="icon-stat-container">
|
||||
<i class="fas fa-skull" title="{{localize 'l5r5e.army.fortification.difficulty'}}"> {{fortification.data.difficulty}}</i>
|
||||
<i class="fas fa-dungeon" title="{{localize 'l5r5e.army.fortification.attrition_reduction'}}"> {{fortification.data.attrition_reduction}}</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.system.attrition_reduction}}</i>
|
||||
</li>
|
||||
{{#if editable}}
|
||||
<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">
|
||||
<label class="attribute army-fortification-types">
|
||||
{{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 class="attribute army-fortification-types">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li><strong>{{localize 'l5r5e.army.fortification.difficulty'}}</strong> : {{data.data.difficulty}}</li>
|
||||
<li><strong>{{localize 'l5r5e.army.fortification.attrition_reduction'}}</strong> : {{data.data.attrition_reduction}}</li>
|
||||
<li><strong>{{localize 'l5r5e.army.fortification.difficulty'}}</strong> : {{data.system.difficulty}}</li>
|
||||
<li><strong>{{localize 'l5r5e.army.fortification.attrition_reduction'}}</strong> : {{data.system.attrition_reduction}}</li>
|
||||
</ul>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</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>
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{#if bond.data.data.bond_type}}
|
||||
{{#if bond.system.bond_type}}
|
||||
<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>
|
||||
{{/if}}
|
||||
</li>
|
||||
@@ -9,23 +9,23 @@
|
||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||
<label class="attribute bonds-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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.data.bond_type}}
|
||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.system.bond_type}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}
|
||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||
</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>
|
||||
</ul>
|
||||
{{!--properties--}}
|
||||
<p>
|
||||
<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>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -9,23 +9,23 @@
|
||||
<article class="attributes item-list" data-group="primary" data-tab="attributes">
|
||||
<label class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute item">
|
||||
{{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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li><strong>{{localize 'l5r5e.advancements.rarity_modifier'}}</strong> : {{data.data.rarity_modifier}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.data.bought_at_rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.rarity_modifier'}}</strong> : {{data.system.rarity_modifier}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}</li>
|
||||
<li><strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}</li>
|
||||
<li><strong>{{localize 'l5r5e.sheets.bought_at_rank'}}</strong> : {{data.system.bought_at_rank}}</li>
|
||||
</ul>
|
||||
{{!--Linked property--}}
|
||||
<strong>{{localize 'l5r5e.sheets.linked_property'}}</strong> : {{{data.linkedProperty.name}}}
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<li class="item flexcol" data-item-id="{{item._id}}">
|
||||
<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-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}}
|
||||
<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}}
|
||||
<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>
|
||||
@@ -11,7 +11,7 @@
|
||||
{{/if}}
|
||||
</ul>
|
||||
<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>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<article class="tab infos active" data-group="primary" data-tab="infos">
|
||||
<fieldset>
|
||||
<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>
|
||||
<label class="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>
|
||||
</article>
|
||||
@@ -8,7 +8,7 @@
|
||||
{{!-- properties Tab --}}
|
||||
<article class="attributes" data-group="primary" data-tab="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' }}
|
||||
</label>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.data.equipped}}
|
||||
<strong>{{localize 'l5r5e.weapons.sheathed'}}</strong> : {{localizeYesNo data.system.equipped}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.data.readied}}
|
||||
<strong>{{localize 'l5r5e.weapons.readied'}}</strong> : {{localizeYesNo data.system.readied}}
|
||||
</li>
|
||||
{{!--item-value--}}
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.data.quantity}}
|
||||
<strong>{{localize 'l5r5e.sheets.quantity'}} </strong> : {{data.system.quantity}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.data.weight}}
|
||||
<strong>{{localize 'l5r5e.sheets.weight'}}</strong> : {{data.system.weight}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.data.rarity}}
|
||||
<strong>{{localize 'l5r5e.sheets.rarity'}}</strong> : {{data.system.rarity}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.data.zeni}}
|
||||
<strong>{{localize 'l5r5e.sheets.value'}}</strong> : {{data.system.zeni}}
|
||||
</li>
|
||||
</ul>
|
||||
{{!--properties--}}
|
||||
<p>
|
||||
<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>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<label class="value">
|
||||
{{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 class="value">
|
||||
{{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 class="value">
|
||||
{{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 class="value">
|
||||
<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>
|
||||
@@ -7,7 +7,7 @@
|
||||
</h3>
|
||||
<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|}}
|
||||
{{> '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}}
|
||||
</ul>
|
||||
{{/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>
|
||||
{{/if}}
|
||||
</ul>
|
||||
{{#if peculiarity.data.data.types}}
|
||||
{{#if peculiarity.system.types}}
|
||||
<ul class="item-properties">
|
||||
<li>{{peculiarity.data.data.types}}</li>
|
||||
<li>{{peculiarity.system.types}}</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</li>
|
||||
@@ -7,39 +7,39 @@
|
||||
<section class="sheet-body">
|
||||
{{!-- Attributes Tab --}}
|
||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||
<select name="data.ring">
|
||||
{{#select data.data.ring}}
|
||||
<select name="system.ring">
|
||||
{{#select data.system.ring}}
|
||||
{{#each data.ringsList as |obj|}}
|
||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<select class="attribute" name="data.peculiarity_type">
|
||||
{{#select data.data.peculiarity_type}}
|
||||
<select class="attribute" name="system.peculiarity_type">
|
||||
{{#select data.system.peculiarity_type}}
|
||||
{{#each data.subTypesList as |type|}}
|
||||
<option value="{{type.id}}">{{type.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<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'}}
|
||||
</label>
|
||||
<label class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute full">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.data.ring}}
|
||||
<strong>{{localize 'l5r5e.rings.label'}}</strong> : {{localizeRing data.system.ring}}
|
||||
</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>
|
||||
<strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.data.in_curriculum}}
|
||||
<strong>{{localize 'l5r5e.advancements.curriculum'}}</strong> : {{localizeYesNo data.system.in_curriculum}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||
</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>
|
||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.data.types}}
|
||||
<strong>{{localize 'l5r5e.sheets.types'}}</strong> : {{data.system.types}}
|
||||
</li>
|
||||
</ul>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
@@ -7,11 +7,11 @@
|
||||
{{!--cancelled properties--}}
|
||||
<li>
|
||||
<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>
|
||||
</ul>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||
<label class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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">
|
||||
<h2 class="item-name"><img src="{{data.img}}" title="{{data.name}}" /> {{data.name}}</h2>
|
||||
</header>
|
||||
<section class="sheet-body">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.data.xp_cost}}
|
||||
<strong>{{localize 'l5r5e.advancements.cost'}}</strong> : {{data.system.xp_cost}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.data.xp_used}}
|
||||
<strong>{{localize 'l5r5e.advancements.spent'}}</strong> : {{data.system.xp_used}}
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.data.rank}}
|
||||
<strong>{{localize 'l5r5e.sheets.rank'}}</strong> : {{data.system.rank}}
|
||||
</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>
|
||||
</ul>
|
||||
{{!--item-infos--}}
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{enrichHTML data.data.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.data.book_reference}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.description'}}</strong> : {{{data.enrichedHtml.description}}}</p>
|
||||
<p><strong>{{localize 'l5r5e.sheets.book_reference'}}</strong> : {{data.system.book_reference}}</p>
|
||||
</section>
|
||||
</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">
|
||||
<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}}
|
||||
<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>
|
||||
{{^if technique.data.parent_id.item_id}}
|
||||
<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.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>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -7,48 +7,48 @@
|
||||
<section class="sheet-body">
|
||||
{{!-- Attributes Tab --}}
|
||||
<article class="attributes" data-group="primary" data-tab="attributes">
|
||||
<select name="data.ring">
|
||||
{{#select data.data.ring}}
|
||||
<select name="system.ring">
|
||||
{{#select data.system.ring}}
|
||||
{{#each data.ringsList as |obj|}}
|
||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<select name="data.technique_type">
|
||||
{{#select data.data.technique_type}}
|
||||
<select name="system.technique_type">
|
||||
{{#select data.system.technique_type}}
|
||||
{{#each data.techniquesList as |obj|}}
|
||||
<option value="{{obj.id}}">{{obj.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<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'}}
|
||||
</label>
|
||||
<label class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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 class="attribute">
|
||||
{{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>
|
||||
</article>
|
||||
{{> '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