army sheet : moved some elements
This commit is contained in:
@@ -13,7 +13,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
template: CONFIG.l5r5e.paths.templates + "actors/army-sheet.html",
|
||||
width: 600,
|
||||
height: 800,
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "cohort" }],
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "army" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
|
||||
});
|
||||
}
|
||||
@@ -60,7 +60,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
|
||||
// Check item type and subtype
|
||||
const item = await game.l5r5e.HelpersL5r5e.getDragnDropTargetObject(event);
|
||||
if (!item || item.documentName !== "Item" || !["army_cohort", "army_fortification"].includes(item.data.type)) {
|
||||
console.warn("L5R5E | Wrong type", item.data.type);
|
||||
console.warn("L5R5E | Wrong type", item?.data?.type, item);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ export class HelpersL5r5e {
|
||||
}
|
||||
const table = await comp.getName(tableName);
|
||||
if (!table) {
|
||||
console.log(`L5R5E | Table not found[${tableName}]`);
|
||||
console.log(`L5R5E | Table not found[${tableName}]`, comp, table);
|
||||
return;
|
||||
}
|
||||
return await table.drawMany(retrieve, opt);
|
||||
|
||||
@@ -29,6 +29,7 @@ export const PreloadTemplates = async function () {
|
||||
`${tpl}actors/npc/skill.html`,
|
||||
`${tpl}actors/npc/techniques.html`,
|
||||
// *** Actors : Army ***
|
||||
`${tpl}actors/army/army.html`,
|
||||
`${tpl}actors/army/cohort.html`,
|
||||
`${tpl}actors/army/fortification.html`,
|
||||
`${tpl}actors/army/others.html`,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,11 +6,80 @@
|
||||
h1 {
|
||||
flex: 1;
|
||||
}
|
||||
.readiness {
|
||||
flex: 0 0 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
position: relative;
|
||||
padding: 0.25rem;
|
||||
height: 80px;
|
||||
|
||||
li {
|
||||
flex: 25%;
|
||||
display: inline-grid;
|
||||
strong {
|
||||
color: $l5r5e-label;
|
||||
text-align: center;
|
||||
}
|
||||
label {
|
||||
flex: 100%;
|
||||
}
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0 none;
|
||||
text-align: center;
|
||||
}
|
||||
&:after {
|
||||
content: "";
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
position: relative;
|
||||
right: calc(50% - 5.5rem);
|
||||
top: calc(50% - 2.83rem);
|
||||
background: transparent url("../assets/icons/circle.svg") no-repeat 0 0;
|
||||
background-size: contain;
|
||||
opacity: 0.25;
|
||||
z-index: -1;
|
||||
}
|
||||
&:nth-child(1) {
|
||||
&:after {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(2) {
|
||||
&:after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(3) {
|
||||
&:after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(4) {
|
||||
&:after {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
align-items: flex-start;
|
||||
h2 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
&.army {
|
||||
.warlord,
|
||||
.commander {
|
||||
display: flex;
|
||||
fieldset {
|
||||
flex: content;
|
||||
margin-top: 0.25rem;
|
||||
margin-bottom: 0.25rem;
|
||||
strong {
|
||||
@@ -19,66 +88,72 @@
|
||||
label {
|
||||
flex: 100%;
|
||||
}
|
||||
p {
|
||||
width: 100%;
|
||||
}
|
||||
textarea {
|
||||
height: calc(100% - 22px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.readiness,
|
||||
.standing {
|
||||
align-items: flex-start;
|
||||
flex: 0 0 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
h2 {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
ul > li {
|
||||
position: relative;
|
||||
padding: 0.25rem;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
strong {
|
||||
text-align: center;
|
||||
}
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0 none;
|
||||
text-align: center;
|
||||
}
|
||||
&:after {
|
||||
content: "";
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
position: absolute;
|
||||
right: calc(50% - 0.95rem);
|
||||
top: calc(50% - 1.6rem);
|
||||
background: transparent url("../assets/icons/circle.svg") no-repeat 0 0;
|
||||
background-size: contain;
|
||||
opacity: 0.25;
|
||||
}
|
||||
&:nth-child(1) {
|
||||
&:after {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(2) {
|
||||
&:after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(3) {
|
||||
&:after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
&:nth-child(4) {
|
||||
&:after {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.readiness {
|
||||
ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
li {
|
||||
flex: 50%;
|
||||
flex: 33%;
|
||||
display: inline-grid;
|
||||
position: relative;
|
||||
padding: 0.25rem;
|
||||
flex-direction: column-reverse;
|
||||
|
||||
strong {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input {
|
||||
background: transparent;
|
||||
border: 0 none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
position: absolute;
|
||||
right: calc(50% - 0.95rem);
|
||||
top: calc(50% - 0.2rem);
|
||||
background: transparent url("../assets/icons/circle.svg") no-repeat 0 0;
|
||||
background-size: contain;
|
||||
opacity: 0.25;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
&:after {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
&:after {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
&:after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,87 +2,45 @@
|
||||
{{!-- Sheet Header --}}
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<div class="header-fields warlord">
|
||||
<fieldset>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.warlord'}}</strong>
|
||||
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
||||
<textarea type="text" name="data.allies_backers">{{data.data.allies_backers}}</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.purpose_mustering'}}</strong>
|
||||
<textarea type="text" name="data.purpose_mustering">{{data.data.purpose_mustering}}</textarea>
|
||||
</p>
|
||||
</fieldset>
|
||||
<fieldset class="readiness">
|
||||
<h2>{{localize 'l5r5e.army.battle_readiness.title'}}</h2>
|
||||
<div class="header-fields identity-wrapper">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
|
||||
<div class="readiness">
|
||||
<ul>
|
||||
<li>
|
||||
<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}}" />
|
||||
</li>
|
||||
<li>
|
||||
<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}}" />
|
||||
</li>
|
||||
<li>
|
||||
<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}}" />
|
||||
<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}}" />
|
||||
</li>
|
||||
<li>
|
||||
<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}}" />
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="header-fields commander">
|
||||
<fieldset>
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.commander'}}</strong>
|
||||
<input name="data.commander" type="text" value="{{data.data.commander}}" />
|
||||
</label>
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.commander_abilities'}}</strong>
|
||||
<textarea type="text" name="data.commander_abilities">{{data.data.commander_abilities}}</textarea>
|
||||
</label>
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.army_abilities'}}</strong>
|
||||
<textarea type="text" name="data.army_abilities">{{data.data.army_abilities}}</textarea>
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset class="standing">
|
||||
<h2>{{localize 'l5r5e.army.commander_standing'}}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||
<input name="data.commander_standing.honor" type="text" value="{{data.data.commander_standing.honor}}" />
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||
<input name="data.commander_standing.glory" type="text" value="{{data.data.commander_standing.glory}}" />
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||
<input name="data.commander_standing.status" type="text" value="{{data.data.commander_standing.status}}" />
|
||||
<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}}" />
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
{{!-- Sheet Tab Navigation --}}
|
||||
<nav class="sheet-tabs tabs" data-group="primary">
|
||||
<a class="item" data-tab="army">{{localize 'ACTOR.TypeArmy'}}</a>
|
||||
<a class="item" data-tab="cohort">{{localize 'l5r5e.army.cohort.title'}}</a>
|
||||
<a class="item" data-tab="fortification">{{localize 'l5r5e.army.fortification.title'}}</a>
|
||||
<a class="item" data-tab="others">{{localize 'l5r5e.notes'}}</a>
|
||||
</nav>
|
||||
|
||||
{{!-- Army Tab --}}
|
||||
<article class="tab army" data-group="primary" data-tab="army">
|
||||
{{> 'systems/l5r5e/templates/actors/army/army.html'}}
|
||||
</article>
|
||||
|
||||
{{!-- Cohort Tab --}}
|
||||
<article class="tab cohort" data-group="primary" data-tab="cohort">
|
||||
{{> 'systems/l5r5e/templates/actors/army/cohort.html'}}
|
||||
|
||||
50
system/templates/actors/army/army.html
Normal file
50
system/templates/actors/army/army.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="header-fields warlord">
|
||||
<fieldset>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.warlord'}}</strong>
|
||||
<input name="data.warlord" type="text" value="{{data.data.warlord}}" />
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.allies_backers'}}</strong>
|
||||
<textarea type="text" name="data.allies_backers">{{data.data.allies_backers}}</textarea>
|
||||
</p>
|
||||
<p>
|
||||
<strong>{{localize 'l5r5e.army.purpose_mustering'}}</strong>
|
||||
<textarea type="text" name="data.purpose_mustering">{{data.data.purpose_mustering}}</textarea>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="header-fields commander">
|
||||
<fieldset>
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.commander'}}</strong>
|
||||
<input name="data.commander" type="text" value="{{data.data.commander}}" />
|
||||
</label>
|
||||
<div class="standing">
|
||||
<ul>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.honor'}}</strong>
|
||||
<input name="data.commander_standing.honor" type="text" value="{{data.data.commander_standing.honor}}" />
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.glory'}}</strong>
|
||||
<input name="data.commander_standing.glory" type="text" value="{{data.data.commander_standing.glory}}" />
|
||||
</li>
|
||||
<li>
|
||||
<strong>{{localize 'l5r5e.social.status'}}</strong>
|
||||
<input name="data.commander_standing.status" type="text" value="{{data.data.commander_standing.status}}" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.commander_abilities'}}</strong>
|
||||
<textarea type="text" name="data.commander_abilities">{{data.data.commander_abilities}}</textarea>
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset class="army-abilities">
|
||||
<label>
|
||||
<strong>{{localize 'l5r5e.army.army_abilities'}}</strong>
|
||||
<textarea type="text" name="data.army_abilities">{{data.data.army_abilities}}</textarea>
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
Reference in New Issue
Block a user