army sheet : added ability to drop a actor for commander & warlord, and some fixes
This commit is contained in:
@@ -14,10 +14,77 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
width: 600,
|
width: 600,
|
||||||
height: 800,
|
height: 800,
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "army" }],
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "army" }],
|
||||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constructor(options = {}) {
|
||||||
|
super(options);
|
||||||
|
this._initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize once
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_initialize() {
|
||||||
|
const data = this.object.data.data;
|
||||||
|
|
||||||
|
// update linked actor datas
|
||||||
|
if (data.commander_actor_id) {
|
||||||
|
const commander = game.actors.get(data.commander_actor_id);
|
||||||
|
if (commander) {
|
||||||
|
this._updateLinkedActorData("commander", commander);
|
||||||
|
} else {
|
||||||
|
this._removeLinkedActorData("commander");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.warlord_actor_id) {
|
||||||
|
const warlord = game.actors.get(data.warlord_actor_id);
|
||||||
|
if (warlord) {
|
||||||
|
this._updateLinkedActorData("warlord", warlord);
|
||||||
|
} else {
|
||||||
|
this._removeLinkedActorData("warlord");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create drag-and-drop workflow handlers for this Application
|
||||||
|
* @return An array of DragDrop handlers
|
||||||
|
*/
|
||||||
|
_createDragDropHandlers() {
|
||||||
|
return [
|
||||||
|
new DragDrop({
|
||||||
|
dropSelector: ".warlord",
|
||||||
|
callbacks: { drop: this._onDropActors.bind(this, "warlord") },
|
||||||
|
}),
|
||||||
|
new DragDrop({
|
||||||
|
dropSelector: ".commander",
|
||||||
|
callbacks: { drop: this._onDropActors.bind(this, "commander") },
|
||||||
|
}),
|
||||||
|
new DragDrop({
|
||||||
|
dropSelector: null,
|
||||||
|
callbacks: { drop: this._onDrop.bind(this) },
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subscribe to events from the sheet.
|
||||||
|
* @param {jQuery} html HTML content of the sheet.
|
||||||
|
*/
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
|
if (!this.isEditable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete the linked Actor (warlod/commander)
|
||||||
|
html.find(".actor-remove-control").on("click", this._removeLinkedActor.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
/** @inheritdoc */
|
/** @inheritdoc */
|
||||||
getData(options = {}) {
|
getData(options = {}) {
|
||||||
const sheetData = super.getData(options);
|
const sheetData = super.getData(options);
|
||||||
@@ -48,7 +115,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle dropped data on the Actor sheet
|
* Handle dropped Item data on the Actor sheet (cohort, fortification)
|
||||||
* @param {DragEvent} event
|
* @param {DragEvent} event
|
||||||
*/
|
*/
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
@@ -57,10 +124,12 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check item type and subtype
|
|
||||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
||||||
console.warn("L5R5E | Wrong type", item?.data?.type, item);
|
// actor dual trigger...
|
||||||
|
if (item?.documentName !== "Actor") {
|
||||||
|
console.warn("L5R5E | Wrong item type", item?.data?.type, item);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +141,101 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
|||||||
|
|
||||||
let itemData = item.data.toObject(true);
|
let itemData = item.data.toObject(true);
|
||||||
|
|
||||||
// Finally create the embed
|
// Finally, create the embed
|
||||||
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
return this.actor.createEmbeddedDocuments("Item", [itemData]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle dropped Actor data on the Actor sheet
|
||||||
|
* @param {string} type warlord|commander|item
|
||||||
|
* @param {DragEvent} event
|
||||||
|
*/
|
||||||
|
async _onDropActors(type, event) {
|
||||||
|
// *** Everything below here is only needed if the sheet is editable ***
|
||||||
|
if (!this.isEditable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const droppedActor = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||||
|
return this._updateLinkedActorData(type, droppedActor);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the linked actor (commander/warlord)
|
||||||
|
* @param {Event} event
|
||||||
|
* @return {Promise<void>}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
async _removeLinkedActor(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const id = $(event.currentTarget).data("actor-id");
|
||||||
|
const type = $(event.currentTarget).data("type");
|
||||||
|
if (!id || !type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return this._removeLinkedActorData(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update actor datas for this army sheet
|
||||||
|
* @param {string} type commander|warlord
|
||||||
|
* @param {ActorL5r5e} actor actor object
|
||||||
|
* @return {Promise<abstract.Document>}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
async _updateLinkedActorData(type, actor) {
|
||||||
|
if (!actor || actor.documentName !== "Actor" || !["character", "npc"].includes(actor.data?.type)) {
|
||||||
|
console.warn("L5R5E | Wrong actor type", actor?.data?.type, actor);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const actorData = {};
|
||||||
|
switch (type) {
|
||||||
|
case "commander":
|
||||||
|
actorData.commander = actor.data.name;
|
||||||
|
actorData.commander_actor_id = actor.data._id;
|
||||||
|
actorData.commander_standing = {
|
||||||
|
honor: actor.data.data.social.honor,
|
||||||
|
glory: actor.data.data.social.glory,
|
||||||
|
status: actor.data.data.social.status,
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "warlord":
|
||||||
|
actorData.warlord = actor.data.name;
|
||||||
|
actorData.warlord_actor_id = actor.data._id;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.warn("L5R5E | Unknown type", type);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return this.actor.update({ data: actorData });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean ActorId for army sheet
|
||||||
|
* @param {string} type commander|warlord
|
||||||
|
* @return {Promise<abstract.Document>}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
async _removeLinkedActorData(type) {
|
||||||
|
const actorData = {};
|
||||||
|
switch (type) {
|
||||||
|
case "commander":
|
||||||
|
actorData.commander_actor_id = null;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "warlord":
|
||||||
|
actorData.warlord_actor_id = null;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.warn("L5R5E | Unknown type", type);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return this.actor.update({ data: actorData });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ export class GmMonitor extends FormApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open sheet
|
// Commons
|
||||||
html.find(`.actor-sheet-control`).on("click", this._openActorSheet.bind(this));
|
game.l5r5e.HelpersL5r5e.commonListeners(html);
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
html.find(`.actor-remove-control`).on("click", this._removeActor.bind(this));
|
html.find(`.actor-remove-control`).on("click", this._removeActor.bind(this));
|
||||||
@@ -222,24 +222,6 @@ export class GmMonitor extends FormApplication {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Open the Sheet for this actor
|
|
||||||
* @param {Event} event
|
|
||||||
* @return {Promise<void>}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
async _openActorSheet(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
event.stopPropagation();
|
|
||||||
|
|
||||||
const id = $(event.currentTarget).data("actor-id");
|
|
||||||
if (!id) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.object.actors.find((e) => e.id === id)?.sheet?.render(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove the link to a property for the current item
|
* Remove the link to a property for the current item
|
||||||
* @param {Event} event
|
* @param {Event} event
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class HelpersL5r5e {
|
|||||||
* @return {Promise<null>}
|
* @return {Promise<null>}
|
||||||
*/
|
*/
|
||||||
static async getDragnDropTargetObject(event) {
|
static async getDragnDropTargetObject(event) {
|
||||||
const json = event.dataTransfer.getData("text/plain");
|
const json = event.dataTransfer?.getData("text/plain");
|
||||||
if (!json) {
|
if (!json) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -427,6 +427,18 @@ export class HelpersL5r5e {
|
|||||||
}
|
}
|
||||||
return await item.renderTextTemplate();
|
return await item.renderTextTemplate();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Open actor sheet
|
||||||
|
html.find(".open-sheet-actor-id").on("click", (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
const id = $(event.currentTarget).data("actor-id");
|
||||||
|
if (!id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
game.actors.get(id)?.sheet?.render(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -20,6 +20,7 @@
|
|||||||
li {
|
li {
|
||||||
flex: 25%;
|
flex: 25%;
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
|
position: relative;
|
||||||
strong {
|
strong {
|
||||||
color: $l5r5e-label;
|
color: $l5r5e-label;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -36,9 +37,9 @@
|
|||||||
content: "";
|
content: "";
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
position: relative;
|
position: absolute;
|
||||||
right: calc(50% - 5.5rem);
|
right: calc(50% - 0.9rem);
|
||||||
top: calc(50% - 2.83rem);
|
top: calc(50% - 0.2rem);
|
||||||
background: transparent url("../assets/icons/circle.svg") no-repeat 0 0;
|
background: transparent url("../assets/icons/circle.svg") no-repeat 0 0;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
@@ -94,6 +95,9 @@
|
|||||||
textarea {
|
textarea {
|
||||||
height: calc(100% - 22px);
|
height: calc(100% - 22px);
|
||||||
}
|
}
|
||||||
|
.actor-remove-control {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.standing {
|
.standing {
|
||||||
@@ -158,5 +162,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.others {
|
||||||
|
flex-direction: column;
|
||||||
|
.editor-content {
|
||||||
|
min-height: 8rem;
|
||||||
|
max-height: 14rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
},
|
},
|
||||||
"army": {
|
"army": {
|
||||||
"warlord": "",
|
"warlord": "",
|
||||||
|
"warlord_actor_id": null,
|
||||||
"allies_backers": "",
|
"allies_backers": "",
|
||||||
"purpose_mustering": "",
|
"purpose_mustering": "",
|
||||||
"battle_readiness": {
|
"battle_readiness": {
|
||||||
@@ -158,6 +159,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"commander": "",
|
"commander": "",
|
||||||
|
"commander_actor_id": null,
|
||||||
"commander_abilities": "",
|
"commander_abilities": "",
|
||||||
"army_abilities": "",
|
"army_abilities": "",
|
||||||
"commander_standing": {
|
"commander_standing": {
|
||||||
|
|||||||
@@ -8,19 +8,19 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong>
|
||||||
<input name="data.battle_readiness.casualties_strength.value" type="text" value="{{data.data.battle_readiness.casualties_strength.value}}" />
|
<input name="data.battle_readiness.casualties_strength.value" type="number" value="{{data.data.battle_readiness.casualties_strength.value}}" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong>
|
||||||
<input name="data.battle_readiness.casualties_strength.max" type="text" value="{{data.data.battle_readiness.casualties_strength.max}}" />
|
<input name="data.battle_readiness.casualties_strength.max" type="number" value="{{data.data.battle_readiness.casualties_strength.max}}" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.panic'}}</strong>
|
||||||
<input name="data.battle_readiness.panic_discipline.value" type="text" value="{{data.data.battle_readiness.panic_discipline.value}}" />
|
<input name="data.battle_readiness.panic_discipline.value" type="number" value="{{data.data.battle_readiness.panic_discipline.value}}" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
|
<strong>{{localize 'l5r5e.army.battle_readiness.discipline'}}</strong>
|
||||||
<input name="data.battle_readiness.panic_discipline.max" type="text" value="{{data.data.battle_readiness.panic_discipline.max}}" />
|
<input name="data.battle_readiness.panic_discipline.max" type="number" value="{{data.data.battle_readiness.panic_discipline.max}}" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,7 +2,14 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.army.warlord'}}</strong>
|
<strong>{{localize 'l5r5e.army.warlord'}}</strong>
|
||||||
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
|
</p>
|
||||||
|
<p>
|
||||||
|
{{#if data.data.warlord_actor_id}}
|
||||||
|
<span data-actor-id="{{actor.id}}" data-type="warlord" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
||||||
|
<a data-actor-id="{{data.data.warlord_actor_id}}" class="open-sheet-actor-id">{{data.data.warlord}}</a>
|
||||||
|
{{else}}
|
||||||
|
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
|
||||||
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
||||||
@@ -18,21 +25,26 @@
|
|||||||
<fieldset>
|
<fieldset>
|
||||||
<label>
|
<label>
|
||||||
<strong>{{localize 'l5r5e.army.commander'}}</strong>
|
<strong>{{localize 'l5r5e.army.commander'}}</strong>
|
||||||
<input name="data.commander" type="text" value="{{data.data.commander}}" />
|
|
||||||
</label>
|
</label>
|
||||||
|
{{#if data.data.commander_actor_id}}
|
||||||
|
<span data-actor-id="{{actor.id}}" data-type="commander" class="actor-remove-control pointer" title="{{localize 'Delete'}}"><i class="fas fa-trash"></i></span>
|
||||||
|
<a data-actor-id="{{data.data.commander_actor_id}}" class="open-sheet-actor-id">{{data.data.commander}}</a>
|
||||||
|
{{else}}
|
||||||
|
<input name="data.commander" type="text" value="{{data.data.commander}}" />
|
||||||
|
{{/if}}
|
||||||
<div class="standing">
|
<div class="standing">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||||
<input name="data.commander_standing.honor" type="text" value="{{data.data.commander_standing.honor}}" />
|
<input name="data.commander_standing.honor" type="number" value="{{data.data.commander_standing.honor}}" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||||
<input name="data.commander_standing.glory" type="text" value="{{data.data.commander_standing.glory}}" />
|
<input name="data.commander_standing.glory" type="number" value="{{data.data.commander_standing.glory}}" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||||
<input name="data.commander_standing.status" type="text" value="{{data.data.commander_standing.status}}" />
|
<input name="data.commander_standing.status" type="number" value="{{data.data.commander_standing.status}}" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
<div>
|
{{!-- Supplies and Logistics --}}
|
||||||
{{!-- Supplies and Logistics --}}
|
<fieldset class="supplies_logistics">
|
||||||
<fieldset class="supplies_logistics">
|
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.army.supplies_logistics'}}</legend>
|
{{editor content=data.data.supplies_logistics target="data.supplies_logistics" button=true editable=options.editable}}
|
||||||
{{editor content=data.data.supplies_logistics target="data.supplies_logistics" button=true editable=options.editable}}
|
</fieldset>
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
{{!-- Past Battles --}}
|
{{!-- Past Battles --}}
|
||||||
<fieldset class="past_battles">
|
<fieldset class="past_battles">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.army.past_battles'}}</legend>
|
||||||
{{editor content=data.data.past_battles target="data.past_battles" button=true editable=options.editable}}
|
{{editor content=data.data.past_battles target="data.past_battles" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Description (public) --}}
|
{{!-- Description (public) --}}
|
||||||
<fieldset class="description">
|
<fieldset class="description">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.description'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.description'}}</legend>
|
||||||
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
|
{{editor content=data.data.description target="data.description" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
{{!-- Notes (private) --}}
|
{{!-- Notes (private) --}}
|
||||||
<fieldset class="note">
|
<fieldset class="note">
|
||||||
<legend class="text-block-header">{{localize 'l5r5e.notes'}}</legend>
|
<legend class="text-block-header">{{localize 'l5r5e.notes'}}</legend>
|
||||||
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
|
{{editor content=data.data.notes target="data.notes" button=true editable=options.editable}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
|
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
|
||||||
<td>
|
<td>
|
||||||
<a data-actor-id="{{actor.id}}" class="actor-sheet-control">{{actor.name}}</a>
|
<a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a>
|
||||||
{{#if actor.data.data.attitude}}<p>({{actor.data.data.attitude}})</p>{{/if}}
|
{{#if actor.data.data.attitude}}<p>({{actor.data.data.attitude}})</p>{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td><i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.data.data.stance}})</h2>{{localizeStanceTip actor.data.data.stance}}" class="i_{{actor.data.data.stance}} actor-infos-control"></i></td>
|
<td><i data-type="text" data-text="<h2>{{localize 'l5r5e.conflict.stance'}} ({{localizeRing actor.data.data.stance}})</h2>{{localizeStanceTip actor.data.data.stance}}" class="i_{{actor.data.data.stance}} actor-infos-control"></i></td>
|
||||||
@@ -92,8 +92,14 @@
|
|||||||
{{#each data.actors as |actor|}}
|
{{#each data.actors as |actor|}}
|
||||||
<tr>
|
<tr>
|
||||||
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
|
<td><img class="profile actor-profile" title="{{actor.name}}" src="{{actor.img}}"></td>
|
||||||
<td><a data-actor-id="{{actor.id}}" class="actor-sheet-control">{{actor.name}}</a></td>
|
<td><a data-actor-id="{{actor.id}}" class="open-sheet-actor-id">{{actor.name}}</a></td>
|
||||||
<td>{{actor.data.data.warlord}}</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>
|
||||||
|
{{else}}
|
||||||
|
{{actor.data.data.warlord}}
|
||||||
|
{{/if}}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="{{#ifCond actor.data.data.battle_readiness.casualties_strength.value '>' actor.data.data.battle_readiness.casualties_strength.max}}badvalue{{/ifCond}}">{{actor.data.data.battle_readiness.casualties_strength.value}}</span>
|
<span class="{{#ifCond actor.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}}
|
/ {{actor.data.data.battle_readiness.casualties_strength.max}}
|
||||||
@@ -103,7 +109,12 @@
|
|||||||
/ {{actor.data.data.battle_readiness.panic_discipline.max}}
|
/ {{actor.data.data.battle_readiness.panic_discipline.max}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{actor.data.data.commander}}<br>
|
{{#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>
|
||||||
|
{{else}}
|
||||||
|
{{actor.data.data.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.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>
|
/ <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}}
|
/ {{actor.data.data.commander_standing.status}}
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
<article class="attributes" data-group="primary" data-tab="description">
|
<article class="attributes" data-group="primary" data-tab="description">
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.cohort.leader'}}
|
{{localize 'l5r5e.army.cohort.leader'}}
|
||||||
<input class="select-on-focus" type="number" name="data.leader" value="{{data.data.leader}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="text" name="data.leader" value="{{data.data.leader}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.equipment'}}
|
{{localize 'l5r5e.equipment'}}
|
||||||
<input class="select-on-focus" type="number" name="data.equipment" value="{{data.data.equipment}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="text" name="data.equipment" value="{{data.data.equipment}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
<label class="attribute army-cohort-types">
|
<label class="attribute army-cohort-types">
|
||||||
{{localize 'l5r5e.army.cohort.abilities'}}
|
{{localize 'l5r5e.army.cohort.abilities'}}
|
||||||
<input class="select-on-focus" type="number" name="data.abilities" value="{{data.data.abilities}}" data-dtype="Number"/>
|
<input class="select-on-focus" type="text" name="data.abilities" value="{{data.data.abilities}}" data-dtype="String"/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{{!-- battle readiness --}}
|
{{!-- battle readiness --}}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@
|
|||||||
<li><strong>{{localize 'l5r5e.equipment'}}</strong> : {{data.data.equipment}}</li>
|
<li><strong>{{localize 'l5r5e.equipment'}}</strong> : {{data.data.equipment}}</li>
|
||||||
<li><strong>{{localize 'l5r5e.army.cohort.abilities'}}</strong> : {{data.data.abilities}}</li>
|
<li><strong>{{localize 'l5r5e.army.cohort.abilities'}}</strong> : {{data.data.abilities}}</li>
|
||||||
{{!-- battle readiness --}}
|
{{!-- battle readiness --}}
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.strength'}}</strong> : {{data.data.battle_readiness.casualties_strength.max}}</li>
|
|
||||||
<li><strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong> : {{data.data.battle_readiness.casualties_strength.value}}</li>
|
<li><strong>{{localize 'l5r5e.army.battle_readiness.casualties'}}</strong> : {{data.data.battle_readiness.casualties_strength.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.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.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>
|
||||||
</ul>
|
</ul>
|
||||||
{{!--item-infos--}}
|
{{!--item-infos--}}
|
||||||
<p><strong>{{localize 'l5r5e.description'}}</strong> : {{{data.data.description}}}</p>
|
<p><strong>{{localize 'l5r5e.description'}}</strong> : {{{data.data.description}}}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user